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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? auth_ntlm.c

?? 代理服務(wù)器 squid-2.6.STABLE16
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * $Id: auth_ntlm.c,v 1.37.2.4 2007/08/31 14:08:53 hno Exp $ * * DEBUG: section 29    NTLM 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_ntlm.h"extern AUTHSSETUP authSchemeSetup_ntlm;static voidauthenticateStateFree(authenticateStateData * r){    authenticateAuthUserRequestUnlock(r->auth_user_request);    r->auth_user_request = NULL;    cbdataFree(r);}/* NTLM Scheme */static HLPSCB authenticateNTLMHandleReply;static AUTHSACTIVE authenticateNTLMActive;static AUTHSAUTHED authNTLMAuthenticated;static AUTHSAUTHUSER authenticateNTLMAuthenticateUser;static AUTHSCONFIGURED authNTLMConfigured;static AUTHSFIXERR authenticateNTLMFixErrorHeader;static AUTHSFREE authenticateNTLMFreeUser;static AUTHSDIRECTION authenticateNTLMDirection;static AUTHSDECODE authenticateDecodeNTLMAuth;static AUTHSDUMP authNTLMCfgDump;static AUTHSFREECONFIG authNTLMFreeConfig;static AUTHSINIT authNTLMInit;static AUTHSONCLOSEC authenticateNTLMOnCloseConnection;static AUTHSUSERNAME authenticateNTLMUsername;static AUTHSREQFREE authNTLMAURequestFree;static AUTHSPARSE authNTLMParse;static AUTHSCHECKCONFIG authNTLMCheckConfig;static AUTHSSTART authenticateNTLMStart;static AUTHSSTATS authenticateNTLMStats;static AUTHSSHUTDOWN authNTLMDone;static statefulhelper *ntlmauthenticators = NULL;CBDATA_TYPE(authenticateStateData);static int authntlm_initialised = 0;static MemPool *ntlm_user_pool = NULL;static MemPool *ntlm_request_pool = NULL;static auth_ntlm_config *ntlmConfig = NULL;static void authenticateNTLMReleaseServer(ntlm_request_t * ntlm_request);static int authenticateNTLMcmpUsername(ntlm_user_t * u1, ntlm_user_t * u2);/* * * Private Functions * */static voidauthNTLMDone(void){    debug(29, 2) ("authNTLMDone: shutting down NTLM authentication.\n");    if (ntlmauthenticators)	helperStatefulShutdown(ntlmauthenticators);    authntlm_initialised = 0;    if (!shutting_down)	return;    if (ntlmauthenticators)	helperStatefulFree(ntlmauthenticators);    ntlmauthenticators = NULL;    if (ntlm_request_pool) {	memPoolDestroy(ntlm_request_pool);	ntlm_request_pool = NULL;    }    if (ntlm_user_pool) {	memPoolDestroy(ntlm_user_pool);	ntlm_user_pool = NULL;    }    debug(29, 2) ("authNTLMDone: NTLM authentication Shutdown.\n");}/* free any allocated configuration details */static voidauthNTLMFreeConfig(authScheme * scheme){    if (ntlmConfig == NULL)	return;    assert(ntlmConfig == scheme->scheme_data);    if (ntlmConfig->authenticate)	wordlistDestroy(&ntlmConfig->authenticate);    safe_free(ntlmConfig);    scheme->scheme_data = NULL;}static voidauthNTLMCfgDump(StoreEntry * entry, const char *name, authScheme * scheme){    auth_ntlm_config *config = scheme->scheme_data;    wordlist *list = config->authenticate;    storeAppendPrintf(entry, "%s %s program", name, "ntlm");    while (list != NULL) {	storeAppendPrintf(entry, " %s", list->key);	list = list->next;    }    storeAppendPrintf(entry, "\n");    storeAppendPrintf(entry, "%s %s children %d\n", name, "ntlm", config->authenticateChildren);    storeAppendPrintf(entry, "%s %s keep_alive %s\n", name, "ntlm", config->keep_alive ? "on" : "off");}static voidauthNTLMParse(authScheme * scheme, int n_configured, char *param_str){    if (scheme->scheme_data == NULL) {	assert(ntlmConfig == NULL);	/* this is the first param to be found */	scheme->scheme_data = xmalloc(sizeof(auth_ntlm_config));	memset(scheme->scheme_data, 0, sizeof(auth_ntlm_config));	ntlmConfig = scheme->scheme_data;	ntlmConfig->authenticateChildren = 5;	ntlmConfig->keep_alive = 1;    }    ntlmConfig = scheme->scheme_data;    if (strcasecmp(param_str, "program") == 0) {	if (ntlmConfig->authenticate)	    wordlistDestroy(&ntlmConfig->authenticate);	parse_wordlist(&ntlmConfig->authenticate);    } else if (strcasecmp(param_str, "children") == 0) {	parse_int(&ntlmConfig->authenticateChildren);    } else if (strcasecmp(param_str, "keep_alive") == 0) {	parse_onoff(&ntlmConfig->keep_alive);    } else {	debug(29, 0) ("unrecognised ntlm auth scheme parameter '%s'\n", param_str);    }}static voidauthNTLMCheckConfig(authScheme * scheme){    auth_ntlm_config *config = scheme->scheme_data;    requirePathnameExists("authparam ntlm program", config->authenticate->key);}voidauthSchemeSetup_ntlm(authscheme_entry_t * authscheme){    assert(!authntlm_initialised);    authscheme->Active = authenticateNTLMActive;    authscheme->configured = authNTLMConfigured;    authscheme->parse = authNTLMParse;    authscheme->checkconfig = authNTLMCheckConfig;    authscheme->dump = authNTLMCfgDump;    authscheme->requestFree = authNTLMAURequestFree;    authscheme->freeconfig = authNTLMFreeConfig;    authscheme->init = authNTLMInit;    authscheme->authAuthenticate = authenticateNTLMAuthenticateUser;    authscheme->authenticated = authNTLMAuthenticated;    authscheme->authFixHeader = authenticateNTLMFixErrorHeader;    authscheme->FreeUser = authenticateNTLMFreeUser;    authscheme->authStart = authenticateNTLMStart;    authscheme->authStats = authenticateNTLMStats;    authscheme->authUserUsername = authenticateNTLMUsername;    authscheme->getdirection = authenticateNTLMDirection;    authscheme->decodeauth = authenticateDecodeNTLMAuth;    authscheme->donefunc = authNTLMDone;    authscheme->oncloseconnection = authenticateNTLMOnCloseConnection;}/* Initialize helpers and the like for this auth scheme. Called AFTER parsing the * config file */static voidauthNTLMInit(authScheme * scheme){    static int ntlminit = 0;    if (ntlmConfig->authenticate) {	/*	 * disable client side request pipelining. There is a race with	 * NTLM when the client sends a second request on an NTLM	 * connection before the authenticate challenge is sent. With	 * this patch, the client may fail to authenticate, but squid's	 * state will be preserved.	 */	if (ntlmConfig->authenticate && Config.onoff.pipeline_prefetch != 0) {	    debug(29, 1) ("pipeline prefetching incompatile with NTLM authentication. Disabling pipeline_prefetch\n");	    Config.onoff.pipeline_prefetch = 0;	}	if (!ntlm_user_pool)	    ntlm_user_pool = memPoolCreate("NTLM Scheme User Data", sizeof(ntlm_user_t));	if (!ntlm_request_pool)	    ntlm_request_pool = memPoolCreate("NTLM Scheme Request Data", sizeof(ntlm_request_t));	authntlm_initialised = 1;	if (ntlmauthenticators == NULL)	    ntlmauthenticators = helperStatefulCreate("ntlmauthenticator");	ntlmauthenticators->cmdline = ntlmConfig->authenticate;	ntlmauthenticators->n_to_start = ntlmConfig->authenticateChildren;	ntlmauthenticators->ipc_type = IPC_STREAM;	helperStatefulOpenServers(ntlmauthenticators);	if (!ntlminit) {	    cachemgrRegister("ntlmauthenticator",		"NTLM User Authenticator Stats",		authenticateNTLMStats, 0, 1);	    ntlminit++;	}	CBDATA_INIT_TYPE(authenticateStateData);    }}static intauthenticateNTLMActive(){    return (authntlm_initialised == 1) ? 1 : 0;}static intauthNTLMConfigured(){    if (ntlmConfig == NULL) {	debug(29, 9) ("authNTLMConfigured: not configured\n");	return 0;    }    if (ntlmConfig->authenticate == NULL) {	debug(29, 9) ("authNTLMConfigured: no helper\n");	return 0;    }    if (ntlmConfig->authenticateChildren == 0) {	debug(29, 9) ("authNTLMConfigured: no helper children\n");	return 0;    }    debug(29, 9) ("authNTLMConfigured: returning configured\n");    return 1;}/* NTLM Scheme */static intauthenticateNTLMDirection(auth_user_request_t * auth_user_request){    ntlm_request_t *ntlm_request = auth_user_request->scheme_data;    /* null auth_user is checked for by authenticateDirection */    if (ntlm_request->waiting || ntlm_request->client_blob)	return -1;		/* Need helper response to continue */    switch (ntlm_request->auth_state) {    case AUTHENTICATE_STATE_NONE:	/* no progress at all. */	debug(29, 1) ("authenticateNTLMDirection: called before NTLM Authenticate!. Report a bug to squid-dev. au %p\n", auth_user_request);	return -2;    case AUTHENTICATE_STATE_NEGOTIATE:		/* send to client */	assert(ntlm_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) ("authenticateNTLMDirection: Unexpected AUTHENTICATE_STATE_INITIAL\n");	return -2;    }    return -2;}/* * Send the authenticate error header(s). Note: IE has a bug and the NTLM header * must be first. To ensure that, the configure use --enable-auth=ntlm, anything * else. */static voidauthenticateNTLMFixErrorHeader(auth_user_request_t * auth_user_request, HttpReply * rep, http_hdr_type type, request_t * request){    ntlm_request_t *ntlm_request;    if (!ntlmConfig->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) ("authenticateNTLMFixErrorHeader: Sending type:%d header: 'NTLM'\n", type);	httpHeaderPutStrf(&rep->header, type, "NTLM");	if (!ntlmConfig->keep_alive) {	    /* drop the connection */	    httpHeaderDelByName(&rep->header, "keep-alive");	    request->flags.proxy_keepalive = 0;	}	return;    }    ntlm_request = auth_user_request->scheme_data;    switch (ntlm_request->auth_state) {    case AUTHENTICATE_STATE_NONE:    case AUTHENTICATE_STATE_FAILED:	debug(29, 9) ("authenticateNTLMFixErrorHeader: Sending type:%d header: 'NTLM'\n", type);	httpHeaderPutStrf(&rep->header, type, "NTLM");	/* 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) ("authenticateNTLMFixErrorHeader: Sending type:%d header: 'NTLM %s'\n", type, ntlm_request->server_blob);	httpHeaderPutStrf(&rep->header, type, "NTLM %s", ntlm_request->server_blob);	safe_free(ntlm_request->server_blob);	break;    case AUTHENTICATE_STATE_DONE:	/* Special case when authentication finished, but not allowed by ACL */	debug(29, 9) ("authenticateNTLMFixErrorHeader: Sending type:%d header: 'NTLM'\n", type);	httpHeaderPutStrf(&rep->header, type, "NTLM");	break;    default:	debug(29, 0) ("authenticateNTLMFixErrorHeader: state %d.\n", ntlm_request->auth_state);	fatal("unexpected state in AuthenticateNTLMFixErrorHeader.\n");    }}static voidauthNTLMRequestFree(ntlm_request_t * ntlm_request){    if (!ntlm_request)	return;    safe_free(ntlm_request->server_blob);    safe_free(ntlm_request->client_blob);    if (ntlm_request->authserver != NULL) {	debug(29, 9) ("authenticateNTLMRequestFree: releasing server '%p'\n", ntlm_request->authserver);	authenticateNTLMReleaseServer(ntlm_request);    }    if (ntlm_request->request) {	requestUnlink(ntlm_request->request);	ntlm_request->request = NULL;    }    memPoolFree(ntlm_request_pool, ntlm_request);}static voidauthNTLMAURequestFree(auth_user_request_t * auth_user_request){    if (auth_user_request->scheme_data)	authNTLMRequestFree((ntlm_request_t *) auth_user_request->scheme_data);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av在线资源| 欧美另类一区二区三区| 亚洲sss视频在线视频| 欧美www视频| 91碰在线视频| 国产精一区二区三区| 亚洲电影在线免费观看| 国产精品午夜电影| 日韩欧美高清在线| 欧美在线不卡视频| 成人网男人的天堂| 精品一区二区三区视频在线观看| 亚洲精品欧美综合四区| 国产色婷婷亚洲99精品小说| 欧美一区二区日韩| 欧美日韩另类一区| 色狠狠综合天天综合综合| 国产精品中文字幕欧美| 麻豆精品一区二区av白丝在线| 一区二区视频在线看| 欧美经典一区二区| 精品国产制服丝袜高跟| 欧美一区二区三区视频免费播放| 91成人免费网站| 色综合久久88色综合天天6 | 亚洲日本va在线观看| 欧美精品一区二区在线观看| 在线成人免费观看| 欧美日韩一级视频| 欧美性猛片xxxx免费看久爱| 91视频在线观看免费| 成人v精品蜜桃久久一区| 国产米奇在线777精品观看| 美女网站色91| 九色综合狠狠综合久久| 免费的国产精品| 蜜桃av一区二区| 久久精品国产99久久6| 蜜桃视频在线一区| 免费看精品久久片| 精品在线免费视频| 久久国产综合精品| 国产一区二区在线影院| 国产乱人伦偷精品视频免下载| 美女脱光内衣内裤视频久久网站| 蜜桃久久久久久| 国内成+人亚洲+欧美+综合在线| 久久精品二区亚洲w码| 狠狠v欧美v日韩v亚洲ⅴ| 精久久久久久久久久久| 国产高清成人在线| va亚洲va日韩不卡在线观看| 91亚洲精品久久久蜜桃网站| 在线观看免费一区| 4438x亚洲最大成人网| 精品日韩欧美在线| 日本一区免费视频| 亚洲精品免费播放| 日韩在线一二三区| 久久精品国产久精国产| 国产成人精品亚洲日本在线桃色| 成人丝袜18视频在线观看| 一本一道久久a久久精品综合蜜臀| 色系网站成人免费| 91精品国产综合久久香蕉麻豆 | 欧美一级欧美三级在线观看| 精品国产髙清在线看国产毛片| 精品国产百合女同互慰| 国产欧美日韩久久| 亚洲五码中文字幕| 激情五月婷婷综合| 91美女视频网站| 3atv一区二区三区| 日本一区二区视频在线观看| 一级做a爱片久久| 理论片日本一区| 99久久婷婷国产| 欧美精品1区2区| 国产精品美女久久久久久久网站| 亚洲精品久久久久久国产精华液| 日本在线不卡一区| 成人午夜激情在线| 欧美精选一区二区| 国产精品久久久久影院亚瑟 | 一片黄亚洲嫩模| 精品一区二区三区不卡 | 高清国产一区二区三区| 91久久精品网| 久久久夜色精品亚洲| 一区二区三区欧美| 国产在线国偷精品免费看| 色婷婷国产精品综合在线观看| 欧美大片拔萝卜| 一区二区免费看| 不卡一区在线观看| 日韩写真欧美这视频| 一区二区三区影院| 国产精品自拍av| 91精品国产免费| 亚洲乱码国产乱码精品精小说| 国产一区二区三区精品视频| 欧美午夜免费电影| 中文字幕一区二区日韩精品绯色| 久久精品国产99| 欧美日韩国产免费一区二区| 亚洲欧洲av另类| 国产一区二区三区免费看| 欧美在线观看一二区| 国产精品久久久爽爽爽麻豆色哟哟| 麻豆精品在线视频| 欧美区一区二区三区| 亚洲欧美日韩电影| 成人一区二区三区视频| 精品国精品国产尤物美女| 亚洲高清久久久| 一本久久a久久免费精品不卡| 国产日韩欧美精品综合| 精一区二区三区| 日韩一级免费一区| 天堂一区二区在线| 欧美熟乱第一页| 一区二区高清视频在线观看| 不卡av免费在线观看| 久久精品欧美一区二区三区不卡 | 亚洲丝袜另类动漫二区| 国产mv日韩mv欧美| 久久精品一二三| 国产传媒日韩欧美成人| 欧美成人r级一区二区三区| 蜜桃精品在线观看| 91精品国产aⅴ一区二区| 亚洲aaa精品| 51精品视频一区二区三区| 午夜精品福利久久久| 欧美色涩在线第一页| 亚洲成av人片观看| 欧美日韩精品一区二区三区四区 | 99国产欧美另类久久久精品| 国产精品久久久久永久免费观看| 国产成人午夜电影网| 日本一区二区久久| 成人高清视频免费观看| 中文字幕一区二区三区视频| 成人av电影在线| 亚洲美女淫视频| 欧美视频在线一区| 亚洲国产精品久久人人爱| 欧美日韩精品一区二区三区蜜桃| 五月激情综合婷婷| 欧美一区二区三区色| 国内偷窥港台综合视频在线播放| 欧美www视频| 成人午夜视频福利| 亚洲精品日产精品乱码不卡| 欧美在线一二三| 丝袜亚洲另类欧美| 久久综合久色欧美综合狠狠| 豆国产96在线|亚洲| 亚洲视频在线一区观看| 欧美午夜精品理论片a级按摩| 天天做天天摸天天爽国产一区 | 亚洲乱码国产乱码精品精的特点| 色欧美乱欧美15图片| 日韩成人一区二区| 久久久久久夜精品精品免费| av电影天堂一区二区在线观看| 亚洲综合免费观看高清完整版| 在线成人av网站| 粉嫩13p一区二区三区| 一个色在线综合| 欧美xxxxx裸体时装秀| 成人动漫一区二区三区| 亚洲成人动漫一区| 欧美精品一区二区三区蜜臀| 97久久超碰国产精品电影| 亚洲电影第三页| 精品国产91久久久久久久妲己 | av成人老司机| 日韩在线卡一卡二| 国产精品久久午夜| 91麻豆精品国产| 99久久久久久| 精品中文字幕一区二区| 日韩美女啊v在线免费观看| 欧美一区二区三区日韩视频| 成人爱爱电影网址| 美女一区二区三区在线观看| 一区在线中文字幕| 精品国产一区二区三区四区四| 91在线小视频| 经典三级视频一区| 亚洲综合男人的天堂| 久久久精品影视| 91精品在线麻豆| 在线影视一区二区三区| 国产91高潮流白浆在线麻豆| 水蜜桃久久夜色精品一区的特点| 中国av一区二区三区| 欧美xxxx在线观看| 欧美人与z0zoxxxx视频|