--------------------- PatchSet 900 Date: 2000/12/10 00:56:51 Author: rbcollins Branch: auth_rewrite Tag: (none) Log: fixed reconfiguring and a NULL pointer reference in ntlm Members: src/authenticate.c:1.1.1.3.12.17.2.8->1.1.1.3.12.17.2.9 src/auth/basic/auth_basic.c:1.1.2.4->1.1.2.5 src/auth/ntlm/auth_ntlm.c:1.1.2.13->1.1.2.14 Index: squid/src/authenticate.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/authenticate.c,v retrieving revision 1.1.1.3.12.17.2.8 retrieving revision 1.1.1.3.12.17.2.9 diff -u -r1.1.1.3.12.17.2.8 -r1.1.1.3.12.17.2.9 --- squid/src/authenticate.c 24 Nov 2000 00:01:02 -0000 1.1.1.3.12.17.2.8 +++ squid/src/authenticate.c 10 Dec 2000 00:56:51 -0000 1.1.1.3.12.17.2.9 @@ -1,6 +1,6 @@ /* - * $Id: authenticate.c,v 1.1.1.3.12.17.2.8 2000/11/24 00:01:02 rbcollins Exp $ + * $Id: authenticate.c,v 1.1.1.3.12.17.2.9 2000/12/10 00:56:51 rbcollins Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Duane Wessels @@ -241,9 +241,13 @@ authenticateShutdown(void) { int i; + debug(29,6) ("authenticateShutdown: shutting down auth schemes\n"); /* find the currently known authscheme types */ for (i = 0; authscheme_list && authscheme_list[i].typestr; i++) { - authscheme_list[i].donefunc(); + if (authscheme_list[i].donefunc !=NULL) + authscheme_list[i].donefunc(); + else + debug(29,5) ("authenticateShutdown: scheme %s has not registered a shutdown function.\n", authscheme_list[i].typestr); authscheme_list[i].typestr=NULL; } } Index: squid/src/auth/basic/auth_basic.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/basic/auth_basic.c,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- squid/src/auth/basic/auth_basic.c 21 Nov 2000 11:30:02 -0000 1.1.2.4 +++ squid/src/auth/basic/auth_basic.c 10 Dec 2000 00:56:51 -0000 1.1.2.5 @@ -78,6 +78,7 @@ static AUTHSSTART authenticateBasicStart; static AUTHSSTATS authenticateBasicStats; static AUTHSUSERNAME authenticateBasicUsername; +static AUTHSSHUTDOWN authBasicDone; static helper *basicauthenticators = NULL; Index: squid/src/auth/ntlm/auth_ntlm.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/ntlm/auth_ntlm.c,v retrieving revision 1.1.2.13 retrieving revision 1.1.2.14 diff -u -r1.1.2.13 -r1.1.2.14 --- squid/src/auth/ntlm/auth_ntlm.c 7 Dec 2000 10:46:58 -0000 1.1.2.13 +++ squid/src/auth/ntlm/auth_ntlm.c 10 Dec 2000 00:56:52 -0000 1.1.2.14 @@ -80,6 +80,7 @@ static AUTHSUSERNAME authenticateNTLMUsername; static AUTHSSTART authenticateNTLMStart; static AUTHSSTATS authenticateNTLMStats; +static AUTHSSHUTDOWN authNTLMDone; /* helper callbacks to handle per server state data */ static HLPSAVAIL authenticateNTLMHelperServerAvailable; @@ -518,7 +519,8 @@ /* and release the deferred request */ helperStatefulReleaseServer(server); server=helperStatefulDefer(ntlmauthenticators); - helperstate=helperStatefulServerGetData(server); + if (server != NULL) + helperstate=helperStatefulServerGetData(server); } if (server==NULL) debug(29,4) ("unable to get a deferred ntlm helper... all helpers are refreshing challenges. Queuing as a placeholder request.\n");