From: Amos Jeffries Date: Fri, 27 Mar 2009 22:05:59 +0000 (+1300) Subject: Author: Christos Tsantilas X-Git-Tag: SQUID_3_1_0_7~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=280c2f000fb720f58a9d046eb5c5647a756e62b5;p=thirdparty%2Fsquid.git Author: Christos Tsantilas 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 --- diff --git a/src/AclRegs.cc b/src/AclRegs.cc index 1d000cb4e1..73d5f9747e 100644 --- a/src/AclRegs.cc +++ b/src/AclRegs.cc @@ -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 ACLBrowser::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy::Instance(), "browser"); @@ -117,7 +120,7 @@ ACLStrategised ACLUrlPath::RegistryEntry_(new ACLRegexData, ACLUrl ACL::Prototype ACLUrlPort::RegistryProtoype(&ACLUrlPort::RegistryEntry_, "port"); ACLStrategised ACLUrlPort::RegistryEntry_(new ACLIntRange, ACLUrlPortStrategy::Instance(), "port"); -#ifdef ENABLE_SSL +#ifdef USE_SSL ACL::Prototype ACLSslError::RegistryProtoype(&ACLSslError::RegistryEntry_, "ssl_error"); ACLStrategised ACLSslError::RegistryEntry_(new ACLSslErrorData, ACLSslErrorStrategy::Instance(), "ssl_error"); ACL::Prototype ACLCertificate::UserRegistryProtoype(&ACLCertificate::UserRegistryEntry_, "user_cert"); @@ -126,12 +129,12 @@ ACLStrategised ACLUrlPort::RegistryEntry_(new ACLIntRange, ACLUrlPortStrate ACLStrategised 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 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"); diff --git a/src/auth/AclMaxUserIp.cc b/src/auth/AclMaxUserIp.cc index 0326b8feb4..881ea82fce 100644 --- a/src/auth/AclMaxUserIp.cc +++ b/src/auth/AclMaxUserIp.cc @@ -42,10 +42,6 @@ #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 { diff --git a/src/auth/AclProxyAuth.cc b/src/auth/AclProxyAuth.cc index d4b5748544..8a3ea72fd7 100644 --- a/src/auth/AclProxyAuth.cc +++ b/src/auth/AclProxyAuth.cc @@ -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 {