sqlite3_enable_load_extension(3) - NetBSD Manual Pages

SQLITE3_ENABLE_LOAD_... NetBSD Library Functions ManualSQLITE3_ENABLE_LOAD_...


NAME
sqlite3_enable_load_extension -- enable or disable extension loading
SYNOPSIS
#include <sqlite3.h> int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
DESCRIPTION
So as not to open security holes in older applications that are unpre- pared to deal with extension loading, and as a means of disabling exten- sion loading while evaluating user-entered SQL, the following API is pro- vided to turn the sqlite3_load_extension() mechanism on and off. Extension loading is off by default. Call the sqlite3_enable_load_exten- sion() routine with onoff==1 to turn extension loading on and call it with onoff==0 to turn it back off again. This interface enables or disables both the C-API sqlite3_load_extension() and the SQL function load_extension(). Use sqlite3_db_config(db,SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION,..) to enable or disable only the C-API. Security warning: It is recommended that extension loading be enabled using the SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION method rather than this interface, so the load_extension() SQL function remains disabled. This will prevent SQL injections from giving attackers access to extension loading capabilities.
IMPLEMENTATION NOTES
These declarations were extracted from the interface documentation at line 7576. SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
SEE ALSO
sqlite3_db_config(3), sqlite3_load_extension(3), SQLITE_DBCONFIG_MAINDBNAME(3) NetBSD 11.99 April 29, 2026 NetBSD 11.99

Powered by man-cgi (2026-09-02). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.