--------------------- PatchSet 2684 Date: 2001/07/31 09:09:24 Author: rbcollins Branch: ntlm Tag: (none) Log: finalising user ip acl code Members: src/acl.c:1.1.1.3.12.61->1.1.1.3.12.62 src/auth/digest/auth_digest.c:1.1.22.4->1.1.22.5 src/auth/ntlm/auth_ntlm.c:1.1.10.14.2.24->1.1.10.14.2.25 Index: squid/src/acl.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/acl.c,v retrieving revision 1.1.1.3.12.61 retrieving revision 1.1.1.3.12.62 diff -u -r1.1.1.3.12.61 -r1.1.1.3.12.62 --- squid/src/acl.c 27 Jul 2001 14:23:49 -0000 1.1.1.3.12.61 +++ squid/src/acl.c 31 Jul 2001 09:09:24 -0000 1.1.1.3.12.62 @@ -1,6 +1,6 @@ /* - * $Id: acl.c,v 1.1.1.3.12.61 2001/07/27 14:23:49 rbcollins Exp $ + * $Id: acl.c,v 1.1.1.3.12.62 2001/07/31 09:09:24 rbcollins Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -1426,14 +1426,23 @@ void aclDestroyUserMaxIP(void * data) { - // acl_user_ip_data ** acldata = data; + acl_user_ip_data ** acldata = data; + if (*acldata) + cbdataFree (*acldata); + *acldata = NULL; } wordlist * aclDumpUserMaxIP(void * data) { - // acl_user_ip_data * acldata = data; - return NULL; + acl_user_ip_data *acldata = data; + wordlist *W = NULL; + char buf[128]; + if (acldata->flags.strict) + wordlistAdd(&W, "-s"); + snprintf(buf, sizeof(buf), "%d", acldata->max); + wordlistAdd(&W, buf); + return W; } /* aclMatchUserMaxIP - check for users logging in from multiple IP's Index: squid/src/auth/digest/auth_digest.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/digest/auth_digest.c,v retrieving revision 1.1.22.4 retrieving revision 1.1.22.5 diff -u -r1.1.22.4 -r1.1.22.5 --- squid/src/auth/digest/auth_digest.c 12 Mar 2001 11:00:30 -0000 1.1.22.4 +++ squid/src/auth/digest/auth_digest.c 31 Jul 2001 09:09:24 -0000 1.1.22.5 @@ -686,7 +686,6 @@ /* auth_user is now linked, we reset these values * after external auth occurs anyway */ auth_user->expiretime = current_time.tv_sec; - auth_user->ip_expiretime = squid_curtime; return; } 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.10.14.2.24 retrieving revision 1.1.10.14.2.25 diff -u -r1.1.10.14.2.24 -r1.1.10.14.2.25 --- squid/src/auth/ntlm/auth_ntlm.c 26 Jul 2001 14:21:56 -0000 1.1.10.14.2.24 +++ squid/src/auth/ntlm/auth_ntlm.c 31 Jul 2001 09:09:24 -0000 1.1.10.14.2.25 @@ -1018,7 +1018,6 @@ /* on ntlm auth we do not unlock the auth_user until the * connection is dropped. Thank MS for this quirk */ auth_user->expiretime = current_time.tv_sec; - auth_user->ip_expiretime = squid_curtime; } return; break; @@ -1061,7 +1060,6 @@ /* set these to now because this is either a new login from an * existing user or a new user */ auth_user->expiretime = current_time.tv_sec; - auth_user->ip_expiretime = squid_curtime; auth_user->flags.credentials_ok = 1; /*authenticated ok */ return; break;