diff -N -c -r -X exclude_files squid-1.0.beta9/src/acl.c squid-1.0.beta9.henrik/src/acl.c *** squid-1.0.beta9/src/acl.c Wed May 29 14:42:49 1996 --- squid-1.0.beta9.henrik/src/acl.c Wed May 29 13:11:45 1996 *************** *** 24,30 **** static int aclMatchIp _PARAMS((struct _acl_ip_data * data, struct in_addr c)); static int aclMatchRegex _PARAMS((relist * data, char *word)); static int aclMatchTime _PARAMS((struct _acl_time_data * data, time_t when)); ! static int aclMatchWord _PARAMS((wordlist * data, char *word)); static intlist *aclParseIntlist _PARAMS((void)); static struct _acl_ip_data *aclParseIpList _PARAMS((void)); static intlist *aclParseMethodList _PARAMS((void)); --- 24,30 ---- static int aclMatchIp _PARAMS((struct _acl_ip_data * data, struct in_addr c)); static int aclMatchRegex _PARAMS((relist * data, char *word)); static int aclMatchTime _PARAMS((struct _acl_time_data * data, time_t when)); ! static int aclMatchEndOfWord _PARAMS((wordlist * data, char *word)); static intlist *aclParseIntlist _PARAMS((void)); static struct _acl_ip_data *aclParseIpList _PARAMS((void)); static intlist *aclParseMethodList _PARAMS((void)); *************** *** 513,518 **** --- 513,519 ---- return 0; } + #if UNUSED_CODE static int aclMatchWord(data, word) wordlist *data; char *word; *************** *** 528,533 **** --- 529,553 ---- } return 0; } + #endif + + static int aclMatchEndOfWord(data, word) + wordlist *data; + char *word; + { + int offset; + if (word == NULL) + return 0; + debug(28, 3, "aclMatchEndOfWord: checking '%s'\n", word); + for(;data;data=data->next) { + debug(28, 3, "aclMatchEndOfWord: looking for '%s'\n", data->key); + if ((offset = strlen(word) - strlen(data->key)) < 0) + continue; + if (strcmp(word + offset, data->key)==0) + return 1; + } + return 0; + } static int aclMatchRegex(data, word) relist *data; *************** *** 595,601 **** return aclMatchIp(acl->data, c); /* NOTREACHED */ case ACL_DST_DOMAIN: ! return aclMatchWord(acl->data, h); /* NOTREACHED */ case ACL_TIME: return aclMatchTime(acl->data, squid_curtime); --- 615,621 ---- return aclMatchIp(acl->data, c); /* NOTREACHED */ case ACL_DST_DOMAIN: ! return aclMatchEndOfWord(acl->data, h); /* NOTREACHED */ case ACL_TIME: return aclMatchTime(acl->data, squid_curtime);