--------------------- PatchSet 1707 Date: 2001/03/10 00:40:09 Author: hno Branch: auth_rewrite Tag: (none) Log: indent Members: src/HttpStatusLine.c:1.1.1.3.10.2.2.3->1.1.1.3.10.2.2.4 src/acl.c:1.1.1.3.12.26.2.46->1.1.1.3.12.26.2.47 src/authenticate.c:1.1.1.3.12.17.2.39->1.1.1.3.12.17.2.40 src/client_side.c:1.1.1.3.4.1.2.30.2.25->1.1.1.3.4.1.2.30.2.26 src/auth/ntlm/auth_ntlm.c:1.1.2.39->1.1.2.40 src/auth/ntlm/helpers/NTLMSSP/ntlm.h:1.1.2.8->1.1.2.9 src/auth/ntlm/helpers/NTLMSSP/ntlm_auth.c:1.1.2.18->1.1.2.19 src/auth/ntlm/helpers/NTLMSSP/smbval/md4.c:1.1.2.3->1.1.2.4 src/auth/ntlm/helpers/fakeauth/fakeauth_auth.c:1.1.2.2->1.1.2.3 src/auth/ntlm/helpers/fakeauth/ntlm.h:1.1.2.3->1.1.2.4 Index: squid/src/HttpStatusLine.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/HttpStatusLine.c,v retrieving revision 1.1.1.3.10.2.2.3 retrieving revision 1.1.1.3.10.2.2.4 diff -u -r1.1.1.3.10.2.2.3 -r1.1.1.3.10.2.2.4 --- squid/src/HttpStatusLine.c 26 Feb 2001 05:27:02 -0000 1.1.1.3.10.2.2.3 +++ squid/src/HttpStatusLine.c 10 Mar 2001 00:40:09 -0000 1.1.1.3.10.2.2.4 @@ -1,6 +1,6 @@ /* - * $Id: HttpStatusLine.c,v 1.1.1.3.10.2.2.3 2001/02/26 05:27:02 rbcollins Exp $ + * $Id: HttpStatusLine.c,v 1.1.1.3.10.2.2.4 2001/03/10 00:40:09 hno Exp $ * * DEBUG: section 57 HTTP Status-line * AUTHOR: Alex Rousskov @@ -95,7 +95,7 @@ } if (!(start = strchr(start, ' '))) return 0; - sline->status = (http_status)atoi(++start); + sline->status = (http_status) atoi(++start); /* we ignore 'reason-phrase' */ return 1; /* success */ } Index: squid/src/acl.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/acl.c,v retrieving revision 1.1.1.3.12.26.2.46 retrieving revision 1.1.1.3.12.26.2.47 diff -u -r1.1.1.3.12.26.2.46 -r1.1.1.3.12.26.2.47 --- squid/src/acl.c 9 Mar 2001 08:32:27 -0000 1.1.1.3.12.26.2.46 +++ squid/src/acl.c 10 Mar 2001 00:40:09 -0000 1.1.1.3.12.26.2.47 @@ -1,6 +1,6 @@ /* - * $Id: acl.c,v 1.1.1.3.12.26.2.46 2001/03/09 08:32:27 rbcollins Exp $ + * $Id: acl.c,v 1.1.1.3.12.26.2.47 2001/03/10 00:40:09 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -1208,7 +1208,6 @@ */ return 0; } - /* * a note on proxy_auth logix here: * proxy_auth==NULL -> unauthenticated request || already authenticated connection Index: squid/src/authenticate.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/authenticate.c,v retrieving revision 1.1.1.3.12.17.2.39 retrieving revision 1.1.1.3.12.17.2.40 diff -u -r1.1.1.3.12.17.2.39 -r1.1.1.3.12.17.2.40 --- squid/src/authenticate.c 8 Mar 2001 12:01:13 -0000 1.1.1.3.12.17.2.39 +++ squid/src/authenticate.c 10 Mar 2001 00:40:10 -0000 1.1.1.3.12.17.2.40 @@ -1,6 +1,6 @@ /* - * $Id: authenticate.c,v 1.1.1.3.12.17.2.39 2001/03/08 12:01:13 rbcollins Exp $ + * $Id: authenticate.c,v 1.1.1.3.12.17.2.40 2001/03/10 00:40:10 hno Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Duane Wessels @@ -290,7 +290,7 @@ authenticateUserAuthenticated(auth_user_request_t * auth_user_request) { if (!authenticateValidateUser(auth_user_request)) - return 0; + return 0; if (auth_user_request->auth_user->auth_module > 0) return authscheme_list[auth_user_request->auth_user->auth_module - 1].authenticated(auth_user_request); else Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.1.1.3.4.1.2.30.2.25 retrieving revision 1.1.1.3.4.1.2.30.2.26 diff -u -r1.1.1.3.4.1.2.30.2.25 -r1.1.1.3.4.1.2.30.2.26 --- squid/src/client_side.c 9 Mar 2001 08:32:28 -0000 1.1.1.3.4.1.2.30.2.25 +++ squid/src/client_side.c 10 Mar 2001 00:40:10 -0000 1.1.1.3.4.1.2.30.2.26 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.1.1.3.4.1.2.30.2.25 2001/03/09 08:32:28 rbcollins Exp $ + * $Id: client_side.c,v 1.1.1.3.4.1.2.30.2.26 2001/03/10 00:40:10 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -258,10 +258,10 @@ if (page_id == ERR_NONE) page_id = ERR_CACHE_ACCESS_DENIED; } else { -#ifdef KINKIES_407_HACK /* return a 407 */ - status = HTTP_PROXY_AUTHENTICATION_REQUIRED; +#ifdef KINKIES_407_HACK /* return a 407 */ + status = HTTP_PROXY_AUTHENTICATION_REQUIRED; if (page_id == ERR_NONE) - page_id=ERR_CACHE_ACCESS_DENIED; + page_id = ERR_CACHE_ACCESS_DENIED; #else /* return a 403 */ status = HTTP_FORBIDDEN; if (page_id == ERR_NONE) @@ -272,15 +272,15 @@ err->request = requestLink(http->request); err->src_addr = http->conn->peer.sin_addr; #ifdef KINKIES_407_HACK - if (answer==ACCESS_REQ_PROXY_AUTH) { /* second part, by Kinkie */ + if (answer == ACCESS_REQ_PROXY_AUTH) { /* second part, by Kinkie */ #endif - if (http->conn->auth_user_request) - err->auth_user_request = http->conn->auth_user_request; - else if (http->request->auth_user_request) - err->auth_user_request = http->request->auth_user_request; - /* lock for the error state */ - if (err->auth_user_request) - authenticateAuthUserRequestLock(err->auth_user_request); + if (http->conn->auth_user_request) + err->auth_user_request = http->conn->auth_user_request; + else if (http->request->auth_user_request) + err->auth_user_request = http->request->auth_user_request; + /* lock for the error state */ + if (err->auth_user_request) + authenticateAuthUserRequestLock(err->auth_user_request); #ifdef KINKIES_407_HACK } #endif 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.39 retrieving revision 1.1.2.40 diff -u -r1.1.2.39 -r1.1.2.40 --- squid/src/auth/ntlm/auth_ntlm.c 9 Mar 2001 08:32:29 -0000 1.1.2.39 +++ squid/src/auth/ntlm/auth_ntlm.c 10 Mar 2001 00:40:10 -0000 1.1.2.40 @@ -321,9 +321,9 @@ httpHeaderPutStrf(&rep->header, type, "NTLM %s", ntlm_request->authchallenge); break; #ifdef KINKIES_407_HACK - case AUTHENTICATE_STATE_DONE: /* HACK by Kinkie */ - /* nothing */ - break; + case AUTHENTICATE_STATE_DONE: /* HACK by Kinkie */ + /* nothing */ + break; #endif /* KINKIES_407_HACK */ default: debug(29, 0) ("authenticateNTLMFixErrorHeader: state %d.\n", ntlm_request->auth_state); @@ -459,7 +459,7 @@ ntlm_request->authhelper = NULL; auth_user->flags.credentials_ok = 1; /* login ok */ #ifdef NTLM_FAIL_OPEN - } else if (strncasecmp(reply, "LD ", 3) == 0) { + } else if (strncasecmp(reply, "LD ", 3) == 0) { /* This is a variant of BH, which rather than deny access * allows the user through. The helper is starved and then refreshed * via YR, all pending authentications are likely to fail also. @@ -484,7 +484,7 @@ ntlm_user->username = xstrndup(reply, MAX_LOGIN_SZ); helperstate = helperStatefulServerGetData(ntlm_request->authhelper); ntlm_request->authhelper = NULL; - auth_user->flags.credentials_ok = 1; /* login ok */ + auth_user->flags.credentials_ok = 1; /* login ok */ /* BH code: mark helper as broken */ /* Not a valid helper response to a YR request. Assert so the helper * programmer will fix their bugs! */ Index: squid/src/auth/ntlm/helpers/NTLMSSP/ntlm.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/ntlm/helpers/NTLMSSP/Attic/ntlm.h,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -r1.1.2.8 -r1.1.2.9 --- squid/src/auth/ntlm/helpers/NTLMSSP/ntlm.h 9 Mar 2001 10:53:30 -0000 1.1.2.8 +++ squid/src/auth/ntlm/helpers/NTLMSSP/ntlm.h 10 Mar 2001 00:40:10 -0000 1.1.2.9 @@ -57,7 +57,11 @@ #define debug(X...) /* */ #endif /* DEBUG */ #else /* __GNUC__ */ -static void debug(char *format, ...) {} +static void +debug(char *format,...) +{ +} + #endif 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.18 retrieving revision 1.1.2.19 diff -u -r1.1.2.18 -r1.1.2.19 --- squid/src/auth/ntlm/helpers/NTLMSSP/ntlm_auth.c 9 Mar 2001 11:30:23 -0000 1.1.2.18 +++ squid/src/auth/ntlm/helpers/NTLMSSP/ntlm_auth.c 10 Mar 2001 00:40:10 -0000 1.1.2.19 @@ -53,7 +53,7 @@ #endif char load_balance = 0, failover_enabled = 0, protocol_pedantic = - 0, last_ditch_enabled = 0; +0, last_ditch_enabled = 0; dc *controllers = NULL; int numcontrollers = 0; @@ -299,7 +299,7 @@ /* notreached */ case NTLM_AUTHENTICATE: /* check against the DC */ - plen = strlen(buf) * 3 / 4; /* we only need it here. Optimization */ + plen = strlen(buf) * 3 / 4; /* we only need it here. Optimization */ cred = ntlm_check_auth((ntlm_authenticate *) decoded, plen); if (cred == NULL) { int smblib_err, smb_errorclass, smb_errorcode, nb_error; Index: squid/src/auth/ntlm/helpers/NTLMSSP/smbval/md4.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/ntlm/helpers/NTLMSSP/smbval/Attic/md4.c,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- squid/src/auth/ntlm/helpers/NTLMSSP/smbval/md4.c 9 Mar 2001 08:24:16 -0000 1.1.2.3 +++ squid/src/auth/ntlm/helpers/NTLMSSP/smbval/md4.c 10 Mar 2001 00:40:10 -0000 1.1.2.4 @@ -25,7 +25,7 @@ * It assumes that a int is at least 32 bits long */ #include -#include "std-defines.h" /* for the types */ +#include "std-defines.h" /* for the types */ static uint32 A, B, C, D; Index: squid/src/auth/ntlm/helpers/fakeauth/fakeauth_auth.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/ntlm/helpers/fakeauth/Attic/fakeauth_auth.c,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- squid/src/auth/ntlm/helpers/fakeauth/fakeauth_auth.c 9 Mar 2001 08:24:16 -0000 1.1.2.2 +++ squid/src/auth/ntlm/helpers/fakeauth/fakeauth_auth.c 10 Mar 2001 00:40:10 -0000 1.1.2.3 @@ -113,7 +113,7 @@ * Check the vailidity of a request header. Return -1 on error. */ int -ntlmCheckHeader(ntlmhdr *hdr, int type) +ntlmCheckHeader(ntlmhdr * hdr, int type) { /* * Must be the correct security package and request type. The Index: squid/src/auth/ntlm/helpers/fakeauth/ntlm.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/ntlm/helpers/fakeauth/Attic/ntlm.h,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- squid/src/auth/ntlm/helpers/fakeauth/ntlm.h 9 Mar 2001 08:24:16 -0000 1.1.2.3 +++ squid/src/auth/ntlm/helpers/fakeauth/ntlm.h 10 Mar 2001 00:40:10 -0000 1.1.2.4 @@ -89,7 +89,7 @@ char *ntlmGetString(ntlmhdr * hdr, strhdr * str, int flags); void ntlmMakeChallenge(struct ntlm_challenge *chal); -int ntlmCheckHeader(ntlmhdr *hdr, int type); +int ntlmCheckHeader(ntlmhdr * hdr, int type); int ntlmCheckNegotiation(struct ntlm_negotiate *neg); int ntlmAuthenticate(struct ntlm_authenticate *neg);