--------------------- PatchSet 1546 Date: 2001/02/10 18:14:06 Author: hno Branch: auth_rewrite Tag: (none) Log: Some minor cleanups Members: src/acl.c:1.1.1.3.12.26.2.42->1.1.1.3.12.26.2.43 src/authenticate.c:1.1.1.3.12.17.2.37->1.1.1.3.12.17.2.38 src/auth/basic/auth_basic.c:1.1.2.33->1.1.2.34 src/auth/ntlm/auth_ntlm.c:1.1.2.36->1.1.2.37 src/auth/ntlm/helpers/NTLMSSP/ntlm_auth.c:1.1.2.13->1.1.2.14 Index: squid/src/acl.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/acl.c,v retrieving revision 1.1.1.3.12.26.2.42 retrieving revision 1.1.1.3.12.26.2.43 diff -u -r1.1.1.3.12.26.2.42 -r1.1.1.3.12.26.2.43 --- squid/src/acl.c 10 Feb 2001 17:58:34 -0000 1.1.1.3.12.26.2.42 +++ squid/src/acl.c 10 Feb 2001 18:14:06 -0000 1.1.1.3.12.26.2.43 @@ -1,8 +1,6 @@ - - /* - * $Id: acl.c,v 1.1.1.3.12.26.2.42 2001/02/10 17:58:34 hno Exp $ + * $Id: acl.c,v 1.1.1.3.12.26.2.43 2001/02/10 18:14:06 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels Index: squid/src/authenticate.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/authenticate.c,v retrieving revision 1.1.1.3.12.17.2.37 retrieving revision 1.1.1.3.12.17.2.38 diff -u -r1.1.1.3.12.17.2.37 -r1.1.1.3.12.17.2.38 --- squid/src/authenticate.c 10 Feb 2001 17:58:34 -0000 1.1.1.3.12.17.2.37 +++ squid/src/authenticate.c 10 Feb 2001 18:14:07 -0000 1.1.1.3.12.17.2.38 @@ -1,6 +1,6 @@ /* - * $Id: authenticate.c,v 1.1.1.3.12.17.2.37 2001/02/10 17:58:34 hno Exp $ + * $Id: authenticate.c,v 1.1.1.3.12.17.2.38 2001/02/10 18:14:07 hno Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Duane Wessels @@ -681,7 +681,6 @@ } - #if GLOBALPROXYHEADERCACHE void authenticateProxyAuthCacheAddLink(const char *key, auth_user_t * auth_user) 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.33 retrieving revision 1.1.2.34 diff -u -r1.1.2.33 -r1.1.2.34 --- squid/src/auth/basic/auth_basic.c 10 Feb 2001 17:58:35 -0000 1.1.2.33 +++ squid/src/auth/basic/auth_basic.c 10 Feb 2001 18:14:07 -0000 1.1.2.34 @@ -132,7 +132,7 @@ return (authbasic_initialised == 1) ? 1 : 0; } -int +static int authBasicConfigured() { if ((basicConfig != NULL) && (basicConfig->authenticate != 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.36 retrieving revision 1.1.2.37 diff -u -r1.1.2.36 -r1.1.2.37 --- squid/src/auth/ntlm/auth_ntlm.c 10 Feb 2001 17:32:49 -0000 1.1.2.36 +++ squid/src/auth/ntlm/auth_ntlm.c 10 Feb 2001 18:14:07 -0000 1.1.2.37 @@ -145,7 +145,10 @@ storeAppendPrintf(entry, " %s", list->key); list = list->next; } - storeAppendPrintf(entry, "\n%s %s children %d\n%s %s max_challenge_reuses %d\n%s %s max_challenge_lifetime %d seconds\n", name, "ntlm", config->authenticateChildren, name, "ntlm", config->challengeuses, name, "ntlm", config->challengelifetime); + storeAppendPrintf(entry, "\n%s %s children %d\n%s %s max_challenge_reuses %d\n%s %s max_challenge_lifetime %d seconds\n", + name, "ntlm", config->authenticateChildren, + name, "ntlm", config->challengeuses, + name, "ntlm", config->challengelifetime); } @@ -890,7 +893,9 @@ /* TODO: more fault tolerance.. reset the auth scheme here */ } /* cache entries have authenticateauthheaderchallengestring */ - snprintf(ntlmhash, sizeof(ntlmhash) - 1, "%s%s", ntlm_request->ntlmauthenticate, ntlm_request->authchallenge); + snprintf(ntlmhash, sizeof(ntlmhash) - 1, "%s%s", + ntlm_request->ntlmauthenticate, + ntlm_request->authchallenge); /* see if we already know this user's authenticate */ debug(29, 9) ("aclMatchProxyAuth: cache lookup with key '%s'\n", ntlmhash); assert(proxy_auth_cache != NULL); @@ -926,9 +931,14 @@ /*add to cache and let them through */ ntlm_request->auth_state = AUTHENTICATE_STATE_DONE; /* this connection is authenticated */ - debug(29, 4) ("authenticated\nch %s\nauth %s\nauthuser %s\n", ntlm_request->authchallenge, ntlm_request->ntlmauthenticate, ntlm_user->username); + debug(29, 4) ("authenticated\nch %s\nauth %s\nauthuser %s\n", + ntlm_request->authchallenge, + ntlm_request->ntlmauthenticate, + ntlm_user->username); /* cache entries have authenticateauthheaderchallengestring */ - snprintf(ntlmhash, sizeof(ntlmhash) - 1, "%s%s", ntlm_request->ntlmauthenticate, ntlm_request->authchallenge); + snprintf(ntlmhash, sizeof(ntlmhash) - 1, "%s%s", + ntlm_request->ntlmauthenticate, + ntlm_request->authchallenge); /* see if this is an existing user with a different proxy_auth * string */ if ((usernamehash = hash_lookup(proxy_auth_username_cache, ntlm_user->username))) { Index: squid/src/auth/ntlm/helpers/NTLMSSP/ntlm_auth.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/ntlm/helpers/NTLMSSP/Attic/ntlm_auth.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/helpers/NTLMSSP/ntlm_auth.c 10 Feb 2001 17:58:35 -0000 1.1.2.13 +++ squid/src/auth/ntlm/helpers/NTLMSSP/ntlm_auth.c 10 Feb 2001 18:14:07 -0000 1.1.2.14 @@ -131,7 +131,12 @@ "%s [-b] [-f] domain\\controller [domain\\controller ...]\n" "-b, if specified, enables load-balancing among controllers\n" "-f, if specified, enables failover among controllers\n" - "-l, if specified, changes behavior on domain controller failyures to" "\tlast-ditch\n\n" "You MUST specify at least one Domain Controller.\n" "You can use either \\ or / as separator between the domain name \n" "\tand the controller name\n", my_program_name, my_program_name); + "-l, if specified, changes behavior on domain controller failyures to" + "\tlast-ditch\n\n" + "You MUST specify at least one Domain Controller.\n" + "You can use either \\ or / as separator between the domain name \n" + "\tand the controller name\n", + my_program_name, my_program_name); } @@ -298,7 +303,9 @@ int errorclass, errorcode; #ifdef DEBUG SMB_Get_Error_Msg(SMB_Get_Last_SMB_Err(), error_messages_buffer, BUFFER_SIZE); - debug("Authentication failure. SMB error: %d: %s\n. Class=%d, Code=%d\n", SMB_Get_Last_SMB_Err(), error_messages_buffer, SMB_Get_Last_SMB_Err() & 0xff, SMB_Get_Last_SMB_Err() >> 16); + debug("Authentication failure. SMB error: %d: %s\n. Class=%d, Code=%d\n", + SMB_Get_Last_SMB_Err(), error_messages_buffer, + SMB_Get_Last_SMB_Err() & 0xff, SMB_Get_Last_SMB_Err() >> 16); RFCNB_Get_Error_Msg(RFCNB_Get_Last_Error(), error_messages_buffer, BUFFER_SIZE); debug("RFCNB error status: code=%d (%s)\n", RFCNB_Get_Last_Error(), error_messages_buffer); #endif @@ -378,7 +385,8 @@ smb_errorclass = SMBlib_Error_Class(SMB_Get_Last_SMB_Err()); smb_errorcode = SMBlib_Error_Code(SMB_Get_Last_SMB_Err()); nb_error = RFCNB_Get_Last_Error(); - debug("No creds. SMBlib error %d, SMB error class %d, " "SMB error code %d, NB error %d\n", smblib_err, smb_errorclass, smb_errorcode, nb_error); + debug("No creds. SMBlib error %d, SMB error class %d, " + "SMB error code %d, NB error %d\n", smblib_err, smb_errorclass, smb_errorcode, nb_error); /* Should I use smblib_err? Actually it seems I can do as well * without it.. */ if (nb_error != 0) { /* netbios-level error */