Index: squid/src/external_acl.c diff -c squid/src/external_acl.c:1.1.2.23 squid/src/external_acl.c:1.1.2.25 *** squid/src/external_acl.c:1.1.2.23 Sat May 10 16:17:44 2003 --- squid/src/external_acl.c Sat May 17 12:35:25 2003 *************** *** 397,435 **** aclMatchExternal(void *data, aclCheck_t * ch) { int result; ! external_acl_entry *entry; external_acl_data *acl = data; const char *key = ""; debug(82, 9) ("aclMatchExternal: acl=\"%s\"\n", acl->def->name); ! entry = ch->extacl_entry; if (entry) { ! if (cbdataValid(entry) && entry->def == acl->def && ! strcmp(entry->hash.key, key) == 0) { ! /* Ours, use it.. */ ! } else { ! /* Not valid, or not ours.. get rid of it */ cbdataUnlock(ch->extacl_entry); ch->extacl_entry = NULL; entry = NULL; } } if (!entry) { - if (acl->def->require_auth) { - int ti; - /* Make sure the user is authenticated */ - if ((ti = aclAuthenticated(ch)) != 1) { - debug(82, 2) ("aclMatchExternal: %s user not authenticated (%d)\n", acl->def->name, ti); - return ti; - } - } - key = makeExternalAclKey(ch, acl); entry = hash_lookup(acl->def->cache, key); if (entry && external_acl_entry_expired(acl->def, entry)) { /* Expired entry, ignore */ debug(82, 2) ("external_acl_cache_lookup: '%s' = expired\n", key); entry = NULL; } - ch->auth_user_request = NULL; } if (!entry || entry->result == -1) { debug(82, 2) ("aclMatchExternal: %s(\"%s\") = lookup needed\n", acl->def->name, key); --- 397,438 ---- aclMatchExternal(void *data, aclCheck_t * ch) { int result; ! external_acl_entry *entry = NULL; external_acl_data *acl = data; const char *key = ""; debug(82, 9) ("aclMatchExternal: acl=\"%s\"\n", acl->def->name); ! if (ch->extacl_entry) { ! entry = ch->extacl_entry; ! if (!cbdataValid(entry)) ! entry = NULL; ! cbdataUnlock(ch->extacl_entry); ! ch->extacl_entry = NULL; ! } ! if (acl->def->require_auth) { ! int ti; ! /* Make sure the user is authenticated */ ! if ((ti = aclAuthenticated(ch)) != 1) { ! debug(82, 2) ("aclMatchExternal: %s user not authenticated (%d)\n", acl->def->name, ti); ! return ti; ! } ! } ! key = makeExternalAclKey(ch, acl); ! ch->auth_user_request = NULL; if (entry) { ! if (entry->def != acl->def || strcmp(entry->hash.key, key) != 0) { ! /* Not ours.. get rid of it */ cbdataUnlock(ch->extacl_entry); ch->extacl_entry = NULL; entry = NULL; } } if (!entry) { entry = hash_lookup(acl->def->cache, key); if (entry && external_acl_entry_expired(acl->def, entry)) { /* Expired entry, ignore */ debug(82, 2) ("external_acl_cache_lookup: '%s' = expired\n", key); entry = NULL; } } if (!entry || entry->result == -1) { debug(82, 2) ("aclMatchExternal: %s(\"%s\") = lookup needed\n", acl->def->name, key);