--------------------- PatchSet 1205 Date: 2001/01/08 19:23:26 Author: hno Branch: auth_rewrite Tag: (none) Log: memAllocate do return cleared data by definition. indent Members: src/acl.c:1.1.1.3.12.26.2.31->1.1.1.3.12.26.2.32 Index: squid/src/acl.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/acl.c,v retrieving revision 1.1.1.3.12.26.2.31 retrieving revision 1.1.1.3.12.26.2.32 diff -u -r1.1.1.3.12.26.2.31 -r1.1.1.3.12.26.2.32 --- squid/src/acl.c 8 Jan 2001 12:46:52 -0000 1.1.1.3.12.26.2.31 +++ squid/src/acl.c 8 Jan 2001 19:23:26 -0000 1.1.1.3.12.26.2.32 @@ -1,6 +1,6 @@ /* - * $Id: acl.c,v 1.1.1.3.12.26.2.31 2001/01/08 12:46:52 rbcollins Exp $ + * $Id: acl.c,v 1.1.1.3.12.26.2.32 2001/01/08 19:23:26 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -645,10 +645,6 @@ if (*current == NULL) { debug(28, 3) ("aclParseUserList: current is null. Creating\n"); *current = memAllocate(MEM_ACL_USER_DATA); - data = *current; - data->names=NULL; - data->flags.case_insensitive=0; - data->flags.required=0; } data = *current; Top = data->names; @@ -1283,22 +1279,22 @@ } /* User authenticated ok */ assert(authenticateUserAuthenticated(auth_user_request)); - /* copy username to request for logging on client-side */ - /* the credentials are correct at this point */ - if (!checklist->request->auth_user_request) { - /* lock the user for the request structure link */ - authenticateAuthUserRequestLock(auth_user_request); - checklist->request->auth_user_request = auth_user_request; - } - if (authenticateCheckAuthUserIP(checklist->src_addr, auth_user_request)) { - /* Once the match is completed we have finished with the - * auth_user structure */ - /* this ACL check completed */ - authenticateAuthUserRequestUnlock(auth_user_request); - /* check to see if we have matched the user-acl before */ - return - aclCacheMatchAcl(&auth_user_request->auth_user->proxy_match_cache, - acltype, data, authenticateUserRequestUsername(auth_user_request)); + + /* copy username to request for logging on client-side */ + /* the credentials are correct at this point */ + if (!checklist->request->auth_user_request) { + /* lock the user for the request structure link */ + authenticateAuthUserRequestLock(auth_user_request); + checklist->request->auth_user_request = auth_user_request; + } + if (authenticateCheckAuthUserIP(checklist->src_addr, auth_user_request)) { + /* Once the match is completed we have finished with the + * auth_user structure */ + /* this ACL check completed */ + authenticateAuthUserRequestUnlock(auth_user_request); + /* check to see if we have matched the user-acl before */ + return aclCacheMatchAcl(&auth_user_request->auth_user->proxy_match_cache, + acltype, data, authenticateUserRequestUsername(auth_user_request)); } /* this acl check completed */ authenticateAuthUserRequestUnlock(auth_user_request); @@ -1999,7 +1995,7 @@ { acl_user_data *d = data; if (d->names) - splay_destroy(d->names, xfree); + splay_destroy(d->names, xfree); memFree(d, MEM_ACL_USER_DATA); }