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

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

?? auth_negotiate.c

?? 代理服務器 squid-2.6.STABLE16
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * $Id: auth_negotiate.c,v 1.7.2.4 2007/08/31 14:08:53 hno Exp $ * * DEBUG: section 29    Negotiate Authenticator * AUTHOR: Robert Collins * * SQUID Web Proxy Cache          http://www.squid-cache.org/ * ---------------------------------------------------------- * *  Squid is the result of efforts by numerous individuals from *  the Internet community; see the CONTRIBUTORS file for full *  details.   Many organizations have provided support for Squid's *  development; see the SPONSORS file for full details.  Squid is *  Copyrighted (C) 2001 by the Regents of the University of *  California; see the COPYRIGHT file for full details.  Squid *  incorporates software developed and/or copyrighted by other *  sources; see the CREDITS file for full details. * *  This program is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation; either version 2 of the License, or *  (at your option) any later version. *   *  This program is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU General Public License for more details. *   *  You should have received a copy of the GNU General Public License *  along with this program; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. * *//* The functions in this file handle authentication. * They DO NOT perform access control or auditing. * See acl.c for access control and client_side.c for auditing */#include "squid.h"#include "auth_negotiate.h"extern AUTHSSETUP authSchemeSetup_negotiate;static voidauthenticateStateFree(authenticateStateData * r){    authenticateAuthUserRequestUnlock(r->auth_user_request);    r->auth_user_request = NULL;    cbdataFree(r);}/* Negotiate Scheme */static HLPSCB authenticateNegotiateHandleReply;static AUTHSACTIVE authenticateNegotiateActive;static AUTHSAUTHED authNegotiateAuthenticated;static AUTHSAUTHUSER authenticateNegotiateAuthenticateUser;static AUTHSCONFIGURED authNegotiateConfigured;static AUTHSFIXERR authenticateNegotiateFixErrorHeader;static AUTHSADDHEADER authNegotiateAddHeader;static AUTHSFREE authenticateNegotiateFreeUser;static AUTHSDIRECTION authenticateNegotiateDirection;static AUTHSDECODE authenticateDecodeNegotiateAuth;static AUTHSDUMP authNegotiateCfgDump;static AUTHSFREECONFIG authNegotiateFreeConfig;static AUTHSINIT authNegotiateInit;static AUTHSONCLOSEC authenticateNegotiateOnCloseConnection;static AUTHSUSERNAME authenticateNegotiateUsername;static AUTHSREQFREE authNegotiateAURequestFree;static AUTHSPARSE authNegotiateParse;static AUTHSCHECKCONFIG authNegotiateCheckConfig;static AUTHSSTART authenticateNegotiateStart;static AUTHSSTATS authenticateNegotiateStats;static AUTHSSHUTDOWN authNegotiateDone;static statefulhelper *negotiateauthenticators = NULL;CBDATA_TYPE(authenticateStateData);static int authnegotiate_initialised = 0;static MemPool *negotiate_user_pool = NULL;static MemPool *negotiate_request_pool = NULL;static auth_negotiate_config *negotiateConfig = NULL;static void authenticateNegotiateReleaseServer(negotiate_request_t * negotiate_request);static int authenticateNegotiatecmpUsername(negotiate_user_t * u1, negotiate_user_t * u2);/* * * Private Functions * */static voidauthNegotiateDone(void){    debug(29, 2) ("authNegotiateDone: shutting down Negotiate authentication.\n");    if (negotiateauthenticators)	helperStatefulShutdown(negotiateauthenticators);    authnegotiate_initialised = 0;    if (!shutting_down)	return;    if (negotiateauthenticators)	helperStatefulFree(negotiateauthenticators);    negotiateauthenticators = NULL;    if (negotiate_request_pool) {	memPoolDestroy(negotiate_request_pool);	negotiate_request_pool = NULL;    }    if (negotiate_user_pool) {	memPoolDestroy(negotiate_user_pool);	negotiate_user_pool = NULL;    }    debug(29, 2) ("authNegotiateDone: Negotiate authentication Shutdown.\n");}/* free any allocated configuration details */static voidauthNegotiateFreeConfig(authScheme * scheme){    if (negotiateConfig == NULL)	return;    assert(negotiateConfig == scheme->scheme_data);    if (negotiateConfig->authenticate)	wordlistDestroy(&negotiateConfig->authenticate);    safe_free(negotiateConfig);    scheme->scheme_data = NULL;}static voidauthNegotiateCfgDump(StoreEntry * entry, const char *name, authScheme * scheme){    auth_negotiate_config *config = scheme->scheme_data;    wordlist *list = config->authenticate;    storeAppendPrintf(entry, "%s %s program", name, "negotiate");    while (list != NULL) {	storeAppendPrintf(entry, " %s", list->key);	list = list->next;    }    storeAppendPrintf(entry, "\n");    storeAppendPrintf(entry, "%s %s children %d\n", name, "negotiate", config->authenticateChildren);    storeAppendPrintf(entry, "%s %s keep_alive %s\n", name, "negotiate", config->keep_alive ? "on" : "off");}static voidauthNegotiateParse(authScheme * scheme, int n_configured, char *param_str){    if (scheme->scheme_data == NULL) {	assert(negotiateConfig == NULL);	/* this is the first param to be found */	scheme->scheme_data = xmalloc(sizeof(auth_negotiate_config));	memset(scheme->scheme_data, 0, sizeof(auth_negotiate_config));	negotiateConfig = scheme->scheme_data;	negotiateConfig->authenticateChildren = 5;	negotiateConfig->keep_alive = 1;    }    negotiateConfig = scheme->scheme_data;    if (strcasecmp(param_str, "program") == 0) {	if (negotiateConfig->authenticate)	    wordlistDestroy(&negotiateConfig->authenticate);	parse_wordlist(&negotiateConfig->authenticate);    } else if (strcasecmp(param_str, "children") == 0) {	parse_int(&negotiateConfig->authenticateChildren);    } else if (strcasecmp(param_str, "keep_alive") == 0) {	parse_onoff(&negotiateConfig->keep_alive);    } else {	debug(29, 0) ("unrecognised negotiate auth scheme parameter '%s'\n", param_str);    }}static voidauthNegotiateCheckConfig(authScheme * scheme){    auth_negotiate_config *config = scheme->scheme_data;    requirePathnameExists("authparam negotiate program", config->authenticate->key);}voidauthSchemeSetup_negotiate(authscheme_entry_t * authscheme){    assert(!authnegotiate_initialised);    authscheme->Active = authenticateNegotiateActive;    authscheme->configured = authNegotiateConfigured;    authscheme->parse = authNegotiateParse;    authscheme->checkconfig = authNegotiateCheckConfig;    authscheme->dump = authNegotiateCfgDump;    authscheme->requestFree = authNegotiateAURequestFree;    authscheme->freeconfig = authNegotiateFreeConfig;    authscheme->init = authNegotiateInit;    authscheme->authAuthenticate = authenticateNegotiateAuthenticateUser;    authscheme->authenticated = authNegotiateAuthenticated;    authscheme->authFixHeader = authenticateNegotiateFixErrorHeader;    authscheme->AddHeader = authNegotiateAddHeader;    authscheme->FreeUser = authenticateNegotiateFreeUser;    authscheme->authStart = authenticateNegotiateStart;    authscheme->authStats = authenticateNegotiateStats;    authscheme->authUserUsername = authenticateNegotiateUsername;    authscheme->getdirection = authenticateNegotiateDirection;    authscheme->decodeauth = authenticateDecodeNegotiateAuth;    authscheme->donefunc = authNegotiateDone;    authscheme->oncloseconnection = authenticateNegotiateOnCloseConnection;}/* Initialize helpers and the like for this auth scheme. Called AFTER parsing the * config file */static voidauthNegotiateInit(authScheme * scheme){    static int negotiateinit = 0;    if (negotiateConfig->authenticate) {	/*	 * disable client side request pipelining. There is a race with	 * Negotiate when the client sends a second request on an Negotiate	 * connection before the authenticate challenge is sent. With	 * this patch, the client may fail to authenticate, but squid's	 * state will be preserved.	 */	if (negotiateConfig->authenticate && Config.onoff.pipeline_prefetch != 0) {	    debug(29, 1) ("pipeline prefetching incompatile with Negotiate authentication. Disabling pipeline_prefetch\n");	    Config.onoff.pipeline_prefetch = 0;	}	if (!negotiate_user_pool)	    negotiate_user_pool = memPoolCreate("Negotiate Scheme User Data", sizeof(negotiate_user_t));	if (!negotiate_request_pool)	    negotiate_request_pool = memPoolCreate("Negotiate Scheme Request Data", sizeof(negotiate_request_t));	authnegotiate_initialised = 1;	if (negotiateauthenticators == NULL)	    negotiateauthenticators = helperStatefulCreate("negotiateauthenticator");	negotiateauthenticators->cmdline = negotiateConfig->authenticate;	negotiateauthenticators->n_to_start = negotiateConfig->authenticateChildren;	negotiateauthenticators->ipc_type = IPC_STREAM;	helperStatefulOpenServers(negotiateauthenticators);	if (!negotiateinit) {	    cachemgrRegister("negotiateauthenticator",		"Negotiate User Authenticator Stats",		authenticateNegotiateStats, 0, 1);	    negotiateinit++;	}	CBDATA_INIT_TYPE(authenticateStateData);    }}static intauthenticateNegotiateActive(){    return (authnegotiate_initialised == 1) ? 1 : 0;}static intauthNegotiateConfigured(){    if (negotiateConfig == NULL) {	debug(29, 9) ("authNegotiateConfigured: not configured\n");	return 0;    }    if (negotiateConfig->authenticate == NULL) {	debug(29, 9) ("authNegotiateConfigured: no helper\n");	return 0;    }    if (negotiateConfig->authenticateChildren == 0) {	debug(29, 9) ("authNegotiateConfigured: no helper children\n");	return 0;    }    debug(29, 9) ("authNegotiateConfigured: returning configured\n");    return 1;}/* Negotiate Scheme */static intauthenticateNegotiateDirection(auth_user_request_t * auth_user_request){    negotiate_request_t *negotiate_request = auth_user_request->scheme_data;    /* null auth_user is checked for by authenticateDirection */    if (negotiate_request->waiting || negotiate_request->client_blob)	return -1;		/* Need helper response to continue */    switch (negotiate_request->auth_state) {    case AUTHENTICATE_STATE_NONE:	/* no progress at all. */	debug(29, 1) ("authenticateNegotiateDirection: called before Negotiate Authenticate!. Report a bug to squid-dev. au %p\n", auth_user_request);	return -2;    case AUTHENTICATE_STATE_NEGOTIATE:		/* send to client */	assert(negotiate_request->server_blob);	return 1;    case AUTHENTICATE_STATE_FAILED:	return -2;    case AUTHENTICATE_STATE_DONE:	/* do nothing.. */	return 0;    case AUTHENTICATE_STATE_INITIAL:	debug(29, 1) ("authenticateNegotiateDirection: Unexpected AUTHENTICATE_STATE_INITIAL\n");	return -2;    }    return -2;}/* * Send the authenticate error header(s). Note: IE has a bug and the Negotiate header * must be first. To ensure that, the configure use --enable-auth=negotiate, anything * else. */static voidauthenticateNegotiateFixErrorHeader(auth_user_request_t * auth_user_request, HttpReply * rep, http_hdr_type type, request_t * request){    negotiate_request_t *negotiate_request;    if (!negotiateConfig->authenticate)	return;    if (!request->flags.proxy_keepalive && request->flags.must_keepalive)	return;    /* New request, no user details */    if (auth_user_request == NULL) {	debug(29, 9) ("authenticateNegotiateFixErrorHeader: Sending type:%d header: 'Negotiate'\n", type);	httpHeaderPutStrf(&rep->header, type, "Negotiate");	if (!negotiateConfig->keep_alive) {	    /* drop the connection */	    httpHeaderDelByName(&rep->header, "keep-alive");	    request->flags.proxy_keepalive = 0;	}	return;    }    negotiate_request = auth_user_request->scheme_data;    switch (negotiate_request->auth_state) {    case AUTHENTICATE_STATE_NONE:    case AUTHENTICATE_STATE_FAILED:	debug(29, 9) ("authenticateNegotiateFixErrorHeader: Sending type:%d header: 'Negotiate'\n", type);	httpHeaderPutStrf(&rep->header, type, "Negotiate");	/* drop the connection */	httpHeaderDelByName(&rep->header, "keep-alive");	request->flags.proxy_keepalive = 0;	break;    case AUTHENTICATE_STATE_NEGOTIATE:	/* we are 'waiting' for a response from the client */	/* pass the blob to the client */	debug(29, 9) ("authenticateNegotiateFixErrorHeader: Sending type:%d header: 'Negotiate %s'\n", type, negotiate_request->server_blob);	httpHeaderPutStrf(&rep->header, type, "Negotiate %s", negotiate_request->server_blob);	safe_free(negotiate_request->server_blob);	break;    case AUTHENTICATE_STATE_DONE:	/* Special case when authentication finished, but not allowed by ACL */	if (negotiate_request->server_blob) {	    debug(29, 9) ("authenticateNegotiateFixErrorHeader: Sending type:%d header: 'Negotiate %s'\n", type, negotiate_request->server_blob);	    httpHeaderPutStrf(&rep->header, type, "Negotiate %s", negotiate_request->server_blob);	    safe_free(negotiate_request->server_blob);	} else {	    debug(29, 9) ("authenticateNegotiateFixErrorHeader: Connection authenticated\n");	    httpHeaderPutStrf(&rep->header, type, "Negotiate");	}	break;    default:	debug(29, 0) ("authenticateNegotiateFixErrorHeader: state %d.\n", negotiate_request->auth_state);	fatal("unexpected state in AuthenticateNegotiateFixErrorHeader.\n");    }}/* add the [proxy]authorisation header */static voidauthNegotiateAddHeader(auth_user_request_t * auth_user_request, HttpReply * rep, int accel){    int type;    negotiate_request_t *negotiate_request;    if (!auth_user_request)	return;    negotiate_request = auth_user_request->scheme_data;    if (!negotiate_request->server_blob)	return;    type = accel ? HDR_WWW_AUTHENTICATE : HDR_PROXY_AUTHENTICATE;    debug(29, 9) ("authenticateNegotiateAddHeader: Sending type:%d header: 'Negotiate %s'\n", type, negotiate_request->server_blob);    httpHeaderPutStrf(&rep->header, type, "Negotiate %s", negotiate_request->server_blob);    safe_free(negotiate_request->server_blob);}static voidauthNegotiateRequestFree(negotiate_request_t * negotiate_request){    if (!negotiate_request)	return;    safe_free(negotiate_request->server_blob);    safe_free(negotiate_request->client_blob);    if (negotiate_request->authserver != NULL) {	debug(29, 9) ("authenticateNegotiateRequestFree: releasing server '%p'\n", negotiate_request->authserver);	authenticateNegotiateReleaseServer(negotiate_request);    }    if (negotiate_request->request) {	requestUnlink(negotiate_request->request);	negotiate_request->request = NULL;    }    memPoolFree(negotiate_request_pool, negotiate_request);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩电影免费在线观看网站| 国产一区二三区好的| 琪琪久久久久日韩精品| 91精品国产综合久久婷婷香蕉| 一区二区在线免费观看| 欧美视频一区二区三区| 亚洲风情在线资源站| 91麻豆精品91久久久久久清纯| 在线免费观看成人短视频| 美女诱惑一区二区| 国产精品久久久爽爽爽麻豆色哟哟| 91网址在线看| 日本美女一区二区三区| 美腿丝袜亚洲综合| 国产伦理精品不卡| 国产精一品亚洲二区在线视频| 亚洲欧美日韩成人高清在线一区| 欧美在线免费观看视频| 欧美一区二区黄| 91日韩精品一区| 欧美性videosxxxxx| 欧美日韩国产一级片| 国产高清久久久| 亚洲一区二区在线观看视频| 欧美一区二区美女| 久久久综合激的五月天| 欧美日韩不卡一区二区| 精品国产伦一区二区三区观看体验 | 国产一区二区三区av电影| 韩国欧美国产一区| 亚洲永久精品国产| 伦理电影国产精品| 日本aⅴ精品一区二区三区 | 精品福利二区三区| 国产日产精品1区| 欧美成人猛片aaaaaaa| 欧美婷婷六月丁香综合色| 日韩一区二区麻豆国产| 欧美午夜精品久久久久久超碰 | 欧美日韩精品一区视频| 精品免费日韩av| 亚洲乱码国产乱码精品精可以看| 免费观看30秒视频久久| 成人午夜免费视频| 国产在线看一区| 在线中文字幕一区二区| 色婷婷av一区二区三区gif| 成人av动漫在线| 成人高清视频在线| 欧美一级久久久| 亚洲免费高清视频在线| 国内精品免费**视频| 欧美日韩午夜影院| 欧美三级日韩三级国产三级| 久久精品人人做人人综合| 久久亚洲精华国产精华液| 久久久久久久综合狠狠综合| 天天操天天色综合| 捆绑变态av一区二区三区| 欧美午夜精品久久久| 中文字幕一区二区不卡| 亚洲品质自拍视频| 成人中文字幕电影| 久久久亚洲欧洲日产国码αv| 午夜精品免费在线观看| 在线一区二区视频| ...xxx性欧美| 欧美亚洲综合在线| 国产精品每日更新| 一区二区三区免费在线观看| 亚洲国产sm捆绑调教视频| av影院午夜一区| 91精品久久久久久久久99蜜臂| 亚洲男帅同性gay1069| 99久久综合国产精品| 中文字幕一区在线观看视频| 粉嫩一区二区三区性色av| 一本到一区二区三区| 国产精品三级久久久久三级| 高清beeg欧美| 日韩一区欧美小说| 91小视频在线观看| 一区二区欧美精品| 欧美久久一区二区| 国产精品你懂的| 成人av电影免费在线播放| 日韩理论电影院| 久国产精品韩国三级视频| 99精品国产91久久久久久| 欧美人妇做爰xxxⅹ性高电影 | 亚洲午夜av在线| 欧美日韩高清一区二区三区| 亚洲高清一区二区三区| 7777精品伊人久久久大香线蕉经典版下载 | 亚洲免费高清视频在线| 欧美三级视频在线观看| 蜜桃视频第一区免费观看| 久久久久久久久久电影| 不卡在线视频中文字幕| 亚洲午夜三级在线| 精品久久久久久综合日本欧美| 国产不卡在线视频| 亚洲综合清纯丝袜自拍| 日韩午夜激情视频| 成人免费电影视频| 天堂成人国产精品一区| 91麻豆精品一区二区三区| 亚洲国产日韩综合久久精品| 欧美www视频| jizzjizzjizz欧美| 婷婷久久综合九色综合伊人色| 欧美成人一级视频| 91麻豆国产精品久久| 日本不卡中文字幕| 亚洲视频一区二区在线| 精品国产亚洲在线| 91浏览器在线视频| 国内精品嫩模私拍在线| 亚洲韩国一区二区三区| 久久婷婷成人综合色| 欧美三级日韩三级国产三级| 成+人+亚洲+综合天堂| 精品一区二区在线视频| 亚洲一区在线观看免费观看电影高清| 日韩美女视频在线| 精品一区二区日韩| 亚洲一区二区三区中文字幕| 久久久www免费人成精品| 日韩无一区二区| 欧美亚洲综合在线| 色婷婷久久久综合中文字幕 | 亚洲va国产天堂va久久en| 欧美亚洲动漫制服丝袜| 国产91在线观看| 精品一区二区免费视频| 日日摸夜夜添夜夜添精品视频| 国产精品乱人伦| 久久九九国产精品| 日韩视频免费直播| 欧美喷潮久久久xxxxx| 欧美制服丝袜第一页| 成人爽a毛片一区二区免费| 精品亚洲aⅴ乱码一区二区三区| 午夜av一区二区三区| 依依成人综合视频| 亚洲欧美成aⅴ人在线观看 | 91视频国产观看| 成人午夜视频免费看| 高清beeg欧美| 不卡视频在线看| 97精品国产97久久久久久久久久久久| 成人国产一区二区三区精品| 国产精品中文字幕一区二区三区| 青草av.久久免费一区| 男人的天堂久久精品| 美女精品一区二区| 激情另类小说区图片区视频区| 日韩不卡在线观看日韩不卡视频| 午夜不卡av免费| 免费观看30秒视频久久| 麻豆专区一区二区三区四区五区| 另类调教123区 | 欧美三级视频在线播放| 欧美日本在线观看| 欧美精品久久一区| 日韩免费观看2025年上映的电影| 日韩欧美成人午夜| 久久精品视频在线看| 日本一区二区三区免费乱视频| 日本一区二区三级电影在线观看| 国产精品美日韩| 亚洲午夜久久久| 日韩成人午夜电影| 国产麻豆91精品| 91视频www| 欧美一区日韩一区| 2021久久国产精品不只是精品| 国产日韩精品一区二区浪潮av| 中文字幕一区二区在线播放| 亚洲午夜免费视频| 精东粉嫩av免费一区二区三区| 成人黄色软件下载| 欧美精品在欧美一区二区少妇| 日韩欧美一级二级三级| 国产午夜精品久久| 亚洲一区二区三区四区中文字幕| 免费观看一级特黄欧美大片| 粉嫩aⅴ一区二区三区四区五区 | 日韩成人午夜精品| 国产99久久精品| 国产福利一区二区三区| 蜜臀av一区二区| 成人午夜激情在线| 欧美日韩成人在线| 中文字幕精品一区二区精品绿巨人 | 一区二区三区欧美| 国内精品久久久久影院薰衣草 | 天天综合网天天综合色| 国产精品亚洲人在线观看| 97se亚洲国产综合自在线|