Enable compile-time flag SQLITE_ENABLE_DBPAGE_VTAB to add support for .recover shell option.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2021-04-23 17:29:10 +02:00
parent 74a6b073f1
commit 49094570c4
2 changed files with 13 additions and 1 deletions
+11
View File
@@ -193,6 +193,17 @@ void db_init(void)
// explicitly check for failures to have happened
sqlite3_config(SQLITE_CONFIG_LOG, SQLite3LogCallback, NULL);
// SQLITE_DBCONFIG_DEFENSIVE
// Disbale language features that allow ordinary SQL to deliberately corrupt
// the database file. The disabled features include but are not limited to
// the following:
//
// - The PRAGMA writable_schema=ON statement.
// - The PRAGMA journal_mode=OFF statement.
// - Writes to the sqlite_dbpage virtual table.
// - Direct writes to shadow tables.
sqlite3_config(SQLITE_DBCONFIG_DEFENSIVE, true);
// Register Pi-hole provided SQLite3 extensions (see sqlite3-ext.c)
sqlite3_auto_extension((void (*)(void))sqlite3_pihole_extensions_init);