#include <ExternalACL.h>

Inheritance diagram for ACLExternal:
Collaboration diagram for ACLExternal:

Public Types

using Pointer = RefCount< Node >
 

Public Member Functions

 ACLExternal (char const *)
 
 ~ACLExternal () override
 
const char * typeString () const override
 
void parse () override
 parses node representation in squid.conf; dies on failures More...
 
int match (ACLChecklist *checklist) override
 Matches the actual data in checklist against this Acl::Node. More...
 
bool requiresAle () const override
 whether our (i.e. shallow) match() requires checklist to have a AccessLogEntry More...
 
bool requiresRequest () const override
 whether our (i.e. shallow) match() requires checklist to have a request More...
 
bool isProxyAuth () const override
 
SBufList dump () const override
 
bool valid () const override
 
bool empty () const override
 
void * operator new (size_t)
 
void operator delete (void *)
 
void context (const SBuf &aName, const char *configuration)
 sets user-specified ACL name and squid.conf context More...
 
bool matches (ACLChecklist *checklist) const
 
void parseFlags ()
 configures Acl::Node options, throwing on configuration errors More...
 
int cacheMatchAcl (dlink_list *cache, ACLChecklist *)
 
virtual int matchForCache (ACLChecklist *checklist)
 
virtual void prepareForUse ()
 
void dumpWhole (const char *directiveName, std::ostream &)
 

Static Public Member Functions

static void ParseNamedAcl (ConfigParser &, NamedAcls *&)
 parses acl directive parts that follow directive name (i.e. "acl") More...
 
static void Initialize ()
 
static Acl::NodeFindByName (const SBuf &)
 A configured ACL with a given name or nil. More...
 

Public Attributes

SBuf name
 
char * cfgline = nullptr
 

Private Member Functions

 MEMPROXY_CLASS (ACLExternal)
 
void startLookup (ACLFilledChecklist *, external_acl_data *, bool inBackground) const
 
Acl::Answer aclMatchExternal (external_acl_data *, ACLFilledChecklist *) const
 
char * makeExternalAclKey (ACLFilledChecklist *, external_acl_data *) const
 
virtual bool requiresReply () const
 whether our (i.e. shallow) match() requires checklist to have a reply More...
 
virtual const Acl::Optionsoptions ()
 
virtual const Acl::OptionslineOptions ()
 

Static Private Member Functions

static void StartLookup (ACLFilledChecklist &, const Acl::Node &)
 
static void LookupDone (void *data, const ExternalACLEntryPointer &)
 Called when an async lookup returns. More...
 
static void ParseNamed (ConfigParser &, NamedAcls &, const SBuf &name)
 parses acl directive parts that follow aclname More...
 

Private Attributes

external_acl_datadata
 
const char * class_
 

Detailed Description

Definition at line 20 of file ExternalACL.h.

Member Typedef Documentation

◆ Pointer

using Acl::Node::Pointer = RefCount<Node>
inherited

Definition at line 29 of file Node.h.

Constructor & Destructor Documentation

◆ ACLExternal()

ACLExternal::ACLExternal ( char const *  theClass)

Definition at line 1147 of file external_acl.cc.

◆ ~ACLExternal()

ACLExternal::~ACLExternal ( )
override

Definition at line 560 of file external_acl.cc.

References class_, data, and xfree.

Member Function Documentation

◆ aclMatchExternal()

◆ cacheMatchAcl()

◆ context()

void Acl::Node::context ( const SBuf aName,
const char *  configuration 
)
inherited

Definition at line 220 of file Acl.cc.

References safe_free, and xstrdup.

Referenced by aclParseAccessLine(), aclParseAclList(), Acl::AllOf::parse(), and ParseAclWithAction().

◆ dump()

SBufList ACLExternal::dump ( ) const
overridevirtual

◆ dumpWhole()

void Acl::Node::dumpWhole ( const char *  directiveName,
std::ostream &  os 
)
inherited

Prints aggregated "acl" (or similar) directive configuration, including the given directive name, ACL name, ACL type, and ACL parameters. The printed parameters are collected from all same-name "acl" directives.

Definition at line 371 of file Acl.cc.

References asList().

◆ empty()

bool ACLExternal::empty ( ) const
overridevirtual

Implements Acl::Node.

Definition at line 555 of file external_acl.cc.

◆ FindByName()

Acl::Node * Acl::Node::FindByName ( const SBuf name)
staticinherited

◆ Initialize()

void Acl::Node::Initialize ( )
staticinherited

Definition at line 471 of file Acl.cc.

References Config, debugs, and SquidConfig::namedAcls.

Referenced by serverConnectionsOpen().

◆ isProxyAuth()

bool ACLExternal::isProxyAuth ( ) const
overridevirtual

Reimplemented from Acl::Node.

Definition at line 1157 of file external_acl.cc.

References data, external_acl_data::def, and external_acl::require_auth.

◆ lineOptions()

◆ LookupDone()

void ACLExternal::LookupDone ( void *  data,
const ExternalACLEntryPointer result 
)
staticprivate

◆ makeExternalAclKey()

◆ match()

int ACLExternal::match ( ACLChecklist checklist)
overridevirtual

◆ matches()

bool Acl::Node::matches ( ACLChecklist checklist) const
inherited

Orchestrates matching checklist against the Acl::Node 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 189 of file Acl.cc.

References ACLChecklist::asyncInProgress(), DBG_IMPORTANT, debugs, ACLChecklist::hasAle(), ACLChecklist::hasReply(), ACLChecklist::hasRequest(), ACLChecklist::setLastCheckedName(), and ACLChecklist::verifyAle().

Referenced by ACLChecklist::matchAndFinish().

◆ matchForCache()

int Acl::Node::matchForCache ( ACLChecklist checklist)
virtualinherited

Reimplemented in ACLProxyAuth.

Definition at line 383 of file Acl.cc.

References fatal().

◆ MEMPROXY_CLASS()

ACLExternal::MEMPROXY_CLASS ( ACLExternal  )
private

◆ operator delete()

void Acl::Node::operator delete ( void *  )
inherited

Definition at line 153 of file Acl.cc.

References fatal().

◆ operator new()

void * Acl::Node::operator new ( size_t  )
inherited

Definition at line 147 of file Acl.cc.

References fatal().

◆ options()

virtual const Acl::Options& Acl::Node::options ( )
inlineprivatevirtualinherited
Returns
(linked) 'global' Options supported by this Acl::Node

Reimplemented in Acl::ServerNameCheck, Acl::DestinationDomainCheck, Acl::AnnotationCheck, ACLMaxUserIP, and ACLDestinationIP.

Definition at line 98 of file Node.h.

References Acl::NoOptions().

◆ parse()

◆ parseFlags()

void Acl::Node::parseFlags ( )
inherited

Definition at line 360 of file Acl.cc.

References Acl::ParseFlags().

◆ ParseNamed()

void Acl::Node::ParseNamed ( ConfigParser parser,
NamedAcls namedAcls,
const SBuf name 
)
staticprivateinherited

◆ ParseNamedAcl()

void Acl::Node::ParseNamedAcl ( ConfigParser parser,
NamedAcls *&  namedAcls 
)
staticinherited

◆ prepareForUse()

◆ requiresAle()

bool ACLExternal::requiresAle ( ) const
inlineoverridevirtual

Reimplemented from Acl::Node.

Definition at line 32 of file ExternalACL.h.

◆ requiresReply()

bool Acl::Node::requiresReply ( ) const
privatevirtualinherited

Reimplemented in ACLHTTPStatus, Acl::ReplyHeaderCheck< header >, and Acl::HttpRepHeaderCheck.

Definition at line 449 of file Acl.cc.

◆ requiresRequest()

bool ACLExternal::requiresRequest ( ) const
inlineoverridevirtual

Reimplemented from Acl::Node.

Definition at line 33 of file ExternalACL.h.

◆ StartLookup()

void ACLExternal::StartLookup ( ACLFilledChecklist checklist,
const Acl::Node acl 
)
staticprivate

Asks the helper (if needed) or returns the [cached] result (otherwise). Does not support "background" lookups. See also: ACLExternal::Start().

Definition at line 1009 of file external_acl.cc.

References startLookup().

Referenced by aclMatchExternal().

◆ startLookup()

◆ typeString()

const char * ACLExternal::typeString ( ) const
overridevirtual

Implements Acl::Node.

Definition at line 1151 of file external_acl.cc.

References class_.

◆ valid()

bool ACLExternal::valid ( ) const
overridevirtual

Member Data Documentation

◆ cfgline

char* Acl::Node::cfgline = nullptr
inherited

Definition at line 83 of file Node.h.

◆ class_

const char* ACLExternal::class_
private

Definition at line 50 of file ExternalACL.h.

Referenced by typeString(), and ~ACLExternal().

◆ data

external_acl_data* ACLExternal::data
private

Definition at line 49 of file ExternalACL.h.

Referenced by dump(), isProxyAuth(), LookupDone(), match(), parse(), valid(), and ~ACLExternal().

◆ name

SBuf Acl::Node::name
inherited

Either aclname parameter from the explicitly configured acl directive or a label generated for an internal ACL tree node. All Node objects corresponding to one Squid configuration have unique names. See also: context() and FindByName().

Definition at line 81 of file Node.h.

Referenced by aclDestroyAccessList(), Acl::AnnotateClientCheck::match(), Acl::AnnotateTransactionCheck::match(), ACLRandom::match(), Acl::SourceDomainCheck::match(), ACLDestinationIP::match(), Acl::NotNode::NotNode(), parse(), and ACLMaxConnection::prepareForUse().


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous