From: Alex Rousskov Date: Tue, 17 Mar 2009 02:04:14 +0000 (-0600) Subject: Fixed the problem with Squid executable missing code to process ACLs. X-Git-Tag: SQUID_3_2_0_1~1120^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d46f5799aaa9fe143cda648ba4e7ec2d18def1b;p=thirdparty%2Fsquid.git Fixed the problem with Squid executable missing code to process ACLs. The solution will probably be replaced by a better one eventually. Background: Squid uses a "registry pattern" to register parsing and matching code specific to most ACL types. The registration happens in acl/libacls convenience library. The rest of Squid does not know about specific ACL types; it only has access to a registry of pointers to what looks like generic ACL objects. When Squid executable is linked, most object files containing specific ACL types are dropped (i.e., ignored) by the linker because they do not satisfy any unresolved symbols and, hence, deemed unnecessary. ACL object files were not missing when Squid executable was built using explicit ACL object files names because the linker treats those differently than object files in a convenience library -- it includes them whole. Attempts to find a fix: My attempts to link with a static convenience library (libtool's -static option when defining the library) were not successful: the end result is the same. The static and regular convenience libraries appear to be different, but the linker, apparently, troughs out "unnecessary" symbols from both. My attempts to pass -whole-archive to the linker were not successful: libtool would reorder the arguments when calling the actual linker, resulting in the wrong parameter order. I did protect -Wl,-whole-archive and friends with AC_SUBST() and tried a few different versions of that protection, but was not successful. It is possible that I just did not find the right trick to make it work. However, -whole-archive is not portable so it would not be an ideal solution anyway. The fix: I have moved registration code from src/acl/* sources into a src/AclRegs.cc file, making the latter the source file for Squid executable. With this change, Squid knows about specific ACL types (because they are needed by the registration code) and the corresponding ACL classes get linked. A similar solution is currently used for DiskIO modules, except there the "pull everything in" source file (DiskIO/DiskIOModules_gen.cc) is generated and called explicitly. We may end up generating AclRegs.cc as well, but there does not seem to be a particular advantage of adding that level of complexity. Future: A few options are available: a) Find flaws in the above attempts to convince libtool to do the right thing and fix the problem using libtool parameters alone. b) Wait for libtool to support the kind of convenience library that we need (the one that does -whole-archive when building an executable). c) Add some kind of Acl::ModuleInit() global that Squid would call to register known ACL types. AclRegs.cc code can be moved to acl/* sources then. --- diff --git a/src/AclRegs.cc b/src/AclRegs.cc new file mode 100644 index 0000000000..1d000cb4e1 --- /dev/null +++ b/src/AclRegs.cc @@ -0,0 +1,142 @@ +#include "squid.h" + +/** This file exists to provide satic registration code to executables + that need ACLs. We cannot place this code in acl/lib*.la because it + does not get linked in, because nobody is using these classes by name. +*/ + +#include "acl/Acl.h" +#ifdef ENABLE_ARP_ACL +#include "acl/Arp.h" +#endif +#include "acl/Asn.h" +#include "acl/Browser.h" +#include "acl/Checklist.h" +#include "acl/Data.h" +#include "acl/DestinationAsn.h" +#include "acl/DestinationDomain.h" +#include "acl/DestinationIp.h" +#include "acl/DomainData.h" +#include "acl/ExtUser.h" +#include "acl/FilledChecklist.h" +#include "acl/Gadgets.h" +#include "acl/HttpHeaderData.h" +#include "acl/HttpRepHeader.h" +#include "acl/HttpReqHeader.h" +#include "acl/HttpStatus.h" +#ifdef ENABLE_IDENT +#include "acl/Ident.h" +#endif +#include "acl/IntRange.h" +#include "acl/Ip.h" +#include "acl/MaxConnection.h" +#include "acl/MethodData.h" +#include "acl/Method.h" +#include "acl/MyIp.h" +#include "acl/MyPort.h" +#include "acl/MyPortName.h" +#include "acl/PeerName.h" +#include "acl/ProtocolData.h" +#include "acl/Protocol.h" +#include "acl/Referer.h" +#include "acl/RegexData.h" +#include "acl/ReplyHeaderStrategy.h" +#include "acl/ReplyMimeType.h" +#include "acl/RequestHeaderStrategy.h" +#include "acl/RequestMimeType.h" +#include "acl/SourceAsn.h" +#include "acl/SourceDomain.h" +#include "acl/SourceIp.h" +#ifdef ENABLE_SSL +#include "acl/SslErrorData.h" +#include "acl/SslError.h" +#include "acl/CertificateData.h" +#include "acl/Certificate.h" +#endif +#include "acl/Strategised.h" +#include "acl/Strategy.h" +#include "acl/StringData.h" +#include "acl/TimeData.h" +#include "acl/Time.h" +#include "acl/Url.h" +#include "acl/UrlPath.h" +#include "acl/UrlPort.h" +#include "acl/UserData.h" + +ACL::Prototype ACLBrowser::RegistryProtoype(&ACLBrowser::RegistryEntry_, "browser"); +ACLStrategised ACLBrowser::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy::Instance(), "browser"); +ACL::Prototype ACLDestinationDomain::LiteralRegistryProtoype(&ACLDestinationDomain::LiteralRegistryEntry_, "dstdomain"); +ACLStrategised ACLDestinationDomain::LiteralRegistryEntry_(new ACLDomainData, ACLDestinationDomainStrategy::Instance(), "dstdomain"); +ACL::Prototype ACLDestinationDomain::RegexRegistryProtoype(&ACLDestinationDomain::RegexRegistryEntry_, "dstdom_regex"); +ACLStrategised ACLDestinationDomain::RegexRegistryEntry_(new ACLRegexData,ACLDestinationDomainStrategy::Instance() ,"dstdom_regex"); +ACL::Prototype ACLDestinationIP::RegistryProtoype(&ACLDestinationIP::RegistryEntry_, "dst"); +ACLDestinationIP ACLDestinationIP::RegistryEntry_; +ACL::Prototype ACLExtUser::UserRegistryProtoype(&ACLExtUser::UserRegistryEntry_, "ext_user"); +ACLExtUser ACLExtUser::UserRegistryEntry_(new ACLUserData, "ext_user"); +ACL::Prototype ACLExtUser::RegexRegistryProtoype(&ACLExtUser::RegexRegistryEntry_, "ext_user_regex" ); +ACLExtUser ACLExtUser::RegexRegistryEntry_(new ACLRegexData, "ext_user_regex"); +ACL::Prototype ACLHTTPRepHeader::RegistryProtoype(&ACLHTTPRepHeader::RegistryEntry_, "rep_header"); +ACLStrategised ACLHTTPRepHeader::RegistryEntry_(new ACLHTTPHeaderData, ACLHTTPRepHeaderStrategy::Instance(), "rep_header"); +ACL::Prototype ACLHTTPReqHeader::RegistryProtoype(&ACLHTTPReqHeader::RegistryEntry_, "req_header"); +ACLStrategised ACLHTTPReqHeader::RegistryEntry_(new ACLHTTPHeaderData, ACLHTTPReqHeaderStrategy::Instance(), "req_header"); +ACL::Prototype ACLHTTPStatus::RegistryProtoype(&ACLHTTPStatus::RegistryEntry_, "http_status"); +ACLHTTPStatus ACLHTTPStatus::RegistryEntry_("http_status"); +ACL::Prototype ACLMaxConnection::RegistryProtoype(&ACLMaxConnection::RegistryEntry_, "maxconn"); +ACLMaxConnection ACLMaxConnection::RegistryEntry_("maxconn"); +ACL::Prototype ACLMethod::RegistryProtoype(&ACLMethod::RegistryEntry_, "method"); +ACLStrategised ACLMethod::RegistryEntry_(new ACLMethodData, ACLMethodStrategy::Instance(), "method"); +ACLMyIP ACLMyIP::RegistryEntry_; +ACLMyIP const &ACLMyIP::RegistryEntry() {return RegistryEntry_;} +ACL::Prototype ACLMyPort::RegistryProtoype(&ACLMyPort::RegistryEntry_, "myport"); +ACLStrategised ACLMyPort::RegistryEntry_(new ACLIntRange, ACLMyPortStrategy::Instance(), "myport"); +ACL::Prototype ACLMyPortName::RegistryProtoype(&ACLMyPortName::RegistryEntry_, "myportname"); +ACLStrategised ACLMyPortName::RegistryEntry_(new ACLStringData, ACLMyPortNameStrategy::Instance(), "myportname"); +ACL::Prototype ACLPeerName::RegistryProtoype(&ACLPeerName::RegistryEntry_, "peername"); +ACLStrategised ACLPeerName::RegistryEntry_(new ACLStringData, ACLPeerNameStrategy::Instance(), "peername"); +ACL::Prototype ACLProtocol::RegistryProtoype(&ACLProtocol::RegistryEntry_, "proto"); +ACLStrategised ACLProtocol::RegistryEntry_(new ACLProtocolData, ACLProtocolStrategy::Instance(), "proto"); +ACL::Prototype ACLReferer::RegistryProtoype(&ACLReferer::RegistryEntry_, "referer_regex"); +ACLStrategised ACLReferer::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy::Instance(), "referer_regex"); +ACL::Prototype ACLReplyMIMEType::RegistryProtoype(&ACLReplyMIMEType::RegistryEntry_, "rep_mime_type"); +ACLStrategised ACLReplyMIMEType::RegistryEntry_(new ACLRegexData, ACLReplyHeaderStrategy::Instance(), "rep_mime_type"); +ACL::Prototype ACLRequestMIMEType::RegistryProtoype(&ACLRequestMIMEType::RegistryEntry_, "req_mime_type"); +ACLStrategised ACLRequestMIMEType::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy::Instance(), "req_mime_type"); +ACL::Prototype ACLSourceDomain::LiteralRegistryProtoype(&ACLSourceDomain::LiteralRegistryEntry_, "srcdomain"); +ACLStrategised ACLSourceDomain::LiteralRegistryEntry_(new ACLDomainData, ACLSourceDomainStrategy::Instance(), "srcdomain"); +ACL::Prototype ACLSourceDomain::RegexRegistryProtoype(&ACLSourceDomain::RegexRegistryEntry_, "srcdom_regex"); +ACLStrategised ACLSourceDomain::RegexRegistryEntry_(new ACLRegexData,ACLSourceDomainStrategy::Instance() ,"srcdom_regex"); +ACL::Prototype ACLSourceIP::RegistryProtoype(&ACLSourceIP::RegistryEntry_, "src"); +ACLSourceIP ACLSourceIP::RegistryEntry_; +ACL::Prototype ACLTime::RegistryProtoype(&ACLTime::RegistryEntry_, "time"); +ACLStrategised ACLTime::RegistryEntry_(new ACLTimeData, ACLTimeStrategy::Instance(), "time"); +ACL::Prototype ACLUrl::RegistryProtoype(&ACLUrl::RegistryEntry_, "url_regex"); +ACLStrategised ACLUrl::RegistryEntry_(new ACLRegexData, ACLUrlStrategy::Instance(), "url_regex"); +ACL::Prototype ACLUrlPath::LegacyRegistryProtoype(&ACLUrlPath::RegistryEntry_, "pattern"); +ACL::Prototype ACLUrlPath::RegistryProtoype(&ACLUrlPath::RegistryEntry_, "urlpath_regex"); +ACLStrategised ACLUrlPath::RegistryEntry_(new ACLRegexData, ACLUrlPathStrategy::Instance(), "urlpath_regex"); +ACL::Prototype ACLUrlPort::RegistryProtoype(&ACLUrlPort::RegistryEntry_, "port"); +ACLStrategised ACLUrlPort::RegistryEntry_(new ACLIntRange, ACLUrlPortStrategy::Instance(), "port"); + +#ifdef ENABLE_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"); + ACLStrategised ACLCertificate::UserRegistryEntry_(new ACLCertificateData (sslGetUserAttribute), ACLCertificateStrategy::Instance(), "user_cert"); + ACL::Prototype ACLCertificate::CARegistryProtoype(&ACLCertificate::CARegistryEntry_, "ca_cert"); + ACLStrategised ACLCertificate::CARegistryEntry_(new ACLCertificateData (sslGetCAAttribute), ACLCertificateStrategy::Instance(), "ca_cert"); +#endif + +#ifdef ENABLE_ARP_ACL + ACL::Prototype ACLARP::RegistryProtoype(&ACLARP::RegistryEntry_, "arp"); + ACLARP ACLARP::RegistryEntry_("arp"); +#endif + +#ifdef ENABLE_IDENT + ACL::Prototype ACLIdent::UserRegistryProtoype(&ACLIdent::UserRegistryEntry_, "ident"); + ACLIdent ACLIdent::UserRegistryEntry_(new ACLUserData, "ident"); + ACL::Prototype ACLIdent::RegexRegistryProtoype(&ACLIdent::RegexRegistryEntry_, "ident_regex" ); + ACLIdent ACLIdent::RegexRegistryEntry_(new ACLRegexData, "ident_regex"); +#endif + + + diff --git a/src/Makefile.am b/src/Makefile.am index 0d24396c98..ada0b2ffef 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -245,6 +245,9 @@ cf_gen_LDADD= \ @MINGW_LIBS@ cf_gen.$(OBJEXT): cf_gen_defines.h + +ACL_REGISTRATION_SOURCES = AclRegs.cc + DISKIO_SOURCE = \ DiskIO/DiskIOModule.cc \ DiskIO/ReadRequest.cc \ @@ -316,6 +319,7 @@ libsquid_la_SOURCES = \ TextException.h squid_SOURCES = \ + $(ACL_REGISTRATION_SOURCES) \ access_log.cc \ AccessLogEntry.h \ asn.cc \ diff --git a/src/acl/Arp.cc b/src/acl/Arp.cc index 0e6f891a63..37abbf8198 100644 --- a/src/acl/Arp.cc +++ b/src/acl/Arp.cc @@ -86,9 +86,7 @@ static int aclMatchArp(SplayNode **dataptr, IpAddress &c); static SplayNode::SPLAYCMP aclArpCompare; static SplayNode::SPLAYWALKEE aclDumpArpListWalkee; -ACL::Prototype ACLARP::RegistryProtoype(&ACLARP::RegistryEntry_, "arp"); -ACLARP ACLARP::RegistryEntry_("arp"); ACL * ACLARP::clone() const diff --git a/src/acl/Browser.cc b/src/acl/Browser.cc index 5854253ed7..02fa8dcbab 100644 --- a/src/acl/Browser.cc +++ b/src/acl/Browser.cc @@ -43,6 +43,4 @@ template class ACLRequestHeaderStrategy; -ACL::Prototype ACLBrowser::RegistryProtoype(&ACLBrowser::RegistryEntry_, "browser"); -ACLStrategised ACLBrowser::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy::Instance(), "browser"); diff --git a/src/acl/Certificate.cc b/src/acl/Certificate.cc index 5d72957bb4..32c51f1409 100644 --- a/src/acl/Certificate.cc +++ b/src/acl/Certificate.cc @@ -47,10 +47,6 @@ #include "fde.h" #include "client_side.h" -ACL::Prototype ACLCertificate::UserRegistryProtoype(&ACLCertificate::UserRegistryEntry_, "user_cert"); -ACLStrategised ACLCertificate::UserRegistryEntry_(new ACLCertificateData (sslGetUserAttribute), ACLCertificateStrategy::Instance(), "user_cert"); -ACL::Prototype ACLCertificate::CARegistryProtoype(&ACLCertificate::CARegistryEntry_, "ca_cert"); -ACLStrategised ACLCertificate::CARegistryEntry_(new ACLCertificateData (sslGetCAAttribute), ACLCertificateStrategy::Instance(), "ca_cert"); int ACLCertificateStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) diff --git a/src/acl/DestinationDomain.cc b/src/acl/DestinationDomain.cc index 09aa9570ae..606c5f0192 100644 --- a/src/acl/DestinationDomain.cc +++ b/src/acl/DestinationDomain.cc @@ -69,10 +69,6 @@ DestinationDomainLookup::LookupDone(const char *fqdn, void *data) checklist->check(); } -ACL::Prototype ACLDestinationDomain::LiteralRegistryProtoype(&ACLDestinationDomain::LiteralRegistryEntry_, "dstdomain"); -ACLStrategised ACLDestinationDomain::LiteralRegistryEntry_(new ACLDomainData, ACLDestinationDomainStrategy::Instance(), "dstdomain"); -ACL::Prototype ACLDestinationDomain::RegexRegistryProtoype(&ACLDestinationDomain::RegexRegistryEntry_, "dstdom_regex"); -ACLStrategised ACLDestinationDomain::RegexRegistryEntry_(new ACLRegexData,ACLDestinationDomainStrategy::Instance() ,"dstdom_regex"); int ACLDestinationDomainStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) diff --git a/src/acl/DestinationIp.cc b/src/acl/DestinationIp.cc index 925d518e92..46ca99bba3 100644 --- a/src/acl/DestinationIp.cc +++ b/src/acl/DestinationIp.cc @@ -96,9 +96,7 @@ DestinationIPLookup::LookupDone(const ipcache_addrs * ia, void *data) checklist->check(); } -ACL::Prototype ACLDestinationIP::RegistryProtoype(&ACLDestinationIP::RegistryEntry_, "dst"); -ACLDestinationIP ACLDestinationIP::RegistryEntry_; ACL * ACLDestinationIP::clone() const diff --git a/src/acl/ExtUser.cc b/src/acl/ExtUser.cc index a5cf9ffcc6..f8913e7508 100644 --- a/src/acl/ExtUser.cc +++ b/src/acl/ExtUser.cc @@ -103,7 +103,3 @@ ACLExtUser::clone() const return new ACLExtUser(*this); } -ACL::Prototype ACLExtUser::UserRegistryProtoype(&ACLExtUser::UserRegistryEntry_, "ext_user"); -ACLExtUser ACLExtUser::UserRegistryEntry_(new ACLUserData, "ext_user"); -ACL::Prototype ACLExtUser::RegexRegistryProtoype(&ACLExtUser::RegexRegistryEntry_, "ext_user_regex" ); -ACLExtUser ACLExtUser::RegexRegistryEntry_(new ACLRegexData, "ext_user_regex"); diff --git a/src/acl/HttpRepHeader.cc b/src/acl/HttpRepHeader.cc index d72af9bd70..89ca1ecb05 100644 --- a/src/acl/HttpRepHeader.cc +++ b/src/acl/HttpRepHeader.cc @@ -39,9 +39,7 @@ #include "acl/Checklist.h" #include "HttpReply.h" -ACL::Prototype ACLHTTPRepHeader::RegistryProtoype(&ACLHTTPRepHeader::RegistryEntry_, "rep_header"); -ACLStrategised ACLHTTPRepHeader::RegistryEntry_(new ACLHTTPHeaderData, ACLHTTPRepHeaderStrategy::Instance(), "rep_header"); int ACLHTTPRepHeaderStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) diff --git a/src/acl/HttpReqHeader.cc b/src/acl/HttpReqHeader.cc index a64b0d5466..169d338356 100644 --- a/src/acl/HttpReqHeader.cc +++ b/src/acl/HttpReqHeader.cc @@ -39,9 +39,7 @@ #include "acl/Checklist.h" #include "HttpRequest.h" -ACL::Prototype ACLHTTPReqHeader::RegistryProtoype(&ACLHTTPReqHeader::RegistryEntry_, "req_header"); -ACLStrategised ACLHTTPReqHeader::RegistryEntry_(new ACLHTTPHeaderData, ACLHTTPReqHeaderStrategy::Instance(), "req_header"); int ACLHTTPReqHeaderStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) diff --git a/src/acl/HttpStatus.cc b/src/acl/HttpStatus.cc index d7c9731500..a05fb97550 100644 --- a/src/acl/HttpStatus.cc +++ b/src/acl/HttpStatus.cc @@ -84,9 +84,7 @@ int acl_httpstatus_data::compare(acl_httpstatus_data* const& a, acl_httpstatus_d return ret; } -ACL::Prototype ACLHTTPStatus::RegistryProtoype(&ACLHTTPStatus::RegistryEntry_, "http_status"); -ACLHTTPStatus ACLHTTPStatus::RegistryEntry_("http_status"); ACL * ACLHTTPStatus::clone() const diff --git a/src/acl/Ident.cc b/src/acl/Ident.cc index 7eddb18044..4753b8f433 100644 --- a/src/acl/Ident.cc +++ b/src/acl/Ident.cc @@ -110,10 +110,6 @@ ACLIdent::clone() const return new ACLIdent(*this); } -ACL::Prototype ACLIdent::UserRegistryProtoype(&ACLIdent::UserRegistryEntry_, "ident"); -ACLIdent ACLIdent::UserRegistryEntry_(new ACLUserData, "ident"); -ACL::Prototype ACLIdent::RegexRegistryProtoype(&ACLIdent::RegexRegistryEntry_, "ident_regex" ); -ACLIdent ACLIdent::RegexRegistryEntry_(new ACLRegexData, "ident_regex"); IdentLookup IdentLookup::instance_; diff --git a/src/acl/MaxConnection.cc b/src/acl/MaxConnection.cc index 5bc67fb578..c7cafe4fd6 100644 --- a/src/acl/MaxConnection.cc +++ b/src/acl/MaxConnection.cc @@ -39,9 +39,7 @@ #include "acl/MaxConnection.h" #include "wordlist.h" -ACL::Prototype ACLMaxConnection::RegistryProtoype(&ACLMaxConnection::RegistryEntry_, "maxconn"); -ACLMaxConnection ACLMaxConnection::RegistryEntry_("maxconn"); ACL * ACLMaxConnection::clone() const diff --git a/src/acl/Method.cc b/src/acl/Method.cc index 93a5edb80c..5039967ee4 100644 --- a/src/acl/Method.cc +++ b/src/acl/Method.cc @@ -43,9 +43,7 @@ template class ACLStrategised; -ACL::Prototype ACLMethod::RegistryProtoype(&ACLMethod::RegistryEntry_, "method"); -ACLStrategised ACLMethod::RegistryEntry_(new ACLMethodData, ACLMethodStrategy::Instance(), "method"); int ACLMethodStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) diff --git a/src/acl/MyIp.cc b/src/acl/MyIp.cc index 00729a99c4..a94c636265 100644 --- a/src/acl/MyIp.cc +++ b/src/acl/MyIp.cc @@ -49,11 +49,8 @@ ACLMyIP::match(ACLChecklist *checklist) return ACLIP::match (Filled(checklist)->my_addr); } -ACL::Prototype ACLMyIP::RegistryProtoype(&ACLMyIP::RegistryEntry(), "myip"); -ACLMyIP ACLMyIP::RegistryEntry_; -ACLMyIP const &ACLMyIP::RegistryEntry() {return RegistryEntry_;} ACL * ACLMyIP::clone() const diff --git a/src/acl/MyPort.cc b/src/acl/MyPort.cc index 9cd9debfe6..ffe9c72918 100644 --- a/src/acl/MyPort.cc +++ b/src/acl/MyPort.cc @@ -42,9 +42,7 @@ template class ACLStrategised; -ACL::Prototype ACLMyPort::RegistryProtoype(&ACLMyPort::RegistryEntry_, "myport"); -ACLStrategised ACLMyPort::RegistryEntry_(new ACLIntRange, ACLMyPortStrategy::Instance(), "myport"); int ACLMyPortStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) diff --git a/src/acl/MyPortName.cc b/src/acl/MyPortName.cc index 2a394e4a0e..c95e2ac5ba 100644 --- a/src/acl/MyPortName.cc +++ b/src/acl/MyPortName.cc @@ -43,9 +43,7 @@ #include "client_side.h" -ACL::Prototype ACLMyPortName::RegistryProtoype(&ACLMyPortName::RegistryEntry_, "myportname"); -ACLStrategised ACLMyPortName::RegistryEntry_(new ACLStringData, ACLMyPortNameStrategy::Instance(), "myportname"); int ACLMyPortNameStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) diff --git a/src/acl/PeerName.cc b/src/acl/PeerName.cc index 41284f17d7..55bd41ccec 100644 --- a/src/acl/PeerName.cc +++ b/src/acl/PeerName.cc @@ -3,9 +3,7 @@ #include "acl/StringData.h" #include "acl/Checklist.h" -ACL::Prototype ACLPeerName::RegistryProtoype(&ACLPeerName::RegistryEntry_, "peername"); -ACLStrategised ACLPeerName::RegistryEntry_(new ACLStringData, ACLPeerNameStrategy::Instance(), "peername"); int ACLPeerNameStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) diff --git a/src/acl/Protocol.cc b/src/acl/Protocol.cc index 810d1c1679..3ed48a5126 100644 --- a/src/acl/Protocol.cc +++ b/src/acl/Protocol.cc @@ -43,9 +43,7 @@ template class ACLStrategised; -ACL::Prototype ACLProtocol::RegistryProtoype(&ACLProtocol::RegistryEntry_, "proto"); -ACLStrategised ACLProtocol::RegistryEntry_(new ACLProtocolData, ACLProtocolStrategy::Instance(), "proto"); int ACLProtocolStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) diff --git a/src/acl/Referer.cc b/src/acl/Referer.cc index 3a97bad5a9..415903aa6a 100644 --- a/src/acl/Referer.cc +++ b/src/acl/Referer.cc @@ -43,6 +43,4 @@ template class ACLRequestHeaderStrategy; -ACL::Prototype ACLReferer::RegistryProtoype(&ACLReferer::RegistryEntry_, "referer_regex"); -ACLStrategised ACLReferer::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy::Instance(), "referer_regex"); diff --git a/src/acl/ReplyMimeType.cc b/src/acl/ReplyMimeType.cc index ff07b65a28..265be3efeb 100644 --- a/src/acl/ReplyMimeType.cc +++ b/src/acl/ReplyMimeType.cc @@ -43,6 +43,4 @@ template class ACLReplyHeaderStrategy; -ACL::Prototype ACLReplyMIMEType::RegistryProtoype(&ACLReplyMIMEType::RegistryEntry_, "rep_mime_type"); -ACLStrategised ACLReplyMIMEType::RegistryEntry_(new ACLRegexData, ACLReplyHeaderStrategy::Instance(), "rep_mime_type"); diff --git a/src/acl/RequestMimeType.cc b/src/acl/RequestMimeType.cc index 91e921db47..d7f96dd3f3 100644 --- a/src/acl/RequestMimeType.cc +++ b/src/acl/RequestMimeType.cc @@ -43,6 +43,4 @@ template class ACLRequestHeaderStrategy; -ACL::Prototype ACLRequestMIMEType::RegistryProtoype(&ACLRequestMIMEType::RegistryEntry_, "req_mime_type"); -ACLStrategised ACLRequestMIMEType::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy::Instance(), "req_mime_type"); diff --git a/src/acl/SourceDomain.cc b/src/acl/SourceDomain.cc index 997b1638cd..e49ef7a47f 100644 --- a/src/acl/SourceDomain.cc +++ b/src/acl/SourceDomain.cc @@ -67,10 +67,6 @@ SourceDomainLookup::LookupDone(const char *fqdn, void *data) checklist->check(); } -ACL::Prototype ACLSourceDomain::LiteralRegistryProtoype(&ACLSourceDomain::LiteralRegistryEntry_, "srcdomain"); -ACLStrategised ACLSourceDomain::LiteralRegistryEntry_(new ACLDomainData, ACLSourceDomainStrategy::Instance(), "srcdomain"); -ACL::Prototype ACLSourceDomain::RegexRegistryProtoype(&ACLSourceDomain::RegexRegistryEntry_, "srcdom_regex"); -ACLStrategised ACLSourceDomain::RegexRegistryEntry_(new ACLRegexData,ACLSourceDomainStrategy::Instance() ,"srcdom_regex"); int ACLSourceDomainStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) diff --git a/src/acl/SourceIp.cc b/src/acl/SourceIp.cc index 3e275d6d79..654dbade07 100644 --- a/src/acl/SourceIp.cc +++ b/src/acl/SourceIp.cc @@ -49,9 +49,7 @@ ACLSourceIP::match(ACLChecklist *checklist) return ACLIP::match(Filled(checklist)->src_addr); } -ACL::Prototype ACLSourceIP::RegistryProtoype(&ACLSourceIP::RegistryEntry_, "src"); -ACLSourceIP ACLSourceIP::RegistryEntry_; ACL * ACLSourceIP::clone() const diff --git a/src/acl/SslError.cc b/src/acl/SslError.cc index 59bc499d72..5a19853c3b 100644 --- a/src/acl/SslError.cc +++ b/src/acl/SslError.cc @@ -12,9 +12,7 @@ template class ACLStrategised; -ACL::Prototype ACLSslError::RegistryProtoype(&ACLSslError::RegistryEntry_, "ssl_error"); -ACLStrategised ACLSslError::RegistryEntry_(new ACLSslErrorData, ACLSslErrorStrategy::Instance(), "ssl_error"); int ACLSslErrorStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) diff --git a/src/acl/Time.cc b/src/acl/Time.cc index 8733128f63..d4007ec071 100644 --- a/src/acl/Time.cc +++ b/src/acl/Time.cc @@ -39,8 +39,6 @@ #include "acl/TimeData.h" #include "SquidTime.h" -ACL::Prototype ACLTime::RegistryProtoype(&ACLTime::RegistryEntry_, "time"); -ACLStrategised ACLTime::RegistryEntry_(new ACLTimeData, ACLTimeStrategy::Instance(), "time"); int ACLTimeStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) diff --git a/src/acl/Url.cc b/src/acl/Url.cc index 1cff64ed39..bd26c08113 100644 --- a/src/acl/Url.cc +++ b/src/acl/Url.cc @@ -39,8 +39,6 @@ #include "acl/Checklist.h" #include "acl/RegexData.h" -ACL::Prototype ACLUrl::RegistryProtoype(&ACLUrl::RegistryEntry_, "url_regex"); -ACLStrategised ACLUrl::RegistryEntry_(new ACLRegexData, ACLUrlStrategy::Instance(), "url_regex"); int ACLUrlStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) diff --git a/src/acl/UrlPath.cc b/src/acl/UrlPath.cc index 71a1671b12..c36d170c86 100644 --- a/src/acl/UrlPath.cc +++ b/src/acl/UrlPath.cc @@ -40,9 +40,6 @@ #include "acl/RegexData.h" #include "HttpRequest.h" -ACL::Prototype ACLUrlPath::LegacyRegistryProtoype(&ACLUrlPath::RegistryEntry_, "pattern"); -ACL::Prototype ACLUrlPath::RegistryProtoype(&ACLUrlPath::RegistryEntry_, "urlpath_regex"); -ACLStrategised ACLUrlPath::RegistryEntry_(new ACLRegexData, ACLUrlPathStrategy::Instance(), "urlpath_regex"); int ACLUrlPathStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) diff --git a/src/acl/UrlPort.cc b/src/acl/UrlPort.cc index 247d7748ba..e575c563f8 100644 --- a/src/acl/UrlPort.cc +++ b/src/acl/UrlPort.cc @@ -39,8 +39,6 @@ #include "acl/Checklist.h" #include "HttpRequest.h" -ACL::Prototype ACLUrlPort::RegistryProtoype(&ACLUrlPort::RegistryEntry_, "port"); -ACLStrategised ACLUrlPort::RegistryEntry_(new ACLIntRange, ACLUrlPortStrategy::Instance(), "port"); int ACLUrlPortStrategy::match (ACLData * &data, ACLFilledChecklist *checklist)