diff options
Diffstat (limited to 'src/auth.c')
-rw-r--r-- | src/auth.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/auth.c b/src/auth.c index ca5af14ba..933416fbd 100644 --- a/src/auth.c +++ b/src/auth.c @@ -14,7 +14,7 @@ ** systems that do not need this facility may omit it by recompiling ** the library with -DSQLITE_OMIT_AUTHORIZATION=1 ** -** $Id: auth.c,v 1.3 2003/01/13 23:27:32 drh Exp $ +** $Id: auth.c,v 1.4 2003/01/31 17:21:50 drh Exp $ */ #include "sqliteInt.h" @@ -71,6 +71,7 @@ static void sqliteAuthBadReturnCode(Parse *pParse, int rc){ " from the authorization function - should be SQLITE_OK, " "SQLITE_IGNORE, or SQLITE_DENY", 0); pParse->nErr++; + pParse->rc = SQLITE_MISUSE; } /* @@ -113,6 +114,7 @@ void sqliteAuthRead( sqliteSetString(&pParse->zErrMsg,"access to ", pTab->zName, ".", zCol, " is prohibited", 0); pParse->nErr++; + pParse->rc = SQLITE_AUTH; }else if( rc!=SQLITE_OK ){ sqliteAuthBadReturnCode(pParse, rc); } @@ -138,6 +140,7 @@ int sqliteAuthCheck( rc = db->xAuth(db->pAuthArg, code, zArg1, zArg2); if( rc==SQLITE_DENY ){ sqliteSetString(&pParse->zErrMsg, "not authorized", 0); + pParse->rc = SQLITE_AUTH; pParse->nErr++; }else if( rc!=SQLITE_OK && rc!=SQLITE_IGNORE ){ rc = SQLITE_DENY; |