Gadgets.cc File Reference
#include "squid.h"
#include "acl/AclDenyInfoList.h"
#include "acl/Gadgets.h"
#include "acl/Tree.h"
#include "cache_cf.h"
#include "ConfigParser.h"
#include "errorpage.h"
#include "globals.h"
#include "HttpRequest.h"
#include "SquidConfig.h"
#include "src/sbuf/Stream.h"
#include <algorithm>
Include dependency graph for Gadgets.cc:

Go to the source code of this file.

Functions

err_type FindDenyInfoPage (const Acl::Answer &answer, const bool redirect_allowed)
 
bool aclIsProxyAuth (const std::optional< SBuf > &name)
 
void aclParseDenyInfoLine (AclDenyInfoList **head)
 
void aclParseAccessLine (const char *directive, ConfigParser &, acl_access **config)
 Parses a single line of a "action followed by acls" directive (e.g., http_access). More...
 
size_t aclParseAclList (ConfigParser &, ACLList **config, const char *label)
 
void aclDestroyAclList (ACLList **list)
 
void aclDestroyAccessList (acl_access **list)
 
void aclDestroyDenyInfoList (AclDenyInfoList **list)
 

Function Documentation

◆ aclIsProxyAuth()

bool aclIsProxyAuth ( const std::optional< SBuf > &  name)

Whether the given name names an Acl::Node object with true isProxyAuth() result. This is a safe variation of Acl::Node::FindByName(*name)->isProxyAuth().

Definition at line 62 of file Gadgets.cc.

References debugs, and Acl::Node::FindByName().

Referenced by ClientRequestContext::clientAccessCheckDone().

◆ aclParseAccessLine()

◆ aclParseAclList()

size_t aclParseAclList ( ConfigParser ,
ACLList **  ,
const char *  label 
)

Parses a single line of a "some context followed by acls" directive (e.g., note n v). The label parameter identifies the context (for debugging).

Returns
the number of parsed ACL names

Definition at line 184 of file Gadgets.cc.

References Acl::Tree::add(), assert, cfg_directive, config_input_line, Acl::Node::context(), Acl::InnerNode::lineParse(), and ToSBuf().

Referenced by aclParseAclList(), ConfigParser::optionalAclList(), Notes::parse(), parse_access_log(), parse_acl_address(), parse_acl_b_size_t(), parse_acl_tos(), parse_HeaderWithAclList(), parse_sslproxy_cert_adapt(), and parse_sslproxy_cert_sign().

◆ FindDenyInfoPage()

err_type FindDenyInfoPage ( const Acl::Answer ,
bool  allowCustomStatus 
)

The first configured deny_info error page ID matching the given access check outcome (or ERR_NONE).

Parameters
allowCustomStatuswhether to consider deny_info rules containing custom HTTP response status code

Definition at line 34 of file Gadgets.cc.

References A, Config, debugs, SquidConfig::denyInfoList, ERR_NONE, and Acl::Answer::lastCheckedName.

Referenced by ClientRequestContext::clientAccessCheckDone(), Client::handleAdaptationBlocked(), clientReplyContext::processReplyAccessResult(), and FwdState::Start().

 

Introduction

Documentation

Support

Miscellaneous