]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fixed the problem with Squid executable missing code to process ACLs.
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 17 Mar 2009 02:04:14 +0000 (20:04 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 17 Mar 2009 02:04:14 +0000 (20:04 -0600)
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.

29 files changed:
src/AclRegs.cc [new file with mode: 0644]
src/Makefile.am
src/acl/Arp.cc
src/acl/Browser.cc
src/acl/Certificate.cc
src/acl/DestinationDomain.cc
src/acl/DestinationIp.cc
src/acl/ExtUser.cc
src/acl/HttpRepHeader.cc
src/acl/HttpReqHeader.cc
src/acl/HttpStatus.cc
src/acl/Ident.cc
src/acl/MaxConnection.cc
src/acl/Method.cc
src/acl/MyIp.cc
src/acl/MyPort.cc
src/acl/MyPortName.cc
src/acl/PeerName.cc
src/acl/Protocol.cc
src/acl/Referer.cc
src/acl/ReplyMimeType.cc
src/acl/RequestMimeType.cc
src/acl/SourceDomain.cc
src/acl/SourceIp.cc
src/acl/SslError.cc
src/acl/Time.cc
src/acl/Url.cc
src/acl/UrlPath.cc
src/acl/UrlPort.cc

diff --git a/src/AclRegs.cc b/src/AclRegs.cc
new file mode 100644 (file)
index 0000000..1d000cb
--- /dev/null
@@ -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<char const *> ACLBrowser::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_USER_AGENT>::Instance(), "browser");
+ACL::Prototype ACLDestinationDomain::LiteralRegistryProtoype(&ACLDestinationDomain::LiteralRegistryEntry_, "dstdomain");
+ACLStrategised<char const *> ACLDestinationDomain::LiteralRegistryEntry_(new ACLDomainData, ACLDestinationDomainStrategy::Instance(), "dstdomain");
+ACL::Prototype ACLDestinationDomain::RegexRegistryProtoype(&ACLDestinationDomain::RegexRegistryEntry_, "dstdom_regex");
+ACLStrategised<char const *> 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<HttpHeader*> ACLHTTPRepHeader::RegistryEntry_(new ACLHTTPHeaderData, ACLHTTPRepHeaderStrategy::Instance(), "rep_header");
+ACL::Prototype ACLHTTPReqHeader::RegistryProtoype(&ACLHTTPReqHeader::RegistryEntry_, "req_header");
+ACLStrategised<HttpHeader*> 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<HttpRequestMethod> ACLMethod::RegistryEntry_(new ACLMethodData, ACLMethodStrategy::Instance(), "method");
+ACLMyIP ACLMyIP::RegistryEntry_;
+ACLMyIP const &ACLMyIP::RegistryEntry() {return RegistryEntry_;}
+ACL::Prototype ACLMyPort::RegistryProtoype(&ACLMyPort::RegistryEntry_, "myport");
+ACLStrategised<int> ACLMyPort::RegistryEntry_(new ACLIntRange, ACLMyPortStrategy::Instance(), "myport");
+ACL::Prototype ACLMyPortName::RegistryProtoype(&ACLMyPortName::RegistryEntry_, "myportname");
+ACLStrategised<const char *> ACLMyPortName::RegistryEntry_(new ACLStringData, ACLMyPortNameStrategy::Instance(), "myportname");
+ACL::Prototype ACLPeerName::RegistryProtoype(&ACLPeerName::RegistryEntry_, "peername");
+ACLStrategised<const char *> ACLPeerName::RegistryEntry_(new ACLStringData, ACLPeerNameStrategy::Instance(), "peername");
+ACL::Prototype ACLProtocol::RegistryProtoype(&ACLProtocol::RegistryEntry_, "proto");
+ACLStrategised<protocol_t> ACLProtocol::RegistryEntry_(new ACLProtocolData, ACLProtocolStrategy::Instance(), "proto");
+ACL::Prototype ACLReferer::RegistryProtoype(&ACLReferer::RegistryEntry_, "referer_regex");
+ACLStrategised<char const *> ACLReferer::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_REFERER>::Instance(), "referer_regex");
+ACL::Prototype ACLReplyMIMEType::RegistryProtoype(&ACLReplyMIMEType::RegistryEntry_, "rep_mime_type");
+ACLStrategised<char const *> ACLReplyMIMEType::RegistryEntry_(new ACLRegexData, ACLReplyHeaderStrategy<HDR_CONTENT_TYPE>::Instance(), "rep_mime_type");
+ACL::Prototype ACLRequestMIMEType::RegistryProtoype(&ACLRequestMIMEType::RegistryEntry_, "req_mime_type");
+ACLStrategised<char const *> ACLRequestMIMEType::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_CONTENT_TYPE>::Instance(), "req_mime_type");
+ACL::Prototype ACLSourceDomain::LiteralRegistryProtoype(&ACLSourceDomain::LiteralRegistryEntry_, "srcdomain");
+ACLStrategised<char const *> ACLSourceDomain::LiteralRegistryEntry_(new ACLDomainData, ACLSourceDomainStrategy::Instance(), "srcdomain");
+ACL::Prototype ACLSourceDomain::RegexRegistryProtoype(&ACLSourceDomain::RegexRegistryEntry_, "srcdom_regex");
+ACLStrategised<char const *> 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<time_t> ACLTime::RegistryEntry_(new ACLTimeData, ACLTimeStrategy::Instance(), "time");
+ACL::Prototype ACLUrl::RegistryProtoype(&ACLUrl::RegistryEntry_, "url_regex");
+ACLStrategised<char const *> ACLUrl::RegistryEntry_(new ACLRegexData, ACLUrlStrategy::Instance(), "url_regex");
+ACL::Prototype ACLUrlPath::LegacyRegistryProtoype(&ACLUrlPath::RegistryEntry_, "pattern");
+ACL::Prototype ACLUrlPath::RegistryProtoype(&ACLUrlPath::RegistryEntry_, "urlpath_regex");
+ACLStrategised<char const *> ACLUrlPath::RegistryEntry_(new ACLRegexData, ACLUrlPathStrategy::Instance(), "urlpath_regex");
+ACL::Prototype ACLUrlPort::RegistryProtoype(&ACLUrlPort::RegistryEntry_, "port");
+ACLStrategised<int> ACLUrlPort::RegistryEntry_(new ACLIntRange, ACLUrlPortStrategy::Instance(), "port");
+
+#ifdef ENABLE_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");
+    ACLStrategised<SSL *> ACLCertificate::UserRegistryEntry_(new ACLCertificateData (sslGetUserAttribute), ACLCertificateStrategy::Instance(), "user_cert");
+    ACL::Prototype ACLCertificate::CARegistryProtoype(&ACLCertificate::CARegistryEntry_, "ca_cert");
+    ACLStrategised<SSL *> 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
+
+
+
index 0d24396c9867a473e90031a3e5bd3c7dedc6b60a..ada0b2ffefd2c86c75c736281b9b9005ce2b9185 100644 (file)
@@ -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 \
index 0e6f891a63cc7e955bcfdee6e539aee1f6b8bcb8..37abbf81981a87e176bdc81e7900f8cee2e9ca87 100644 (file)
@@ -86,9 +86,7 @@ static int aclMatchArp(SplayNode<acl_arp_data *> **dataptr, IpAddress &c);
 static SplayNode<acl_arp_data *>::SPLAYCMP aclArpCompare;
 static SplayNode<acl_arp_data *>::SPLAYWALKEE aclDumpArpListWalkee;
 
-ACL::Prototype ACLARP::RegistryProtoype(&ACLARP::RegistryEntry_, "arp");
 
-ACLARP ACLARP::RegistryEntry_("arp");
 
 ACL *
 ACLARP::clone() const
index 5854253ed79ef92ce33532bbde054af5bf69c9af..02fa8dcbabe5d82b96300bb858fba39ecaa2fb76 100644 (file)
@@ -43,6 +43,4 @@
 
 template class ACLRequestHeaderStrategy<HDR_USER_AGENT>;
 
-ACL::Prototype ACLBrowser::RegistryProtoype(&ACLBrowser::RegistryEntry_, "browser");
 
-ACLStrategised<char const *> ACLBrowser::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_USER_AGENT>::Instance(), "browser");
index 5d72957bb41d45542b065c0a62e778277eb44f28..32c51f1409ca1014215d8ade63b2c1949cfa77de 100644 (file)
 #include "fde.h"
 #include "client_side.h"
 
-ACL::Prototype ACLCertificate::UserRegistryProtoype(&ACLCertificate::UserRegistryEntry_, "user_cert");
-ACLStrategised<SSL *> ACLCertificate::UserRegistryEntry_(new ACLCertificateData (sslGetUserAttribute), ACLCertificateStrategy::Instance(), "user_cert");
-ACL::Prototype ACLCertificate::CARegistryProtoype(&ACLCertificate::CARegistryEntry_, "ca_cert");
-ACLStrategised<SSL *> ACLCertificate::CARegistryEntry_(new ACLCertificateData (sslGetCAAttribute), ACLCertificateStrategy::Instance(), "ca_cert");
 
 int
 ACLCertificateStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
index 09aa9570ae13136781c84729882f72fdb02b2835..606c5f0192d21485951af40eeec0d3bc8511bc1f 100644 (file)
@@ -69,10 +69,6 @@ DestinationDomainLookup::LookupDone(const char *fqdn, void *data)
     checklist->check();
 }
 
-ACL::Prototype ACLDestinationDomain::LiteralRegistryProtoype(&ACLDestinationDomain::LiteralRegistryEntry_, "dstdomain");
-ACLStrategised<char const *> ACLDestinationDomain::LiteralRegistryEntry_(new ACLDomainData, ACLDestinationDomainStrategy::Instance(), "dstdomain");
-ACL::Prototype ACLDestinationDomain::RegexRegistryProtoype(&ACLDestinationDomain::RegexRegistryEntry_, "dstdom_regex");
-ACLStrategised<char const *> ACLDestinationDomain::RegexRegistryEntry_(new ACLRegexData,ACLDestinationDomainStrategy::Instance() ,"dstdom_regex");
 
 int
 ACLDestinationDomainStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
index 925d518e92b79c52235dd9d589f120f55b67a44e..46ca99bba3a5cb1c20e08646fac2bf1cb30ca719 100644 (file)
@@ -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
index a5cf9ffcc6511dc2f348b9560cbcf15e46c23258..f8913e7508c62316541e4b223cd0499637d56dc1 100644 (file)
@@ -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");
index d72af9bd70941dc6bac09306f48f94d47f2e658b..89ca1ecb05928bf699665519581e34911f86a351 100644 (file)
@@ -39,9 +39,7 @@
 #include "acl/Checklist.h"
 #include "HttpReply.h"
 
-ACL::Prototype ACLHTTPRepHeader::RegistryProtoype(&ACLHTTPRepHeader::RegistryEntry_, "rep_header");
 
-ACLStrategised<HttpHeader*> ACLHTTPRepHeader::RegistryEntry_(new ACLHTTPHeaderData, ACLHTTPRepHeaderStrategy::Instance(), "rep_header");
 
 int
 ACLHTTPRepHeaderStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
index a64b0d546645f9e68d4b864df02aac5fca2f7c3f..169d338356300a3f44698b87e6a14f89bfb56ebb 100644 (file)
@@ -39,9 +39,7 @@
 #include "acl/Checklist.h"
 #include "HttpRequest.h"
 
-ACL::Prototype ACLHTTPReqHeader::RegistryProtoype(&ACLHTTPReqHeader::RegistryEntry_, "req_header");
 
-ACLStrategised<HttpHeader*> ACLHTTPReqHeader::RegistryEntry_(new ACLHTTPHeaderData, ACLHTTPReqHeaderStrategy::Instance(), "req_header");
 
 int
 ACLHTTPReqHeaderStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
index d7c97315003f386081f7454e66469ddf598c98e2..a05fb9755071ec47e3237ecf44fa37820b252c3c 100644 (file)
@@ -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
index 7eddb18044560daf5a99290e960d81fa209e6e30..4753b8f433b183f932fd95a9caf5eb2ac43170fd 100644 (file)
@@ -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_;
 
index 5bc67fb5786bd92c3d9356eea7e6789e5a71d2da..c7cafe4fd6f6faccd63589bc8d99c7b1f03ca290 100644 (file)
@@ -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
index 93a5edb80c5645a99544b042632d506ec9952eaf..5039967ee4950ddd6a016c5e8253f8de577f09e0 100644 (file)
@@ -43,9 +43,7 @@
 
 template class ACLStrategised<HttpRequestMethod>;
 
-ACL::Prototype ACLMethod::RegistryProtoype(&ACLMethod::RegistryEntry_, "method");
 
-ACLStrategised<HttpRequestMethod> ACLMethod::RegistryEntry_(new ACLMethodData, ACLMethodStrategy::Instance(), "method");
 
 int
 ACLMethodStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
index 00729a99c4be0514f7d53b5f1cb05355c9608eaf..a94c636265d3562f970d3bb1ffa2db0cfe3b465b 100644 (file)
@@ -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
index 9cd9debfe6bdcf269e7cd9609214d18f1ba1707c..ffe9c72918c0138d64109cabbdb9d56a53db135d 100644 (file)
@@ -42,9 +42,7 @@
 
 template class ACLStrategised<int>;
 
-ACL::Prototype ACLMyPort::RegistryProtoype(&ACLMyPort::RegistryEntry_, "myport");
 
-ACLStrategised<int> ACLMyPort::RegistryEntry_(new ACLIntRange, ACLMyPortStrategy::Instance(), "myport");
 
 int
 ACLMyPortStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
index 2a394e4a0e6324e7cb771d739da024267a456af2..c95e2ac5babe86928a29ddcfe27bc7671e071d73 100644 (file)
@@ -43,9 +43,7 @@
 #include "client_side.h"
 
 
-ACL::Prototype ACLMyPortName::RegistryProtoype(&ACLMyPortName::RegistryEntry_, "myportname");
 
-ACLStrategised<const char *> ACLMyPortName::RegistryEntry_(new ACLStringData, ACLMyPortNameStrategy::Instance(), "myportname");
 
 int
 ACLMyPortNameStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
index 41284f17d7e69bd3203973b1e7c6b72372578de3..55bd41ccecb15643810f42f406c21820efcb7b49 100644 (file)
@@ -3,9 +3,7 @@
 #include "acl/StringData.h"
 #include "acl/Checklist.h"
 
-ACL::Prototype ACLPeerName::RegistryProtoype(&ACLPeerName::RegistryEntry_, "peername");
 
-ACLStrategised<const char *> ACLPeerName::RegistryEntry_(new ACLStringData, ACLPeerNameStrategy::Instance(), "peername");
 
 int
 ACLPeerNameStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
index 810d1c167953e41014549a94296ca1bab704fce4..3ed48a51266e282b74629673d1beaf227c54a804 100644 (file)
@@ -43,9 +43,7 @@
 
 template class ACLStrategised<protocol_t>;
 
-ACL::Prototype ACLProtocol::RegistryProtoype(&ACLProtocol::RegistryEntry_, "proto");
 
-ACLStrategised<protocol_t> ACLProtocol::RegistryEntry_(new ACLProtocolData, ACLProtocolStrategy::Instance(), "proto");
 
 int
 ACLProtocolStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
index 3a97bad5a90a5832662e54503e6fd4a7d07b6986..415903aa6a6f2756a87f0adbe4a9557c75a33939 100644 (file)
@@ -43,6 +43,4 @@
 
 template class ACLRequestHeaderStrategy<HDR_REFERER>;
 
-ACL::Prototype ACLReferer::RegistryProtoype(&ACLReferer::RegistryEntry_, "referer_regex");
 
-ACLStrategised<char const *> ACLReferer::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_REFERER>::Instance(), "referer_regex");
index ff07b65a28e22d4d6f048c64377a50f6befee986..265be3efeb18c05a845cae4dec8dd7327814e4ba 100644 (file)
@@ -43,6 +43,4 @@
 
 template class ACLReplyHeaderStrategy<HDR_CONTENT_TYPE>;
 
-ACL::Prototype ACLReplyMIMEType::RegistryProtoype(&ACLReplyMIMEType::RegistryEntry_, "rep_mime_type");
 
-ACLStrategised<char const *> ACLReplyMIMEType::RegistryEntry_(new ACLRegexData, ACLReplyHeaderStrategy<HDR_CONTENT_TYPE>::Instance(), "rep_mime_type");
index 91e921db47732d2992f939ce9b530faba441fe72..d7f96dd3f30d6c64800ad092cb35b97c4d4616c3 100644 (file)
@@ -43,6 +43,4 @@
 
 template class ACLRequestHeaderStrategy<HDR_CONTENT_TYPE>;
 
-ACL::Prototype ACLRequestMIMEType::RegistryProtoype(&ACLRequestMIMEType::RegistryEntry_, "req_mime_type");
 
-ACLStrategised<char const *> ACLRequestMIMEType::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_CONTENT_TYPE>::Instance(), "req_mime_type");
index 997b1638cdf059164291484518c3428f28549a8b..e49ef7a47f38694657489d26396449c425c9dba8 100644 (file)
@@ -67,10 +67,6 @@ SourceDomainLookup::LookupDone(const char *fqdn, void *data)
     checklist->check();
 }
 
-ACL::Prototype ACLSourceDomain::LiteralRegistryProtoype(&ACLSourceDomain::LiteralRegistryEntry_, "srcdomain");
-ACLStrategised<char const *> ACLSourceDomain::LiteralRegistryEntry_(new ACLDomainData, ACLSourceDomainStrategy::Instance(), "srcdomain");
-ACL::Prototype ACLSourceDomain::RegexRegistryProtoype(&ACLSourceDomain::RegexRegistryEntry_, "srcdom_regex");
-ACLStrategised<char const *> ACLSourceDomain::RegexRegistryEntry_(new ACLRegexData,ACLSourceDomainStrategy::Instance() ,"srcdom_regex");
 
 int
 ACLSourceDomainStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
index 3e275d6d79ad15c67fbfc91297774da17a7208f3..654dbade07b1d88f1c7732f87f7968f6bf4ef774 100644 (file)
@@ -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
index 59bc499d72ffdb0fa43e87b9f0ad20127bc5354b..5a19853c3b89cab90da3bdc62922448b41cfe8fe 100644 (file)
@@ -12,9 +12,7 @@
 
 template class ACLStrategised<int>;
 
-ACL::Prototype ACLSslError::RegistryProtoype(&ACLSslError::RegistryEntry_, "ssl_error");
 
-ACLStrategised<int> ACLSslError::RegistryEntry_(new ACLSslErrorData, ACLSslErrorStrategy::Instance(), "ssl_error");
 
 int
 ACLSslErrorStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
index 8733128f63b221df002bc8a877e70188fa21cf47..d4007ec071edb2f55d52774d6fc91ec3c9a56b3b 100644 (file)
@@ -39,8 +39,6 @@
 #include "acl/TimeData.h"
 #include "SquidTime.h"
 
-ACL::Prototype ACLTime::RegistryProtoype(&ACLTime::RegistryEntry_, "time");
-ACLStrategised<time_t> ACLTime::RegistryEntry_(new ACLTimeData, ACLTimeStrategy::Instance(), "time");
 
 int
 ACLTimeStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
index 1cff64ed394366105d3cdbd5f67bccc464d7c865..bd26c081138874c08042fc18131f90a4882ca9ea 100644 (file)
@@ -39,8 +39,6 @@
 #include "acl/Checklist.h"
 #include "acl/RegexData.h"
 
-ACL::Prototype ACLUrl::RegistryProtoype(&ACLUrl::RegistryEntry_, "url_regex");
-ACLStrategised<char const *> ACLUrl::RegistryEntry_(new ACLRegexData, ACLUrlStrategy::Instance(), "url_regex");
 
 int
 ACLUrlStrategy::match (ACLData<char const *> * &data, ACLFilledChecklist *checklist)
index 71a1671b126d0b4b5b1bf029abd2b412884d01fd..c36d170c86044d62f6de94446741873841655a7e 100644 (file)
@@ -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<char const *> ACLUrlPath::RegistryEntry_(new ACLRegexData, ACLUrlPathStrategy::Instance(), "urlpath_regex");
 
 int
 ACLUrlPathStrategy::match (ACLData<char const *> * &data, ACLFilledChecklist *checklist)
index 247d7748bac1f5d271f7e64193b5869e30eb9cf4..e575c563f8107dee26ddceb17362eff8a12ef321 100644 (file)
@@ -39,8 +39,6 @@
 #include "acl/Checklist.h"
 #include "HttpRequest.h"
 
-ACL::Prototype ACLUrlPort::RegistryProtoype(&ACLUrlPort::RegistryEntry_, "port");
-ACLStrategised<int> ACLUrlPort::RegistryEntry_(new ACLIntRange, ACLUrlPortStrategy::Instance(), "port");
 
 int
 ACLUrlPortStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)