]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Christos Tsantilas <chtsanti@users.sourceforge.net>
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 27 Mar 2009 22:05:59 +0000 (11:05 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 27 Mar 2009 22:05:59 +0000 (11:05 +1300)
Fix ACL registrations.

The defines ENABLE_SSL, ENABLE_ARP_ACL, ENABLE_IDENT are never defined.
The correct defines are USE_SSL, USE_ARP_ACL and USE_IDENT respectivelly

Move registration code of max_user_ip, proxy_auth and proxy_auth_regex
acls from src/auth/Acl*  into the src/AclRegs.cc

src/AclRegs.cc
src/auth/AclMaxUserIp.cc
src/auth/AclProxyAuth.cc

index 1d000cb4e1e14b5344d83b1d9661c4c7811f485c..73d5f9747e64bbcaf27cd3424958e427060433ae 100644 (file)
@@ -6,7 +6,7 @@
 */
 
 #include "acl/Acl.h"
-#ifdef ENABLE_ARP_ACL
+#ifdef USE_ARP_ACL
 #include "acl/Arp.h"
 #endif
 #include "acl/Asn.h"
@@ -24,7 +24,7 @@
 #include "acl/HttpRepHeader.h"
 #include "acl/HttpReqHeader.h"
 #include "acl/HttpStatus.h"
-#ifdef ENABLE_IDENT
+#if USE_IDENT
 #include "acl/Ident.h"
 #endif
 #include "acl/IntRange.h"
@@ -47,7 +47,7 @@
 #include "acl/SourceAsn.h"
 #include "acl/SourceDomain.h"
 #include "acl/SourceIp.h"
-#ifdef ENABLE_SSL
+#ifdef USE_SSL
 #include "acl/SslErrorData.h"
 #include "acl/SslError.h"
 #include "acl/CertificateData.h"
@@ -62,6 +62,9 @@
 #include "acl/UrlPath.h"
 #include "acl/UrlPort.h"
 #include "acl/UserData.h"
+#include "auth/AclProxyAuth.h"
+#include "auth/AclMaxUserIp.h"
+
 
 ACL::Prototype ACLBrowser::RegistryProtoype(&ACLBrowser::RegistryEntry_, "browser");
 ACLStrategised<char const *> ACLBrowser::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_USER_AGENT>::Instance(), "browser");
@@ -117,7 +120,7 @@ ACLStrategised<char const *> ACLUrlPath::RegistryEntry_(new ACLRegexData, ACLUrl
 ACL::Prototype ACLUrlPort::RegistryProtoype(&ACLUrlPort::RegistryEntry_, "port");
 ACLStrategised<int> ACLUrlPort::RegistryEntry_(new ACLIntRange, ACLUrlPortStrategy::Instance(), "port");
 
-#ifdef ENABLE_SSL
+#ifdef USE_SSL
     ACL::Prototype ACLSslError::RegistryProtoype(&ACLSslError::RegistryEntry_, "ssl_error");
     ACLStrategised<int> ACLSslError::RegistryEntry_(new ACLSslErrorData, ACLSslErrorStrategy::Instance(), "ssl_error");
     ACL::Prototype ACLCertificate::UserRegistryProtoype(&ACLCertificate::UserRegistryEntry_, "user_cert");
@@ -126,12 +129,12 @@ ACLStrategised<int> ACLUrlPort::RegistryEntry_(new ACLIntRange, ACLUrlPortStrate
     ACLStrategised<SSL *> ACLCertificate::CARegistryEntry_(new ACLCertificateData (sslGetCAAttribute), ACLCertificateStrategy::Instance(), "ca_cert");
 #endif
 
-#ifdef ENABLE_ARP_ACL
+#ifdef USE_ARP_ACL
     ACL::Prototype ACLARP::RegistryProtoype(&ACLARP::RegistryEntry_, "arp");
     ACLARP ACLARP::RegistryEntry_("arp");
 #endif
 
-#ifdef ENABLE_IDENT
+#if USE_IDENT
     ACL::Prototype ACLIdent::UserRegistryProtoype(&ACLIdent::UserRegistryEntry_, "ident");
     ACLIdent ACLIdent::UserRegistryEntry_(new ACLUserData, "ident");
     ACL::Prototype ACLIdent::RegexRegistryProtoype(&ACLIdent::RegexRegistryEntry_, "ident_regex" );
@@ -139,4 +142,10 @@ ACLStrategised<int> ACLUrlPort::RegistryEntry_(new ACLIntRange, ACLUrlPortStrate
 #endif
 
 
+ACL::Prototype ACLProxyAuth::UserRegistryProtoype(&ACLProxyAuth::UserRegistryEntry_, "proxy_auth");
+ACLProxyAuth ACLProxyAuth::UserRegistryEntry_(new ACLUserData, "proxy_auth");
+ACL::Prototype ACLProxyAuth::RegexRegistryProtoype(&ACLProxyAuth::RegexRegistryEntry_, "proxy_auth_regex" );
+ACLProxyAuth ACLProxyAuth::RegexRegistryEntry_(new ACLRegexData, "proxy_auth_regex");
 
+ACL::Prototype ACLMaxUserIP::RegistryProtoype(&ACLMaxUserIP::RegistryEntry_, "max_user_ip");
+ACLMaxUserIP ACLMaxUserIP::RegistryEntry_("max_user_ip");
index 0326b8feb4f2038fae3c62627683a3e40bbd43e8..881ea82fce12f8e26f1757d4e29a8c0c2a0c51ea 100644 (file)
 #include "wordlist.h"
 #include "ConfigParser.h"
 
-ACL::Prototype ACLMaxUserIP::RegistryProtoype(&ACLMaxUserIP::RegistryEntry_, "max_user_ip");
-
-ACLMaxUserIP ACLMaxUserIP::RegistryEntry_("max_user_ip");
-
 ACL *
 ACLMaxUserIP::clone() const
 {
index d4b574854430aed83c4052b79f5a2d2aa2903905..8a3ea72fd7e94461863ddf5d77b0a0bacc6d2592 100644 (file)
@@ -190,11 +190,6 @@ ProxyAuthNeeded::checkForAsync(ACLChecklist *checklist) const
     checklist->markFinished();
 }
 
-ACL::Prototype ACLProxyAuth::UserRegistryProtoype(&ACLProxyAuth::UserRegistryEntry_, "proxy_auth");
-ACLProxyAuth ACLProxyAuth::UserRegistryEntry_(new ACLUserData, "proxy_auth");
-ACL::Prototype ACLProxyAuth::RegexRegistryProtoype(&ACLProxyAuth::RegexRegistryEntry_, "proxy_auth_regex" );
-ACLProxyAuth ACLProxyAuth::RegexRegistryEntry_(new ACLRegexData, "proxy_auth_regex");
-
 ACL *
 ACLProxyAuth::clone() const
 {