]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
2003-02-26 22:03 hno
authorhno <>
Fri, 20 Jun 2003 00:05:11 +0000 (00:05 +0000)
committerhno <>
Fri, 20 Jun 2003 00:05:11 +0000 (00:05 +0000)
Bug #552: using username from external_acl for http_access and delay_access

src/external_acl.cc

index 2ee2007362bb863b44184cddc86632e688a79993..6e296aa70965928109902210d4ec93962f4f59bb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: external_acl.cc,v 1.42 2003/05/29 15:54:08 hno Exp $
+ * $Id: external_acl.cc,v 1.43 2003/06/19 18:05:11 hno Exp $
  *
  * DEBUG: section 82    External ACL
  * AUTHOR: Henrik Nordstrom, MARA Systems AB
@@ -584,8 +584,12 @@ aclMatchExternal(external_acl_data *acl, ACLChecklist * ch)
      * Register the username for logging purposes
      */
 
-    if (entry->user && cbdataReferenceValid(ch->conn()) && !ch->conn()->rfc931[0])
-        xstrncpy(ch->conn()->rfc931, entry->user, USER_IDENT_SZ);
+    if (entry->user) {
+        xstrncpy(ch->rfc931, entry->user, USER_IDENT_SZ);
+
+        if (cbdataReferenceValid(ch->conn()))
+            xstrncpy(ch->conn()->rfc931, entry->user, USER_IDENT_SZ);
+    }
 
     if (ch->request && !ch->request->tag.size())
         ch->request->tag = entry->tag;