#include <Acl.h>
Public Member Functions | |
void * | operator new (size_t) |
void | operator delete (void *) |
ACL () | |
ACL (ACL &&)=delete | |
virtual | ~ACL () |
void | context (const char *name, const char *configuration) |
sets user-specified ACL name and squid.conf context More... | |
bool | matches (ACLChecklist *checklist) const |
void | parseFlags () |
configures ACL options, throwing on configuration errors More... | |
virtual void | parse ()=0 |
parses node representation in squid.conf; dies on failures More... | |
virtual char const * | typeString () const =0 |
virtual bool | isProxyAuth () const |
virtual SBufList | dump () const =0 |
virtual bool | empty () const =0 |
virtual bool | valid () const |
int | cacheMatchAcl (dlink_list *cache, ACLChecklist *) |
virtual int | matchForCache (ACLChecklist *checklist) |
virtual void | prepareForUse () |
SBufList | dumpOptions () |
Static Public Member Functions | |
static void | ParseAclLine (ConfigParser &parser, ACL **head) |
static void | Initialize () |
static ACL * | FindByName (const char *name) |
Public Attributes | |
char | name [ACL_NAME_SZ] |
char * | cfgline |
ACL * | next |
bool | registered |
added to the global list of ACLs via aclRegister() More... | |
Private Member Functions | |
virtual int | match (ACLChecklist *checklist)=0 |
Matches the actual data in checklist against this ACL. More... | |
virtual bool | requiresAle () const |
whether our (i.e. shallow) match() requires checklist to have a AccessLogEntry More... | |
virtual bool | requiresRequest () const |
whether our (i.e. shallow) match() requires checklist to have a request More... | |
virtual bool | requiresReply () const |
whether our (i.e. shallow) match() requires checklist to have a reply More... | |
virtual const Acl::Options & | options () |
virtual const Acl::Options & | lineOptions () |
Detailed Description
A configurable condition. A node in the ACL expression tree. Can evaluate itself in FilledChecklist context. Does not change during evaluation.
Constructor & Destructor Documentation
◆ ACL() [1/2]
◆ ACL() [2/2]
|
delete |
◆ ~ACL()
|
virtual |
Member Function Documentation
◆ cacheMatchAcl()
int ACL::cacheMatchAcl | ( | dlink_list * | cache, |
ACLChecklist * | checklist | ||
) |
Definition at line 367 of file Acl.cc.
References acl_proxy_auth_match_cache::acl_data, dlink_node::data, debugs, dlinkAddTail(), dlink_list::head, acl_proxy_auth_match_cache::link, matchForCache(), acl_proxy_auth_match_cache::matchrv, name, and dlink_node::next.
Referenced by ACLProxyAuth::matchProxyAuth().
◆ context()
void ACL::context | ( | const char * | name, |
const char * | configuration | ||
) |
Definition at line 180 of file Acl.cc.
References ACL_NAME_SZ, cfgline, name, safe_free, xstrdup, and xstrncpy().
Referenced by aclParseAccessLine(), aclParseAclList(), Acl::AllOf::parse(), and ParseAclWithAction().
◆ dump()
|
pure virtual |
Implemented in Acl::AllOf, ACLARP, Acl::NotNode, Acl::ConnectionsEncrypted, Acl::ConnMark, ACLEui64, ACLExtUser, ACLHTTPStatus, Acl::InnerNode, ACLIP, ACLMaxConnection, Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLTimeData >, Acl::ParameterizedNode< ACLData< Ip::Address > >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< hier_code > >, Acl::ParameterizedNode< ACLData< HttpHeader * > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< err_type > >, ACLRandom, Acl::TransactionInitiator, ACLMaxUserIP, ACLProxyAuth, ACLExternal, and ACLIdent.
Referenced by dump_acl().
◆ dumpOptions()
SBufList ACL::dumpOptions | ( | ) |
- Returns
- approximate options configuration
Definition at line 326 of file Acl.cc.
References SBufStream::buf(), SBuf::isEmpty(), and options().
Referenced by dump_acl().
◆ empty()
|
pure virtual |
Implemented in ACLARP, Acl::ConnectionsEncrypted, Acl::ConnMark, ACLEui64, ACLExtUser, ACLHTTPStatus, Acl::InnerNode, ACLIP, ACLMaxConnection, Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLTimeData >, Acl::ParameterizedNode< ACLData< Ip::Address > >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< hier_code > >, Acl::ParameterizedNode< ACLData< HttpHeader * > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< err_type > >, ACLRandom, Acl::TransactionInitiator, ACLMaxUserIP, ACLProxyAuth, ACLExternal, and ACLIdent.
◆ FindByName()
|
static |
Definition at line 118 of file Acl.cc.
References SquidConfig::aclList, Config, debugs, name, and next.
Referenced by aclIsProxyAuth(), ExternalACLLookup::checkForAsync(), Acl::InnerNode::lineParse(), parse_ftp_epsv(), and ParseAclLine().
◆ Initialize()
|
static |
Definition at line 438 of file Acl.cc.
References SquidConfig::aclList, Config, debugs, next, and prepareForUse().
Referenced by serverConnectionsOpen().
◆ isProxyAuth()
|
virtual |
Reimplemented in ACLProxyAuth, ACLExternal, and ACLIdent.
Definition at line 309 of file Acl.cc.
Referenced by aclIsProxyAuth().
◆ lineOptions()
|
inlineprivatevirtual |
- Returns
- (linked) "line" Options supported by this ACL
- See also
- ACL::options()
Reimplemented in ACLExtUser, Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLTimeData >, Acl::ParameterizedNode< ACLData< Ip::Address > >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< hier_code > >, Acl::ParameterizedNode< ACLData< HttpHeader * > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< err_type > >, ACLProxyAuth, and ACLIdent.
Definition at line 109 of file Acl.h.
References Acl::NoOptions().
Referenced by parseFlags().
◆ match()
|
privatepure virtual |
Implemented in Acl::AdaptationServiceCheck, Acl::AnnotateClientCheck, Acl::AnnotateTransactionCheck, Acl::AtStepCheck, Acl::ClientCertificateCheck, Acl::DestinationAsnCheck, Acl::DestinationDomainCheck, Acl::HasComponentCheck, Acl::HierCodeCheck, Acl::HttpRepHeaderCheck, Acl::HttpReqHeaderCheck, Acl::LocalPortCheck, Acl::MethodCheck, Acl::MyPortNameCheck, Acl::NoteCheck, Acl::PeerNameCheck, Acl::ProtocolCheck, Acl::ReplyHeaderCheck< header >, Acl::RequestHeaderCheck< header >, Acl::ServerCertificateCheck, Acl::ServerNameCheck, Acl::SourceAsnCheck, Acl::SourceDomainCheck, Acl::SquidErrorCheck, Acl::CertificateErrorCheck, Acl::TagCheck, Acl::CurrentTimeCheck, Acl::UrlCheck, Acl::UrlLoginCheck, Acl::UrlPathCheck, Acl::UrlPortCheck, Acl::SnmpCommunityCheck, ACLARP, Acl::ConnectionsEncrypted, Acl::ConnMark, ACLDestinationIP, ACLEui64, ACLExtUser, ACLHTTPStatus, Acl::InnerNode, ACLLocalIP, ACLMaxConnection, ACLRandom, ACLSourceIP, Acl::TransactionInitiator, ACLProxyAuth, ACLExternal, ACLIdent, ACLIP, ACLMaxUserIP, Acl::ReplyHeaderCheck< header >, and Acl::RequestHeaderCheck< header >.
Referenced by matches().
◆ matches()
bool ACL::matches | ( | ACLChecklist * | checklist | ) | const |
Orchestrates matching checklist against the ACL using match(), after checking preconditions and while providing debugging.
- Returns
- true if and only if there was a successful match. Updates the checklist state on match, async, and failure.
Definition at line 146 of file Acl.cc.
References AclMatchedName, ACLChecklist::asyncInProgress(), DBG_IMPORTANT, debugs, ACLChecklist::hasAle(), ACLChecklist::hasReply(), ACLChecklist::hasRequest(), match(), name, requiresAle(), requiresReply(), requiresRequest(), and ACLChecklist::verifyAle().
Referenced by ACLChecklist::matchAndFinish(), and ACLChecklist::matchChild().
◆ matchForCache()
|
virtual |
Reimplemented in ACLProxyAuth.
Definition at line 349 of file Acl.cc.
References fatal().
Referenced by cacheMatchAcl().
◆ operator delete()
◆ operator new()
◆ options()
|
inlineprivatevirtual |
- Returns
- (linked) 'global' Options supported by this ACL
Reimplemented in Acl::DestinationDomainCheck, ACLDestinationIP, Acl::AnnotationCheck, Acl::ServerNameCheck, and ACLMaxUserIP.
Definition at line 105 of file Acl.h.
References Acl::NoOptions().
Referenced by dumpOptions(), and parseFlags().
◆ parse()
|
pure virtual |
Implemented in Acl::AllOf, Acl::AnyOf, ACLARP, Acl::NotNode, Acl::AndNode, Acl::OrNode, Acl::ConnectionsEncrypted, Acl::ConnMark, ACLEui64, ACLExtUser, ACLHTTPStatus, ACLIP, ACLMaxConnection, Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLTimeData >, Acl::ParameterizedNode< ACLData< Ip::Address > >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< hier_code > >, Acl::ParameterizedNode< ACLData< HttpHeader * > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< err_type > >, ACLRandom, Acl::TransactionInitiator, ACLMaxUserIP, ACLProxyAuth, ACLExternal, and ACLIdent.
◆ ParseAclLine()
|
static |
Definition at line 191 of file Acl.cc.
References A, ACL_NAME_SZ, SquidConfig::aclList, AclMatchedName, aclRegister(), assert, Config, config_input_line, DBG_CRITICAL, DBG_IMPORTANT, DBG_PARSE_NOTE, debugs, ConfigParser::destruct(), fatalf(), FindByName(), head, HttpPortList, LOCAL_ARRAY, Acl::Make(), ConfigParser::NextToken(), and xstrncpy().
Referenced by parse_acl(), and TestACLMaxUserIP::testParseLine().
◆ parseFlags()
void ACL::parseFlags | ( | ) |
Definition at line 315 of file Acl.cc.
References lineOptions(), options(), and Acl::ParseFlags().
◆ prepareForUse()
|
inlinevirtual |
Reimplemented in Acl::InnerNode, ACLMaxConnection, Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLTimeData >, Acl::ParameterizedNode< ACLData< Ip::Address > >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< hier_code > >, Acl::ParameterizedNode< ACLData< HttpHeader * > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, and Acl::ParameterizedNode< ACLData< err_type > >.
Definition at line 83 of file Acl.h.
Referenced by Initialize().
◆ requiresAle()
|
privatevirtual |
◆ requiresReply()
|
privatevirtual |
Reimplemented in Acl::HttpRepHeaderCheck, ACLHTTPStatus, and Acl::ReplyHeaderCheck< header >.
Definition at line 415 of file Acl.cc.
Referenced by matches().
◆ requiresRequest()
|
privatevirtual |
Reimplemented in Acl::AnnotateClientCheck, Acl::AnnotateTransactionCheck, Acl::DestinationAsnCheck, Acl::DestinationDomainCheck, Acl::HierCodeCheck, Acl::HttpReqHeaderCheck, Acl::MethodCheck, Acl::NoteCheck, Acl::ProtocolCheck, Acl::RequestHeaderCheck< header >, Acl::ServerNameCheck, Acl::TransactionInitiator, Acl::UrlCheck, Acl::UrlLoginCheck, Acl::UrlPathCheck, Acl::UrlPortCheck, ACLMaxUserIP, ACLProxyAuth, and ACLExternal.
Definition at line 421 of file Acl.cc.
Referenced by matches().
◆ typeString()
|
pure virtual |
Implemented in Acl::AllOf, Acl::AnyOf, ACLARP, Acl::NotNode, Acl::AndNode, Acl::OrNode, Acl::ConnectionsEncrypted, Acl::ConnMark, ACLDestinationIP, ACLEui64, ACLExtUser, ACLHTTPStatus, ACLLocalIP, ACLMaxConnection, ACLRandom, ACLSourceIP, Acl::TransactionInitiator, ACLMaxUserIP, ACLProxyAuth, ACLExternal, ACLIdent, and ACLIP.
Referenced by dump_acl().
◆ valid()
|
virtual |
Reimplemented in ACLMaxConnection, ACLRandom, Acl::ServerNameCheck, ACLMaxUserIP, ACLProxyAuth, and ACLExternal.
Member Data Documentation
◆ cfgline
char* ACL::cfgline |
Definition at line 88 of file Acl.h.
Referenced by ~ACL(), context(), and Acl::AllOf::parse().
◆ name
char ACL::name[ACL_NAME_SZ] |
Definition at line 87 of file Acl.h.
Referenced by ACL(), Acl::NotNode::NotNode(), ~ACL(), cacheMatchAcl(), context(), dump_acl(), FindByName(), ACLDestinationIP::match(), ACLRandom::match(), matches(), and ACLMaxConnection::prepareForUse().
◆ next
ACL* ACL::next |
Definition at line 89 of file Acl.h.
Referenced by dump_acl(), FindByName(), and Initialize().
◆ registered
bool ACL::registered |
Definition at line 90 of file Acl.h.
Referenced by aclDeregister(), aclDestroyAcls(), and aclRegister().
The documentation for this class was generated from the following files: