]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #901: ident ACLs parsed incorrectly if specified multiple times
authorhno <>
Thu, 21 Oct 2004 04:31:23 +0000 (04:31 +0000)
committerhno <>
Thu, 21 Oct 2004 04:31:23 +0000 (04:31 +0000)
src/ACLIdent.cc

index 835594428c691d6b5f7fa583b59902d4829c372e..8f00cf1ded7175565fbb0354e82aaac72568e198 100644 (file)
@@ -69,8 +69,11 @@ ACLIdent::typeString() const
 void
 ACLIdent::parse()
 {
-    debug(28, 3) ("aclParseUserList: current is null. Creating\n");
-    data = new ACLUserData;
+    if (!data) {
+        debug(28, 3) ("aclParseUserList: current is null. Creating\n");
+        data = new ACLUserData;
+    }
+
     data->parse();
 }
 
@@ -79,7 +82,10 @@ ACLIdent::match(ACLChecklist *checklist)
 {
     if (checklist->rfc931[0]) {
         return data->match(checklist->rfc931);
+    } else if (checklist->conn().getRaw() != NULL && checklist->conn()->rfc931[0]) {
+        return data->match(checklist->conn()->rfc931);
     } else {
+        debug(28, 3) ("ACLIdent::match() - switching to ident lookup state\n");
         checklist->changeState(IdentLookup::Instance());
         return 0;
     }