void
AuthBasicConfig::done()
{
- helperFree(basicauthenticators);
- basicauthenticators = NULL;
+ authbasic_initialised = 0;
+
+ if (basicauthenticators) {
+ helperShutdown(basicauthenticators);
+ }
+
++ delete basicauthenticators;
++ basicauthenticators = NULL;
++
if (authenticate)
wordlistDestroy(&authenticate);
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");
}
safe_free(digestAuthRealm);
}
-
- AuthDigestConfig::AuthDigestConfig()
+ AuthDigestConfig::AuthDigestConfig() : authenticateChildren(20,0,1,1)
{
/* TODO: move into initialisation list */
- authenticateChildren = 5;
+ authenticate = NULL;
/* 5 minutes */
nonceGCInterval = 5 * 60;
/* 30 minutes */
*
*/
-/**
- \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);
}
}
- 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
*
*/
-/* 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);
}
}
- 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