diff options
author | drh <drh@noemail.net> | 2014-09-11 13:44:52 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2014-09-11 13:44:52 +0000 |
commit | 32c6a48b5ec977fc849833f9c340b85893103074 (patch) | |
tree | 5447aaed784dac0b0d37aef340ce4bb99e0d9afd /src/sqliteInt.h | |
parent | d39c40ff5e89601a242f004faa45735e80275fcb (diff) | |
download | sqlite-32c6a48b5ec977fc849833f9c340b85893103074.tar.gz sqlite-32c6a48b5ec977fc849833f9c340b85893103074.zip |
Add support for the extra parameter on the sqlite3_set_authorizer() callback
and support for failing an ATTACH with an authentication-required database
using bad credentials. The extension is now feature complete, but much
testing and bug-fixing remains.
FossilOrigin-Name: 596e728b0eb19a34c888e33d4d37978ca2bf1e00
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 9ef4e3620..a9f200145 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1012,9 +1012,19 @@ int sqlite3UserAuthTable(const char*); int sqlite3UserAuthCheckLogin(sqlite3*,const char*,u8*); void sqlite3CryptFunc(sqlite3_context*,int,sqlite3_value**); - #endif /* SQLITE_USER_AUTHENTICATION */ +/* +** typedef for the authorization callback function. +*/ +#ifdef SQLITE_USER_AUTHENTICATION + typedef int (*sqlite3_xauth)(void*,int,const char*,const char*,const char*, + const char*, const char*); +#else + typedef int (*sqlite3_xauth)(void*,int,const char*,const char*,const char*, + const char*); +#endif + /* ** Each database connection is an instance of the following structure. @@ -1083,8 +1093,7 @@ struct sqlite3 { } u1; Lookaside lookaside; /* Lookaside malloc configuration */ #ifndef SQLITE_OMIT_AUTHORIZATION - int (*xAuth)(void*,int,const char*,const char*,const char*,const char*); - /* Access authorization function */ + sqlite3_xauth xAuth; /* Access authorization function */ void *pAuthArg; /* 1st argument to the access auth function */ #endif #ifndef SQLITE_OMIT_PROGRESS_CALLBACK |