#include "squid.h"
#include "acl/Acl.h"
#include "acl/FilledChecklist.h"
#include "cache_cf.h"
#include "client_side.h"
#include "client_side_request.h"
#include "comm/Connection.h"
#include "ConfigParser.h"
#include "ExternalACL.h"
#include "ExternalACLEntry.h"
#include "fde.h"
#include "format/Token.h"
#include "helper.h"
#include "helper/Reply.h"
#include "http/Stream.h"
#include "HttpHeaderTools.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "ip/tools.h"
#include "MemBuf.h"
#include "mgr/Registration.h"
#include "rfc1738.h"
#include "SquidConfig.h"
#include "SquidString.h"
#include "Store.h"
#include "tools.h"
#include "wordlist.h"
#include "ssl/ServerBump.h"
#include "ssl/support.h"
#include "auth/Acl.h"
#include "auth/Gadgets.h"
#include "auth/UserRequest.h"
#include "ident/AclIdent.h"
Go to the source code of this file.
Classes | |
class | external_acl |
class | external_acl_data |
class | externalAclState |
Macros | |
#define | DEFAULT_EXTERNAL_ACL_TTL 1 * 60 * 60 |
#define | DEFAULT_EXTERNAL_ACL_CHILDREN 5 |
Macro Definition Documentation
◆ DEFAULT_EXTERNAL_ACL_CHILDREN
#define DEFAULT_EXTERNAL_ACL_CHILDREN 5 |
Definition at line 55 of file external_acl.cc.
◆ DEFAULT_EXTERNAL_ACL_TTL
#define DEFAULT_EXTERNAL_ACL_TTL 1 * 60 * 60 |
Definition at line 52 of file external_acl.cc.
Function Documentation
◆ aclMatchExternal()
|
static |
Definition at line 597 of file external_acl.cc.
References ACCESS_DUNNO, AuthenticateAcl(), external_acl::cache, copyResultsFromEntry(), ExternalACLEntry::date, DBG_IMPORTANT, debugs, external_acl_data::def, ExternalACLEntry::def, ACLFilledChecklist::extacl_entry, external_acl_cache_touch(), external_acl_entry_expired(), external_acl_grace_expired(), external_acl_message, ACLChecklist::goAsync(), hash_lookup(), ExternalACLLookup::Instance(), hash_link::key, ExternalACLEntry::log, makeExternalAclKey(), ExternalACLEntry::message, external_acl::name, ACLFilledChecklist::request, external_acl::require_auth, ExternalACLEntry::result, ExternalACLLookup::Start(), ExternalACLEntry::tag, String::termedBuf(), external_acl::theHelper, and ExternalACLEntry::user.
Referenced by ACLExternal::match().
◆ copyResultsFromEntry()
|
static |
Definition at line 572 of file external_acl.cc.
References HttpRequest::clientConnectionManager, HttpRequest::extacl_log, HttpRequest::extacl_message, HttpRequest::extacl_passwd, HttpRequest::extacl_user, CbcPointer< Cbc >::get(), ExternalACLEntry::log, ExternalACLEntry::message, ExternalACLEntry::notes, ExternalACLEntry::password, String::size(), ExternalACLEntry::tag, HttpRequest::tag, UpdateRequestNotes(), and ExternalACLEntry::user.
Referenced by aclMatchExternal().
◆ dump_externalAclHelper()
void dump_externalAclHelper | ( | StoreEntry * | sentry, |
const char * | name, | ||
const external_acl * | list | ||
) |
Definition at line 374 of file external_acl.cc.
References DEFAULT_EXTERNAL_ACL_CHILDREN, DEFAULT_EXTERNAL_ACL_TTL, wordlist::key, Format::LOG_QUOTE_SHELL, node::next, wordlist::next, and storeAppendPrintf().
◆ external_acl_cache_add()
|
static |
Definition at line 844 of file external_acl.cc.
References ACCESS_DUNNO, external_acl::add(), external_acl::cache, debugs, ExternalACLEntry::def, external_acl_cache_delete(), external_acl_cache_touch(), hash_lookup(), hash_link::key, external_acl::maybeCacheable(), MYNAME, ExternalACLEntryData::result, ExternalACLEntry::update(), and xstrdup.
Referenced by externalAclHandleReply().
◆ external_acl_cache_delete()
|
static |
Definition at line 882 of file external_acl.cc.
References assert, external_acl::cache, external_acl::cache_entries, external_acl::cache_size, ExternalACLEntry::def, dlinkDelete(), RefCount< C >::getRaw(), hash_remove_link(), ExternalACLEntry::lru, and external_acl::lru_list.
Referenced by external_acl::~external_acl(), external_acl_cache_add(), and external_acl::trimCache().
◆ external_acl_cache_touch()
|
static |
Definition at line 749 of file external_acl.cc.
References dlinkAdd(), dlinkDelete(), RefCount< C >::getRaw(), ExternalACLEntry::lru, external_acl::lru_list, external_acl::maybeCacheable(), and ExternalACLEntry::result.
Referenced by aclMatchExternal(), and external_acl_cache_add().
◆ external_acl_entry_expired()
|
static |
Definition at line 816 of file external_acl.cc.
References ACCESS_DUNNO, Acl::Answer::allowed(), external_acl::cache_size, ExternalACLEntry::date, external_acl::negative_ttl, ExternalACLEntry::result, squid_curtime, and external_acl::ttl.
Referenced by aclMatchExternal().
◆ external_acl_grace_expired()
|
static |
Definition at line 828 of file external_acl.cc.
References ACCESS_DUNNO, Acl::Answer::allowed(), external_acl::cache_size, ExternalACLEntry::date, external_acl::grace, external_acl::negative_ttl, ExternalACLEntry::result, squid_curtime, and external_acl::ttl.
Referenced by aclMatchExternal().
◆ externalAclHandleReply()
|
static |
Definition at line 951 of file external_acl.cc.
References ACCESS_ALLOWED, ACCESS_DENIED, ACCESS_DUNNO, NotePairs::append(), externalAclState::callback, externalAclState::callback_data, cbdataReferenceValid(), cbdataReferenceValidDone, debugs, externalAclState::def, dlinkDelete(), Helper::Error, external_acl_cache_add(), NotePairs::findFirst(), externalAclState::key, externalAclState::list, ExternalACLEntryData::log, ExternalACLEntryData::message, ExternalACLEntryData::notes, Helper::Reply::notes, Helper::Okay, ExternalACLEntryData::password, external_acl::queue, externalAclState::queue, ExternalACLEntryData::result, Helper::Reply::result, ExternalACLEntryData::tag, and ExternalACLEntryData::user.
Referenced by ExternalACLLookup::Start().
◆ externalAclInit()
void externalAclInit | ( | void | ) |
Definition at line 1109 of file external_acl.cc.
References Config, SquidConfig::externalAclHelperList, externalAclRegisterWithCacheManager(), hash4, hash_create(), hashPrime(), IPC_TCP_SOCKET, Helper::Client::Make(), and external_acl::next.
Referenced by mainInitialize(), mainReconfigureFinish(), and mainRotate().
◆ externalAclRegisterWithCacheManager()
|
static |
Definition at line 1101 of file external_acl.cc.
References externalAclStats(), and Mgr::RegisterAction().
Referenced by externalAclInit().
◆ externalAclShutdown()
void externalAclShutdown | ( | void | ) |
Definition at line 1133 of file external_acl.cc.
References Config, SquidConfig::externalAclHelperList, helperShutdown(), external_acl::next, and external_acl::theHelper.
Referenced by mainReconfigureStart(), mainRotate(), and SquidShutdown().
◆ externalAclStats()
|
static |
Definition at line 1089 of file external_acl.cc.
References assert, Config, SquidConfig::externalAclHelperList, external_acl::next, and storeAppendPrintf().
Referenced by externalAclRegisterWithCacheManager().
◆ find_externalAclHelper()
|
static |
Definition at line 431 of file external_acl.cc.
References Config, SquidConfig::externalAclHelperList, and node::next.
Referenced by ACLExternal::parse().
◆ free_externalAclHelper()
void free_externalAclHelper | ( | external_acl ** | list | ) |
Definition at line 424 of file external_acl.cc.
◆ makeExternalAclKey()
|
static |
Definition at line 761 of file external_acl.cc.
References ACLFilledChecklist::al, external_acl_data::arguments, Format::Format::assemble(), MemBuf::buf, MemBuf::clean(), external_acl_data::def, external_acl::format, Format::Format::format, ACLChecklist::goAsync(), MemBuf::init(), IdentLookup::Instance(), AccessLogEntry::lastAclData, AccessLogEntry::lastAclName, Format::LFT_EXT_ACL_DATA, Format::LFT_EXT_ACL_NAME, Format::LFT_USER_IDENT, Format::LOG_QUOTE_URL, external_acl_data::name, Format::Token::next, wordlist::next, external_acl::quote, MemBuf::reset(), rfc1738_escape, ACLFilledChecklist::rfc931, safe_free, sb, MemBuf::size, strwordquote(), and xstrdup.
Referenced by aclMatchExternal(), and ExternalACLLookup::Start().
◆ parse_externalAclHelper()
void parse_externalAclHelper | ( | external_acl ** | list | ) |
Definition at line 179 of file external_acl.cc.
References SBuf::append(), assert, SBuf::c_str(), external_acl::cache_size, external_acl::children, external_acl::cmdline, Helper::ChildConfig::concurrency, DBG_CRITICAL, DBG_IMPORTANT, DBG_PARSE_NOTE, debugs, Helper::ChildConfig::defaultQueueSize, ConfigParser::DisableMacros(), Ip::EnableIpv6, ConfigParser::EnableMacros(), external_acl::format, Format::Format::format, external_acl::grace, SBuf::length(), Format::LFT_ADAPTED_REQUEST_HEADER, Format::LFT_ADAPTED_REQUEST_HEADER_ELEM, Format::LFT_EXT_ACL_DATA, Format::LFT_EXT_ACL_USER_CA_CERT, Format::LFT_EXT_ACL_USER_CERT, Format::LFT_REPLY_HEADER, Format::LFT_REPLY_HEADER_ELEM, Format::LFT_USER_LOGIN, external_acl::local_addr, Format::LOG_QUOTE_NONE, Format::LOG_QUOTE_SHELL, Format::LOG_QUOTE_URL, Helper::ChildConfig::n_idle, Helper::ChildConfig::n_max, Helper::ChildConfig::n_startup, external_acl::name, external_acl::negative_ttl, external_acl::next, ConfigParser::NextToken(), parse_wordlist(), Helper::ChildConfig::queue_size, external_acl::quote, quote, external_acl::require_auth, self_destruct(), Ip::Address::setIPv4(), Format::Token::space, external_acl::ttl, Format::Token::type, wordlistAdd(), and xstrdup.