]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1278: external acls requiring authentication does not request
authorhno <>
Thu, 31 Mar 2005 06:08:19 +0000 (06:08 +0000)
committerhno <>
Thu, 31 Mar 2005 06:08:19 +0000 (06:08 +0000)
credentials on access denials like proxy_auth does.

src/ExternalACL.h
src/external_acl.cc

index dcc5ff5ac5f088dbb7810c0bcad88b78bc0f9b13..54c34a90ddaf91dc015e0c418faea4c051763bb8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ExternalACL.h,v 1.6 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ExternalACL.h,v 1.7 2005/03/30 23:08:19 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -77,8 +77,7 @@ public:
 
     /* when requiresRequest is made dynamic, review this too */
     //    virtual bool requiresReply() const {return true;}
-    /* This may need to be extant, to cause 407's if %LOGIN% is used. */
-    //    virtual bool isProxyAuth() const {return true;}
+    virtual bool isProxyAuth() const;
     virtual wordlist *dump() const;
     virtual bool valid () const;
 
index 99b21e69815794293c5ec5ebefb3fc43b763c1c6..0a9b5b7a674b4b933a99e402bf747cfbeae2185a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: external_acl.cc,v 1.61 2005/03/19 19:43:39 serassio Exp $
+ * $Id: external_acl.cc,v 1.62 2005/03/30 23:08:19 hno Exp $
  *
  * DEBUG: section 82    External ACL
  * AUTHOR: Henrik Nordstrom, MARA Systems AB
@@ -113,7 +113,7 @@ public:
 
     dlink_list queue;
 
-    int require_auth;
+    bool require_auth;
 
     enum
     {
@@ -313,7 +313,7 @@ parse_externalAclHelper(external_acl ** list)
             }
         } else if (strcmp(token, "%LOGIN") == 0) {
             format->type = _external_acl_format::EXT_ACL_LOGIN;
-            a->require_auth = 1;
+            a->require_auth = true;
         }
 
 #if USE_IDENT
@@ -1087,7 +1087,7 @@ void
 ACLExternal::ExternalAclLookup(ACLChecklist * ch, ACLExternal * me, EAH * callback, void *callback_data)
 {
     MemBuf buf;
-    external_acl_data *acl = static_cast<external_acl_data *>(me->data);
+    external_acl_data *acl = me->data;
     external_acl *def = acl->def;
     externalAclState *state;
     dlink_node *node;
@@ -1311,3 +1311,9 @@ ACLExternal::valid () const
 {
     return data != NULL;
 }
+
+bool
+ACLExternal::isProxyAuth() const
+{
+    return data->def->require_auth;
+}