--------------------- PatchSet 1196 Date: 2001/01/08 10:16:31 Author: rbcollins Branch: auth_rewrite Tag: (none) Log: removed unused obsolete code Members: src/acl.c:1.1.1.3.12.26.2.29->1.1.1.3.12.26.2.30 Index: squid/src/acl.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/acl.c,v retrieving revision 1.1.1.3.12.26.2.29 retrieving revision 1.1.1.3.12.26.2.30 diff -u -r1.1.1.3.12.26.2.29 -r1.1.1.3.12.26.2.30 --- squid/src/acl.c 8 Jan 2001 06:43:09 -0000 1.1.1.3.12.26.2.29 +++ squid/src/acl.c 8 Jan 2001 10:16:31 -0000 1.1.1.3.12.26.2.30 @@ -1,6 +1,6 @@ /* - * $Id: acl.c,v 1.1.1.3.12.26.2.29 2001/01/08 06:43:09 rbcollins Exp $ + * $Id: acl.c,v 1.1.1.3.12.26.2.30 2001/01/08 10:16:31 rbcollins Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -1247,11 +1247,6 @@ checklist->auth_user_request = NULL; if (!authenticateUserAuthenticated(auth_user_request)) { /* User not logged in. Log them in */ -#if 0 - /* if they have not got an IP already give them one */ - if (!auth_user->ipaddr.s_addr) - auth_user->ipaddr = checklist->src_addr; -#endif authenticateAuthUserRequestSetIp(auth_user_request, checklist->src_addr); authenticateAuthenticateUser(auth_user_request, checklist->request, checklist->conn, headertype); switch (authenticateDirection(auth_user_request)) { @@ -1282,25 +1277,12 @@ } /* this ACL check is finished. Unlock. */ authenticateAuthUserRequestUnlock(auth_user_request); -#if 0 - authenticateFreeProxyAuthUser(auth_user_request); -#endif return -2; } } /* User authenticated ok */ assert(authenticateUserAuthenticated(auth_user_request)); -#if 0 - /* timeout checking on the credentials is done by the scheme during - * decode/authenticate */ - /* timeout checking on time_since_last_request is done by the auth framework - * by not reusing the existing user during decode iff the interval is too long */ - /* conn based auth can't time out during a connection */ - if ((checklist->conn->auth_user_request) || (auth_user_request->auth_user->expiretime + Config.authenticateTTL > current_time.tv_sec)) { - auth_user_request->auth_user->expiretime = current_time.tv_sec; -#endif - /* copy username to request for logging on client-side */ /* the credentials are correct at this point */ if (!checklist->request->auth_user_request) { @@ -1321,35 +1303,6 @@ /* this acl check completed */ authenticateAuthUserRequestUnlock(auth_user_request); return 0; -#if 0 - } else { - /* timeout */ - fatalf("user credentials not used for too long in acl.c - currently broken\n" - "the timeout values: expire:%d TTL %d expire+TTL %d now %d\n", - auth_user_request->auth_user->expiretime, Config.authenticateTTL, - auth_user_request->auth_user->expiretime + Config.authenticateTTL, - current_time.tv_sec); - /* this is broken because it assumes we can retry authentication - for - * digest/NTLM/kerberos we may not be able to. the Decode process should - * catch timed out but not garbage collected users anyway - this code - * _should_ be unreachable */ - debug(28, 4) ("aclMatchProxyAuth: user '%s' timeout\n", - authenticateUserRequestUsername(auth_user_request)); - /* reset the password check info */ - auth_user_request->auth_user->flags.credentials_ok = 0; - /* now give the checklist this auth_user_request */ - checklist->auth_user_request = auth_user_request; - /* update the TTL so we don't have an infinite loop */ - auth_user_request->auth_user->expiretime = current_time.tv_sec; - /* this ACL check completed */ - authenticateAuthUserRequestUnlock(auth_user_request); - /* and trigger the external helper in case the password is still ok */ - return -1; - } - /* unreachable code. Spit a debug info and fatal squid out of here */ - fatal("acl unreachable code!"); - return -2; -#endif } static void