From: hno <> Date: Mon, 8 Jan 2001 02:55:20 +0000 (+0000) Subject: Renamed generic user list functions/structures to "user" instead of "proxy_auth" X-Git-Tag: SQUID_3_0_PRE1~1675 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cf86841e2ac9d1c0483177722f73eeb939b1d4f1;p=thirdparty%2Fsquid.git Renamed generic user list functions/structures to "user" instead of "proxy_auth" --- diff --git a/src/acl.cc b/src/acl.cc index 97dc5af940..2720fe85d1 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -1,6 +1,6 @@ /* - * $Id: acl.cc,v 1.233 2001/01/07 19:42:00 hno Exp $ + * $Id: acl.cc,v 1.234 2001/01/07 19:55:20 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -41,7 +41,7 @@ static FILE *aclFile; static hash_table *proxy_auth_cache = NULL; static void aclParseDomainList(void *curlist); -static void aclParseProxyAuthList(void **current); +static void aclParseUserList(void **current); static void aclParseIpList(void *curlist); static void aclParseIntlist(void *curlist); static void aclParseWordList(void *curlist); @@ -636,25 +636,25 @@ aclParseWordList(void *curlist) } static void -aclParseProxyAuthList(void **current) +aclParseUserList(void **current) { char *t = NULL; - acl_proxy_auth_data *data; + acl_user_data *data; splayNode *Top = NULL; - debug(28, 2) ("aclParseProxyAuthList: parsing authlist\n"); + debug(28, 2) ("aclParseUserList: parsing authlist\n"); if (*current == NULL) { - debug(28, 3) ("aclParseProxyAuthList: current is null. Creating\n"); + debug(28, 3) ("aclParseUserList: current is null. Creating\n"); *current = memAllocate(MEM_ACL_PROXY_AUTH_DATA); /*we rely on mA. zeroing */ } data = *current; if ((t = strtokFile())) { - debug(28, 5) ("aclParseProxyAuthList: First token is %s\n", t); + debug(28, 5) ("aclParseUserList: First token is %s\n", t); if (strcmp("-i", t) == 0) { - debug(28, 5) ("aclParseProxyAuthList: Going case-insensitive\n"); + debug(28, 5) ("aclParseUserList: Going case-insensitive\n"); data->flags.case_insensitive = 1; } else if (strcmp("REQUIRED", t) == 0) { - debug(28, 5) ("aclParseProxyAuthList: REQUIRED-type enabled\n"); + debug(28, 5) ("aclParseUserList: REQUIRED-type enabled\n"); data->flags.required = 1; } else { if (data->flags.case_insensitive) @@ -662,13 +662,13 @@ aclParseProxyAuthList(void **current) Top = splay_insert(xstrdup(t), Top, (SPLAYCMP *) strcmp); } } - debug(28, 3) ("aclParseProxyAuthList: Case-insensitive-switch is %d\n", + debug(28, 3) ("aclParseUserList: Case-insensitive-switch is %d\n", data->flags.case_insensitive); /* we might inherit from a previous declaration */ - debug(28, 4) ("aclParseProxyAuthList: parsing proxy-auth list\n"); + debug(28, 4) ("aclParseUserList: parsing proxy-auth list\n"); while ((t = strtokFile())) { - debug(28, 6) ("aclParseProxyAuthList: Got token: %s\n", t); + debug(28, 6) ("aclParseUserList: Got token: %s\n", t); if (data->flags.case_insensitive) Tolower(t); Top = splay_insert(xstrdup(t), Top, (SPLAYCMP *) strcmp); @@ -775,7 +775,7 @@ aclParseAclLine(acl ** head) break; #if USE_IDENT case ACL_IDENT: - aclParseProxyAuthList(&A->data); + aclParseUserList(&A->data); break; case ACL_IDENT_REGEX: aclParseRegexList(&A->data); @@ -788,7 +788,7 @@ aclParseAclLine(acl ** head) aclParseMethodList(&A->data); break; case ACL_PROXY_AUTH: - aclParseProxyAuthList(&A->data); + aclParseUserList(&A->data); if (!proxy_auth_cache) { /* First time around, 7921 should be big enough */ proxy_auth_cache = hash_create((HASHCMP *) strcmp, 7921, hash_string); @@ -1054,7 +1054,7 @@ aclMatchRegex(relist * data, const char *word) static int aclMatchUser(void *proxyauth_acl, char *user) { - acl_proxy_auth_data *data = (acl_proxy_auth_data *) proxyauth_acl; + acl_user_data *data = (acl_user_data *) proxyauth_acl; splayNode *Top = data->names; debug(28, 7) ("aclMatchUser: user is %s, case_insensitive is %d\n", @@ -1949,9 +1949,9 @@ aclFreeIpData(void *p) } static void -aclFreeProxyAuthData(void *data) +aclFreeUserData(void *data) { - acl_proxy_auth_data *d = data; + acl_user_data *d = data; splay_destroy(d->names, xfree); memFree(d, MEM_ACL_PROXY_AUTH_DATA); } @@ -1983,11 +1983,11 @@ aclDestroyAcls(acl ** head) #endif #if USE_IDENT case ACL_IDENT: - aclFreeProxyAuthData(a->data); + aclFreeUserData(a->data); break; #endif case ACL_PROXY_AUTH: - aclFreeProxyAuthData(a->data); + aclFreeUserData(a->data); break; case ACL_TIME: aclDestroyTimeList(a->data); @@ -2164,14 +2164,14 @@ aclIpNetworkCompare(const void *a, const void *b) } static void -aclDumpProxyAuthListWalkee(void *node_data, void *outlist) +aclDumpUserListWalkee(void *node_data, void *outlist) { /* outlist is really a wordlist ** */ wordlistAdd(outlist, node_data); } wordlist * -aclDumpProxyAuthList(acl_proxy_auth_data * data) +aclDumpUserList(acl_user_data * data) { wordlist *wl = NULL; if ((data->flags.case_insensitive) != 0) @@ -2180,7 +2180,7 @@ aclDumpProxyAuthList(acl_proxy_auth_data * data) * a wordlist this way costs Sum(1,N) iterations. For instance * a 1000-elements list will be filled in 499500 iterations. */ - splay_walk(data->names, aclDumpProxyAuthListWalkee, &wl); + splay_walk(data->names, aclDumpUserListWalkee, &wl); return wl; } @@ -2330,14 +2330,14 @@ aclDumpGeneric(const acl * a) #endif #if USE_IDENT case ACL_IDENT: - return aclDumpProxyAuthList(a->data); + return aclDumpUserList(a->data); break; case ACL_IDENT_REGEX: return aclDumpRegexList(a->data); break; #endif case ACL_PROXY_AUTH: - return aclDumpProxyAuthList(a->data); + return aclDumpUserList(a->data); break; case ACL_TIME: return aclDumpTimeSpecList(a->data); diff --git a/src/mem.cc b/src/mem.cc index 14ee3eb9bf..52b46180f4 100644 --- a/src/mem.cc +++ b/src/mem.cc @@ -1,6 +1,6 @@ /* - * $Id: mem.cc,v 1.50 2001/01/07 14:47:17 hno Exp $ + * $Id: mem.cc,v 1.51 2001/01/07 19:55:20 hno Exp $ * * DEBUG: section 13 High Level Memory Pool Management * AUTHOR: Harvest Derived @@ -204,8 +204,8 @@ memInit(void) memDataInit(MEM_ACL_LIST, "acl_list", sizeof(acl_list), 0); memDataInit(MEM_ACL_NAME_LIST, "acl_name_list", sizeof(acl_name_list), 0); memDataInit(MEM_ACL_TIME_DATA, "acl_time_data", sizeof(acl_time_data), 0); - memDataInit(MEM_ACL_PROXY_AUTH_DATA, "acl_proxy_auth_data", - sizeof(acl_proxy_auth_data), 0); + memDataInit(MEM_ACL_PROXY_AUTH_DATA, "acl_user_data", + sizeof(acl_user_data), 0); memDataInit(MEM_ACL_PROXY_AUTH_USER, "acl_proxy_auth_user", sizeof(acl_proxy_auth_user), 0); memDataInit(MEM_CACHEMGR_PASSWD, "cachemgr_passwd", diff --git a/src/structs.h b/src/structs.h index 7d30c95d07..7e3e74caee 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.373 2001/01/07 14:47:17 hno Exp $ + * $Id: structs.h,v 1.374 2001/01/07 19:55:20 hno Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -45,7 +45,7 @@ struct _dlink_list { dlink_node *tail; }; -struct _acl_proxy_auth_data { +struct _acl_user_data { splayNode *names; struct { unsigned int case_insensitive:1; diff --git a/src/typedefs.h b/src/typedefs.h index ca4675c05c..8eed27c0ca 100644 --- a/src/typedefs.h +++ b/src/typedefs.h @@ -1,6 +1,6 @@ /* - * $Id: typedefs.h,v 1.114 2001/01/07 14:47:17 hno Exp $ + * $Id: typedefs.h,v 1.115 2001/01/07 19:55:20 hno Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -61,8 +61,7 @@ typedef struct _acl_ip_data acl_ip_data; typedef struct _acl_time_data acl_time_data; typedef struct _acl_name_list acl_name_list; typedef struct _acl_deny_info_list acl_deny_info_list; -typedef struct _acl_proxy_auth acl_proxy_auth; -typedef struct _acl_proxy_auth_data acl_proxy_auth_data; +typedef struct _acl_user_data acl_user_data; typedef struct _acl_proxy_auth_user acl_proxy_auth_user; typedef struct _acl_arp_data acl_arp_data; typedef struct _acl acl;