Index: third_party/sqlite/src/src/auth.c |
diff --git a/third_party/sqlite/src/src/auth.c b/third_party/sqlite/src/src/auth.c |
index d38bb836a784fbfab6ab7b03d4e6dd43edc41fa7..1680c9a7c2f8a5c84429abc75d0e84be0e0ec936 100644 |
--- a/third_party/sqlite/src/src/auth.c |
+++ b/third_party/sqlite/src/src/auth.c |
@@ -73,7 +73,7 @@ int sqlite3_set_authorizer( |
void *pArg |
){ |
sqlite3_mutex_enter(db->mutex); |
- db->xAuth = xAuth; |
+ db->xAuth = (sqlite3_xauth)xAuth; |
db->pAuthArg = pArg; |
sqlite3ExpirePreparedStatements(db); |
sqlite3_mutex_leave(db->mutex); |
@@ -108,7 +108,11 @@ int sqlite3AuthReadCol( |
char *zDb = db->aDb[iDb].zName; /* Name of attached database */ |
int rc; /* Auth callback return code */ |
- rc = db->xAuth(db->pAuthArg, SQLITE_READ, zTab,zCol,zDb,pParse->zAuthContext); |
+ rc = db->xAuth(db->pAuthArg, SQLITE_READ, zTab,zCol,zDb,pParse->zAuthContext |
+#ifdef SQLITE_USER_AUTHENTICATION |
+ ,db->auth.zAuthUser |
+#endif |
+ ); |
if( rc==SQLITE_DENY ){ |
if( db->nDb>2 || iDb!=0 ){ |
sqlite3ErrorMsg(pParse, "access to %s.%s.%s is prohibited",zDb,zTab,zCol); |
@@ -208,7 +212,11 @@ int sqlite3AuthCheck( |
if( db->xAuth==0 ){ |
return SQLITE_OK; |
} |
- rc = db->xAuth(db->pAuthArg, code, zArg1, zArg2, zArg3, pParse->zAuthContext); |
+ rc = db->xAuth(db->pAuthArg, code, zArg1, zArg2, zArg3, pParse->zAuthContext |
+#ifdef SQLITE_USER_AUTHENTICATION |
+ ,db->auth.zAuthUser |
+#endif |
+ ); |
if( rc==SQLITE_DENY ){ |
sqlite3ErrorMsg(pParse, "not authorized"); |
pParse->rc = SQLITE_AUTH; |