/ Check-in [293fbf0a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Don't invoke authorisation callback during database initialisation. (CVS 1588)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 293fbf0aa5c221bc341d0d9afc73d459f427f940
User & Date: danielk1977 2004-06-14 11:35:18
Context
2004-06-14
11:43
Have the TCL 'errorcode' interface call sqlite3_errcode(). (CVS 1589) check-in: f4b4df65 user: danielk1977 tags: trunk
11:35
Don't invoke authorisation callback during database initialisation. (CVS 1588) check-in: 293fbf0a user: danielk1977 tags: trunk
09:41
Bugfix for previous checkin. (CVS 1587) check-in: 2737505f user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/auth.c.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
169
170
171
172
173
174
175





176
177
178
179
180
181
182
**
*************************************************************************
** This file contains code used to implement the sqlite3_set_authorizer()
** API.  This facility is an optional feature of the library.  Embedded
** systems that do not need this facility may omit it by recompiling
** the library with -DSQLITE_OMIT_AUTHORIZATION=1
**
** $Id: auth.c,v 1.14 2004/05/10 10:34:34 danielk1977 Exp $
*/
#include "sqliteInt.h"

/*
** All of the code in this file may be omitted by defining a single
** macro.
*/
................................................................................
  int code,
  const char *zArg1,
  const char *zArg2,
  const char *zArg3
){
  sqlite *db = pParse->db;
  int rc;






  if( db->xAuth==0 ){
    return SQLITE_OK;
  }
  rc = db->xAuth(db->pAuthArg, code, zArg1, zArg2, zArg3, pParse->zAuthContext);
  if( rc==SQLITE_DENY ){
    sqlite3ErrorMsg(pParse, "not authorized");







|







 







>
>
>
>
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
**
*************************************************************************
** This file contains code used to implement the sqlite3_set_authorizer()
** API.  This facility is an optional feature of the library.  Embedded
** systems that do not need this facility may omit it by recompiling
** the library with -DSQLITE_OMIT_AUTHORIZATION=1
**
** $Id: auth.c,v 1.15 2004/06/14 11:35:18 danielk1977 Exp $
*/
#include "sqliteInt.h"

/*
** All of the code in this file may be omitted by defining a single
** macro.
*/
................................................................................
  int code,
  const char *zArg1,
  const char *zArg2,
  const char *zArg3
){
  sqlite *db = pParse->db;
  int rc;

  /* Don't do any authorization checks if the database is initialising. */
  if( db->init.busy ){
    return SQLITE_OK;
  }

  if( db->xAuth==0 ){
    return SQLITE_OK;
  }
  rc = db->xAuth(db->pAuthArg, code, zArg1, zArg2, zArg3, pParse->zAuthContext);
  if( rc==SQLITE_DENY ){
    sqlite3ErrorMsg(pParse, "not authorized");