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

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

?? auth_ntlm.c

?? 代理服務器 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);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产免费人成电影在线观看四季 | 国产精品麻豆网站| 国产高清久久久久| 国产亚洲婷婷免费| 成人毛片在线观看| 中文字幕一区二区三区av| av资源网一区| 经典三级在线一区| 日韩精品一区二区三区swag| 国产精品亚洲一区二区三区在线| 国产日韩欧美a| 99re热视频这里只精品| 性感美女久久精品| 欧美变态tickle挠乳网站| 国产91丝袜在线18| 亚洲一区二区美女| 337p亚洲精品色噜噜| 国内精品国产成人国产三级粉色| 国产亚洲一区二区三区四区| 97se亚洲国产综合在线| 亚洲国产视频直播| 日韩精品中文字幕一区二区三区 | 欧美va天堂va视频va在线| 丰满亚洲少妇av| 亚洲已满18点击进入久久| 精品国内片67194| 成人小视频免费在线观看| 一区二区三区精品在线| 亚洲精品一区在线观看| 成人国产亚洲欧美成人综合网| 亚洲国产精品久久久男人的天堂| 亚洲精品一区二区在线观看| 91国偷自产一区二区使用方法| 美女视频网站久久| 亚洲免费观看在线观看| 久久这里只有精品视频网| 色综合天天视频在线观看| 日韩国产欧美三级| 国产区在线观看成人精品| 欧美日韩不卡视频| 国产精品亚洲视频| 日韩av中文在线观看| 日本一区二区三区四区| 欧美少妇bbb| 国产精品91一区二区| 夜夜嗨av一区二区三区网页| 精品国产一二三区| 91天堂素人约啪| 综合激情成人伊人| 欧美二区三区的天堂| 国产九色sp调教91| 亚洲电影一级黄| 国产女人水真多18毛片18精品视频| 91久久精品网| 国产成人av电影在线观看| 天天综合色天天| 亚洲视频一二三| 欧美性色黄大片| 成人黄色国产精品网站大全在线免费观看| 88在线观看91蜜桃国自产| 久久成人免费网站| 亚洲一区二区三区视频在线| 中文字幕在线不卡一区| 久久色视频免费观看| 欧美一级久久久久久久大片| 欧洲一区二区三区在线| 成人av网站免费| 精品系列免费在线观看| 石原莉奈在线亚洲三区| 日本一区二区三区四区在线视频| 精品奇米国产一区二区三区| 91麻豆免费观看| 成人免费高清视频在线观看| 老司机免费视频一区二区 | 精品中文av资源站在线观看| 亚洲综合999| 亚洲人成伊人成综合网小说| 久久精品视频网| 欧美mv日韩mv国产网站| 欧美一区二区在线观看| 欧美日韩国产欧美日美国产精品| 色哦色哦哦色天天综合| 国产成人av福利| 美女一区二区视频| 天堂成人免费av电影一区| 亚洲一区自拍偷拍| 亚洲国产日韩综合久久精品| 午夜精品福利视频网站| 日韩影视精彩在线| 裸体在线国模精品偷拍| 免费人成在线不卡| 精品一区二区三区欧美| 国产福利精品一区| 成人精品视频网站| hitomi一区二区三区精品| 国产·精品毛片| kk眼镜猥琐国模调教系列一区二区| 成人性生交大合| 99re这里只有精品6| 色网综合在线观看| 欧美精品vⅰdeose4hd| 欧美一区二区福利视频| 欧美xxx久久| 欧美国产1区2区| 亚洲乱码中文字幕| 亚洲www啪成人一区二区麻豆| 午夜私人影院久久久久| 美女视频黄频大全不卡视频在线播放| 亚洲高清久久久| 午夜精品久久一牛影视| 婷婷久久综合九色国产成人| 日韩黄色一级片| 国产乱码精品1区2区3区| 成人国产电影网| 在线电影院国产精品| 欧美激情一区二区三区蜜桃视频 | 精品va天堂亚洲国产| 国产欧美精品一区aⅴ影院 | 欧美一区二区美女| 精品区一区二区| 亚洲欧美日韩电影| 亚洲bdsm女犯bdsm网站| 韩国毛片一区二区三区| 91在线一区二区三区| 99精品国产91久久久久久| 欧美日韩第一区日日骚| 久久午夜色播影院免费高清| 日韩美女视频19| 麻豆久久久久久| 色哟哟亚洲精品| 精品少妇一区二区三区在线视频 | 日韩视频免费观看高清在线视频| 国产亚洲美州欧州综合国| 亚洲精品中文字幕在线观看| 久久av中文字幕片| 欧美日韩亚洲不卡| 中文字幕在线不卡一区| 国产精品香蕉一区二区三区| 欧美日韩午夜在线| 一区免费观看视频| 国产成人av网站| 精品国产乱码久久| 亚洲香肠在线观看| 成人一区在线看| 日韩欧美国产三级| 亚洲一二三四久久| 精品夜夜嗨av一区二区三区| 欧美日韩色综合| 国产精品二三区| 狠狠色狠狠色综合| 欧美日韩小视频| 亚洲免费av在线| 成人免费黄色大片| 中文字幕精品在线不卡| 久久se这里有精品| 91精品国产高清一区二区三区| 日韩理论片网站| 国产成人在线影院 | 一区二区三区国产| 91网址在线看| 国产精品久久久久久久岛一牛影视| 日韩成人av影视| 色婷婷精品久久二区二区蜜臀av| 国产精品不卡在线观看| av一二三不卡影片| 亚洲欧洲av另类| 色婷婷精品久久二区二区蜜臂av| 中文字幕佐山爱一区二区免费| 99国产精品久久久久久久久久 | 天天综合色天天| 91精品国产一区二区人妖| 亚洲一区在线观看视频| 91丨九色丨蝌蚪丨老版| 欧美丝袜第三区| 99v久久综合狠狠综合久久| 蜜桃视频第一区免费观看| 亚洲成人免费在线| 国产亚洲制服色| 亚洲激情中文1区| 国产精品99久| 国产无遮挡一区二区三区毛片日本| 美女视频黄久久| 日韩欧美国产小视频| 黑人精品欧美一区二区蜜桃| 6080亚洲精品一区二区| 日韩av成人高清| 日韩手机在线导航| 精品一区二区av| 国产午夜精品一区二区三区嫩草| 国产一二精品视频| 亚洲欧美一区二区视频| 成人免费视频免费观看| 久久精品亚洲麻豆av一区二区| 国产成人av电影在线观看| 亚洲欧美色综合| 日韩色在线观看| 日韩在线一区二区| 久久久91精品国产一区二区精品| 国产成人亚洲综合a∨猫咪| 国产精品美女久久久久久久|