From: Amos Jeffries Date: Sun, 17 Jan 2010 12:12:50 +0000 (+1300) Subject: Merge from trunk X-Git-Tag: SQUID_3_2_0_1~167^2~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed3ef6a87a3685e4a9142b967a782ee1eafce42c;p=thirdparty%2Fsquid.git Merge from trunk --- ed3ef6a87a3685e4a9142b967a782ee1eafce42c diff --cc src/auth/basic/auth_basic.cc index 9ff0a3eceb,d3bb42138d..9bffc1b1ec --- a/src/auth/basic/auth_basic.cc +++ b/src/auth/basic/auth_basic.cc @@@ -198,14 -221,6 +198,15 @@@ AuthBasicConfig::fixHeader(AuthUserRequ void AuthBasicConfig::done() { + authbasic_initialised = 0; + + if (basicauthenticators) { + helperShutdown(basicauthenticators); - helperFree(basicauthenticators); - basicauthenticators = NULL; + } + ++ delete basicauthenticators; ++ basicauthenticators = NULL; ++ if (authenticate) wordlistDestroy(&authenticate); @@@ -292,14 -306,10 +292,14 @@@ AuthBasicConfig::dump(StoreEntry * entr storeAppendPrintf(entry, "%s basic casesensitive %s\n", name, casesensitive ? "on" : "off"); } -AuthBasicConfig::AuthBasicConfig() : authenticateChildren(20,0,1,1) +AuthBasicConfig::AuthBasicConfig() : - authenticateChildren(5), ++ authenticateChildren(20,0,1,1), + authenticateConcurrency(1), + authenticate(NULL), + credentialsTTL( 2*60*60 ), + casesensitive(0), + utf8(0) { - /* TODO: move into initialisation list */ - credentialsTTL = 2 * 60 * 60; /* two hours */ basicAuthRealm = xstrdup("Squid proxy-caching web server"); } diff --cc src/auth/digest/auth_digest.cc index 3d91cf22c5,879a3c8e5e..5378ce027f --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@@ -903,12 -904,9 +901,10 @@@ AuthDigestConfig::done( safe_free(digestAuthRealm); } - - AuthDigestConfig::AuthDigestConfig() + AuthDigestConfig::AuthDigestConfig() : authenticateChildren(20,0,1,1) { /* TODO: move into initialisation list */ + authenticate = NULL; - authenticateChildren = 5; /* 5 minutes */ nonceGCInterval = 5 * 60; /* 30 minutes */ diff --cc src/auth/negotiate/auth_negotiate.cc index 014f87723e,59da54ca0b..d318b3ed04 --- a/src/auth/negotiate/auth_negotiate.cc +++ b/src/auth/negotiate/auth_negotiate.cc @@@ -94,17 -94,33 +94,27 @@@ static hash_table *proxy_auth_cache = N * */ -/** - \ingroup AuthNegotiateInternal - \todo move to negotiateScheme.cc - */ void -negotiateScheme::done() +AuthNegotiateConfig::done() { - /* TODO: this should be a Config call. */ - debugs(29, 2, "negotiateScheme::done: shutting down Negotiate authentication."); + authnegotiate_initialised = 0; - if (negotiateauthenticators) + if (negotiateauthenticators) { helperStatefulShutdown(negotiateauthenticators); - helperStatefulFree(negotiateauthenticators); - negotiateauthenticators = NULL; - - authnegotiate_initialised = 0; + } + if (!shutting_down) + return; + + delete negotiateauthenticators; + negotiateauthenticators = NULL; + + debugs(29, 2, "negotiateScheme::done: Negotiate authentication Shutdown."); + } + + void + AuthNegotiateConfig::done() + { if (authenticate) wordlistDestroy(&authenticate); } @@@ -126,7 -142,7 +136,7 @@@ AuthNegotiateConfig::dump(StoreEntry * } - AuthNegotiateConfig::AuthNegotiateConfig() : authenticateChildren(5), keep_alive(1), authenticate(NULL) -AuthNegotiateConfig::AuthNegotiateConfig() : authenticateChildren(20,0,1,1), keep_alive(1) ++AuthNegotiateConfig::AuthNegotiateConfig() : authenticateChildren(20,0,1,1), keep_alive(1), authenticate(NULL) { } void diff --cc src/auth/ntlm/auth_ntlm.cc index d3255e6cd3,c685dc0bdb..8e45709a11 --- a/src/auth/ntlm/auth_ntlm.cc +++ b/src/auth/ntlm/auth_ntlm.cc @@@ -74,18 -78,31 +74,29 @@@ static hash_table *proxy_auth_cache = N * */ -/* move to ntlmScheme.cc */ +/* free any allocated configuration details */ void -ntlmScheme::done() +AuthNTLMConfig::done() { - /* TODO: this should be a Config call. */ - debugs(29, 2, "ntlmScheme::done: shutting down NTLM authentication."); + authntlm_initialised = 0; - if (ntlmauthenticators) + if (ntlmauthenticators) { helperStatefulShutdown(ntlmauthenticators); - helperStatefulFree(ntlmauthenticators); - ntlmauthenticators = NULL; - - authntlm_initialised = 0; + } + if (!shutting_down) + return; + + delete ntlmauthenticators; + ntlmauthenticators = NULL; + + debugs(29, 2, "ntlmScheme::done: NTLM authentication Shutdown."); + } + + /* free any allocated configuration details */ + void + AuthNTLMConfig::done() + { if (authenticate) wordlistDestroy(&authenticate); } @@@ -107,7 -124,7 +118,7 @@@ AuthNTLMConfig::dump(StoreEntry * entry } - AuthNTLMConfig::AuthNTLMConfig() : authenticateChildren(5), keep_alive(1), authenticate(NULL) -AuthNTLMConfig::AuthNTLMConfig() : authenticateChildren(20,0,1,1), keep_alive(1) ++AuthNTLMConfig::AuthNTLMConfig() : authenticateChildren(20,0,1,1), keep_alive(1), authenticate(NULL) { } void