diff --git a/m4/lnav_with_sqlite3.m4 b/m4/lnav_with_sqlite3.m4 index 253e88e7..d79d0364 100644 --- a/m4/lnav_with_sqlite3.m4 +++ b/m4/lnav_with_sqlite3.m4 @@ -95,12 +95,6 @@ AC_DEFUN([LNAV_WITH_SQLITE3], ) ) - AC_CHECK_FUNC(sqlite3_compileoption_used, - AC_DEFINE([HAVE_SQLITE3_COMPILEOPTION_USED], [], - [Have sqlite3_compileoption_used function] - ) - ) - AC_SUBST(HAVE_SQLITE3_VALUE_SUBTYPE) AS_VAR_SET(CFLAGS, $saved_CFLAGS) diff --git a/src/sql_util.cc b/src/sql_util.cc index 602129f7..a86063a0 100644 --- a/src/sql_util.cc +++ b/src/sql_util.cc @@ -720,29 +720,7 @@ int sqlite_authorizer(void *pUserData, int action_code, const char *detail1, { if (action_code == SQLITE_ATTACH) { - /* Check to see that the filename is not NULL */ - if (detail1 != NULL) { - string fileName(detail1); - - /* A temporary database is fine. */ - if (!fileName.empty()) { - /* In-memory databases are fine. - */ - if (fileName.compare(":memory:") == 0) { - return SQLITE_OK; - } -#ifdef HAVE_SQLITE3_COMPILEOPTION_USED - if (sqlite3_compileoption_used("SQLITE_USE_URI") && ( - fileName.find("file::memory:") == 0 || ( - (sqlite3_libversion_number() >= 3008000) && ( - fileName.find("?mode=memory") != string::npos || - fileName.find("&mode=memory") != string::npos)))) { - return SQLITE_OK; - } -#endif - return SQLITE_DENY; - } - } + return SQLITE_DENY; } return SQLITE_OK; } diff --git a/test/test_sql.sh b/test/test_sql.sh index 9bb24c62..e67c139e 100644 --- a/test/test_sql.sh +++ b/test/test_sql.sh @@ -721,38 +721,6 @@ check_error_output "LNAVSECURE mode bypassed (URI)" <= 3.8.0. -# Turned off at the moment since Travis CI seems to use version 3.6.0 and the -# checks fail. -# -#run_test ${lnav_test} -n \ -# -c ";attach database 'file:memdb?mode=memory' as 'db'" \ -# empty -# -#check_error_output "Failed to create a in-memory db (URI) in LNAVSECURE mode" <