亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? auth.c

?? sqlite 3.3.8 支持加密的版本
?? C
字號:
/*
** 2003 January 11
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** 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.23 2006/10/12 21:34:20 rmsimpson Exp $
*/
#include "sqliteInt.h"

/*
** All of the code in this file may be omitted by defining a single
** macro.
*/
#ifndef SQLITE_OMIT_AUTHORIZATION

/*
** Set or clear the access authorization function.
**
** The access authorization function is be called during the compilation
** phase to verify that the user has read and/or write access permission on
** various fields of the database.  The first argument to the auth function
** is a copy of the 3rd argument to this routine.  The second argument
** to the auth function is one of these constants:
**
**       SQLITE_CREATE_INDEX
**       SQLITE_CREATE_TABLE
**       SQLITE_CREATE_TEMP_INDEX
**       SQLITE_CREATE_TEMP_TABLE
**       SQLITE_CREATE_TEMP_TRIGGER
**       SQLITE_CREATE_TEMP_VIEW
**       SQLITE_CREATE_TRIGGER
**       SQLITE_CREATE_VIEW
**       SQLITE_DELETE
**       SQLITE_DROP_INDEX
**       SQLITE_DROP_TABLE
**       SQLITE_DROP_TEMP_INDEX
**       SQLITE_DROP_TEMP_TABLE
**       SQLITE_DROP_TEMP_TRIGGER
**       SQLITE_DROP_TEMP_VIEW
**       SQLITE_DROP_TRIGGER
**       SQLITE_DROP_VIEW
**       SQLITE_INSERT
**       SQLITE_PRAGMA
**       SQLITE_READ
**       SQLITE_SELECT
**       SQLITE_TRANSACTION
**       SQLITE_UPDATE
**
** The third and fourth arguments to the auth function are the name of
** the table and the column that are being accessed.  The auth function
** should return either SQLITE_OK, SQLITE_DENY, or SQLITE_IGNORE.  If
** SQLITE_OK is returned, it means that access is allowed.  SQLITE_DENY
** means that the SQL statement will never-run - the sqlite3_exec() call
** will return with an error.  SQLITE_IGNORE means that the SQL statement
** should run but attempts to read the specified column will return NULL
** and attempts to write the column will be ignored.
**
** Setting the auth function to NULL disables this hook.  The default
** setting of the auth function is NULL.
*/
int sqlite3_set_authorizer(
  sqlite3 *db,
  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
  void *pArg
){
  db->xAuth = xAuth;
  db->pAuthArg = pArg;
  sqlite3ExpirePreparedStatements(db);
  return SQLITE_OK;
}

/*
** Write an error message into pParse->zErrMsg that explains that the
** user-supplied authorization function returned an illegal value.
*/
static void sqliteAuthBadReturnCode(Parse *pParse, int rc){
  sqlite3ErrorMsg(pParse, "illegal return value (%d) from the "
    "authorization function - should be SQLITE_OK, SQLITE_IGNORE, "
    "or SQLITE_DENY", rc);
  pParse->rc = SQLITE_ERROR;
}

/*
** The pExpr should be a TK_COLUMN expression.  The table referred to
** is in pTabList or else it is the NEW or OLD table of a trigger.  
** Check to see if it is OK to read this particular column.
**
** If the auth function returns SQLITE_IGNORE, change the TK_COLUMN 
** instruction into a TK_NULL.  If the auth function returns SQLITE_DENY,
** then generate an error.
*/
void sqlite3AuthRead(
  Parse *pParse,        /* The parser context */
  Expr *pExpr,          /* The expression to check authorization on */
  SrcList *pTabList     /* All table that pExpr might refer to */
){
  sqlite3 *db = pParse->db;
  int rc;
  Table *pTab;          /* The table being read */
  const char *zCol;     /* Name of the column of the table */
  int iSrc;             /* Index in pTabList->a[] of table being read */
  const char *zDBase;   /* Name of database being accessed */
  TriggerStack *pStack; /* The stack of current triggers */
  int iDb;              /* The index of the database the expression refers to */

  if( db->xAuth==0 ) return;
  if( pExpr->op==TK_AS ) return;
  assert( pExpr->op==TK_COLUMN );
  iDb = sqlite3SchemaToIndex(pParse->db, pExpr->pSchema);
  if( iDb<0 ){
    /* An attempt to read a column out of a subquery or other
    ** temporary table. */
    return;
  }
  for(iSrc=0; pTabList && iSrc<pTabList->nSrc; iSrc++){
    if( pExpr->iTable==pTabList->a[iSrc].iCursor ) break;
  }
  if( iSrc>=0 && pTabList && iSrc<pTabList->nSrc ){
    pTab = pTabList->a[iSrc].pTab;
  }else if( (pStack = pParse->trigStack)!=0 ){
    /* This must be an attempt to read the NEW or OLD pseudo-tables
    ** of a trigger.
    */
    assert( pExpr->iTable==pStack->newIdx || pExpr->iTable==pStack->oldIdx );
    pTab = pStack->pTab;
  }else{
    return;
  }
  if( pTab==0 ) return;
  if( pExpr->iColumn>=0 ){
    assert( pExpr->iColumn<pTab->nCol );
    zCol = pTab->aCol[pExpr->iColumn].zName;
  }else if( pTab->iPKey>=0 ){
    assert( pTab->iPKey<pTab->nCol );
    zCol = pTab->aCol[pTab->iPKey].zName;
  }else{
    zCol = "ROWID";
  }
  assert( iDb>=0 && iDb<db->nDb );
  zDBase = db->aDb[iDb].zName;
  rc = db->xAuth(db->pAuthArg, SQLITE_READ, pTab->zName, zCol, zDBase, 
                 pParse->zAuthContext);
  if( rc==SQLITE_IGNORE ){
    pExpr->op = TK_NULL;
  }else if( rc==SQLITE_DENY ){
    if( db->nDb>2 || iDb!=0 ){
      sqlite3ErrorMsg(pParse, "access to %s.%s.%s is prohibited", 
         zDBase, pTab->zName, zCol);
    }else{
      sqlite3ErrorMsg(pParse, "access to %s.%s is prohibited",pTab->zName,zCol);
    }
    pParse->rc = SQLITE_AUTH;
  }else if( rc!=SQLITE_OK ){
    sqliteAuthBadReturnCode(pParse, rc);
  }
}

/*
** Do an authorization check using the code and arguments given.  Return
** either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY.  If SQLITE_DENY
** is returned, then the error count and error message in pParse are
** modified appropriately.
*/
int sqlite3AuthCheck(
  Parse *pParse,
  int code,
  const char *zArg1,
  const char *zArg2,
  const char *zArg3
){
  sqlite3 *db = pParse->db;
  int rc;

  /* Don't do any authorization checks if the database is initialising
  ** or if the parser is being invoked from within sqlite3_declare_vtab.
  */
  if( db->init.busy || IN_DECLARE_VTAB ){
    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");
    pParse->rc = SQLITE_AUTH;
  }else if( rc!=SQLITE_OK && rc!=SQLITE_IGNORE ){
    rc = SQLITE_DENY;
    sqliteAuthBadReturnCode(pParse, rc);
  }
  return rc;
}

/*
** Push an authorization context.  After this routine is called, the
** zArg3 argument to authorization callbacks will be zContext until
** popped.  Or if pParse==0, this routine is a no-op.
*/
void sqlite3AuthContextPush(
  Parse *pParse,
  AuthContext *pContext, 
  const char *zContext
){
  pContext->pParse = pParse;
  if( pParse ){
    pContext->zAuthContext = pParse->zAuthContext;
    pParse->zAuthContext = zContext;
  }
}

/*
** Pop an authorization context that was previously pushed
** by sqlite3AuthContextPush
*/
void sqlite3AuthContextPop(AuthContext *pContext){
  if( pContext->pParse ){
    pContext->pParse->zAuthContext = pContext->zAuthContext;
    pContext->pParse = 0;
  }
}

#endif /* SQLITE_OMIT_AUTHORIZATION */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆精品精品国产自在97香蕉| 国产精品99久久久久久久vr| 首页欧美精品中文字幕| 又紧又大又爽精品一区二区| 亚洲精品写真福利| 五月天国产精品| 久久se精品一区二区| 五月婷婷激情综合网| 日韩av不卡一区二区| 免费高清视频精品| 久久9热精品视频| 懂色av一区二区三区免费观看| 成人免费视频免费观看| 色综合久久久久综合体| 欧美一区二区三区四区视频| 欧美亚洲愉拍一区二区| 精品精品欲导航| 国产精品久久久久四虎| 精品伦理精品一区| 久久精品在线观看| 一二三区精品福利视频| 亚洲国产视频a| 激情五月激情综合网| 99久久综合99久久综合网站| 91久久一区二区| 欧美本精品男人aⅴ天堂| 国产精品色哟哟网站| 日日夜夜免费精品| 色综合视频一区二区三区高清| 欧美人成免费网站| 久久久久久9999| 亚洲成人一区在线| 国产精品伊人色| 日韩一级欧美一级| 亚洲成人精品一区| 蜜桃av一区二区| 在线视频一区二区三区| 欧美韩国日本综合| 精久久久久久久久久久| 欧美一区二区观看视频| 亚洲精品日韩一| 国产综合久久久久影院| 欧美猛男超大videosgay| 久久美女艺术照精彩视频福利播放 | 亚洲人成网站影音先锋播放| 国产一区二区三区香蕉| 日韩一区二区三区观看| 免费看日韩精品| 国产精品三级久久久久三级| 国产一区二区三区综合| 亚洲天堂av一区| 九色综合狠狠综合久久| 99精品视频在线免费观看| 欧美大度的电影原声| 日本vs亚洲vs韩国一区三区| 欧美日韩mp4| 夜夜揉揉日日人人青青一国产精品| 色狠狠一区二区| 亚洲成人综合在线| 精品日韩欧美在线| 国产成人99久久亚洲综合精品| 91精品国产一区二区| 亚洲综合久久av| 欧美美女网站色| 日本在线观看不卡视频| 欧美视频一区在线| 国产又黄又大久久| 国产精品污网站| 在线精品视频一区二区三四| 午夜精品一区二区三区电影天堂 | 亚洲成av人综合在线观看| 日本韩国欧美一区二区三区| 一区二区三区在线视频观看| 欧美顶级少妇做爰| 成人精品国产福利| 天天综合日日夜夜精品| 欧美高清在线视频| 91精品免费在线| 99热在这里有精品免费| 亚洲摸摸操操av| 久久亚洲精品国产精品紫薇| 在线免费不卡视频| 国产成人av资源| 日韩av网站免费在线| 亚洲少妇30p| 日本一区二区视频在线| 日韩精品一区二区三区四区 | 国产精品1区2区3区在线观看| 亚洲综合色区另类av| 中文字幕亚洲在| 久久久久久久久伊人| 日韩一卡二卡三卡四卡| 91麻豆免费看| 国产ts人妖一区二区| 极品美女销魂一区二区三区免费| 亚洲h动漫在线| 亚洲小说春色综合另类电影| 亚洲国产高清不卡| 久久久精品tv| 国产欧美日韩精品一区| 欧美日韩亚洲综合在线| 欧美三级视频在线| 日本乱人伦aⅴ精品| av不卡在线播放| 91麻豆6部合集magnet| 成人h动漫精品一区二| 国产成人欧美日韩在线电影| 国产精品一区三区| 精品一区二区三区视频| 美女视频免费一区| 成人听书哪个软件好| 极品美女销魂一区二区三区| 麻豆精品一二三| 国产suv精品一区二区6| 一本久久综合亚洲鲁鲁五月天 | 91美女视频网站| 91免费观看在线| 欧美视频一区二区| 91精品国产品国语在线不卡| 7777精品伊人久久久大香线蕉最新版| 欧美午夜宅男影院| 欧美mv日韩mv| 国产精品情趣视频| 亚洲成人久久影院| 国产黄人亚洲片| 成人免费的视频| 欧美日韩在线播放三区四区| www国产精品av| 亚洲男女一区二区三区| 国模娜娜一区二区三区| 99精品欧美一区二区三区综合在线| av爱爱亚洲一区| 欧美成人一区二区| 一区二区三区在线观看动漫| 免费观看在线综合色| 欧美曰成人黄网| 久久久久久亚洲综合| 亚洲电影中文字幕在线观看| 国产乱码精品一区二区三区av| 欧美色涩在线第一页| 精品乱人伦小说| 日韩av电影免费观看高清完整版 | 国产一区不卡在线| 欧美在线小视频| 国产精品久久久久久久久免费樱桃| 日韩专区一卡二卡| 日本道免费精品一区二区三区| 欧美精选一区二区| 亚洲一区二区三区四区的| 国产盗摄女厕一区二区三区| 成人综合在线视频| 精品日本一线二线三线不卡| 日韩国产在线观看| 欧美无砖砖区免费| 国产精品久久免费看| 国产99久久久久| 久久无码av三级| 狠狠网亚洲精品| 久久综合给合久久狠狠狠97色69| 视频一区视频二区中文| av电影一区二区| 亚洲国产高清aⅴ视频| 不卡的av电影在线观看| 国产偷v国产偷v亚洲高清| 成人精品一区二区三区中文字幕| 久久久精品黄色| 成人美女视频在线看| 亚洲欧美在线高清| 在线日韩av片| 日韩高清不卡一区二区| 欧美成人性战久久| 蜜臀av一区二区三区| 久久综合九色综合欧美亚洲| 国产91丝袜在线播放九色| 中文字幕一区二区三区在线不卡| 97久久精品人人做人人爽50路| 亚洲精品福利视频网站| 91精彩视频在线观看| 日韩电影在线观看电影| 亚洲精品一区二区三区香蕉| 国产xxx精品视频大全| 亚洲欧美另类小说| 6080yy午夜一二三区久久| 激情综合网激情| 亚洲一卡二卡三卡四卡五卡| 日韩欧美国产三级| 色综合久久久久久久久| 日韩不卡一二三区| 国产精品午夜久久| 777a∨成人精品桃花网| 99久久久国产精品| 色视频一区二区| 国产乱码一区二区三区| 天天综合网天天综合色| 国产亚洲欧美在线| 色老综合老女人久久久| 毛片基地黄久久久久久天堂| 国产精品国产三级国产专播品爱网 | 美女任你摸久久| 精品国产乱码久久久久久图片|