Checklist.h
Go to the documentation of this file.
143 bool matchChild(const Acl::InnerNode *parent, Acl::Nodes::const_iterator pos, const ACL *child);
210 Breadcrumb(const Acl::InnerNode *aParent, Acl::Nodes::const_iterator aPos): parent(aParent), position(aPos) {}
211 bool operator ==(const Breadcrumb &b) const { return parent == b.parent && (!parent || position == b.position); }
static bool action(int fd, size_t metasize, const char *fn, const char *url, const SquidMetaList &meta)
Definition: purge.cc:311
Definition: Checklist.h:55
Definition: Acl.h:122
virtual void verifyAle() const =0
warns if there are uninitialized ALE components and fills them
std::stack< Breadcrumb > matchPath
suspended (due to an async lookup) matches() in the ACL tree
Definition: Checklist.h:243
NodeMatchingResult
possible outcomes when trying to match a single ACL node in a list
Definition: Checklist.h:219
void banAction(const Acl::Answer &action)
add action to the list of banned actions
Definition: Checklist.cc:395
bool keepMatching() const
Whether we should continue to match tree nodes or stop/pause.
Definition: Checklist.h:146
void checkCallback(Acl::Answer answer)
Calls non-blocking check callback with the answer and destroys self.
Definition: Checklist.cc:158
Definition: Checklist.h:47
virtual bool hasAle() const =0
An intermediate ACL tree node. Manages a collection of child tree nodes.
Definition: InnerNode.h:22
Definition: Checklist.h:27
bool asyncInProgress() const
async call has been started and has not finished (or failed) yet
Definition: Checklist.h:151
Definition: HttpRequest.h:49
bool operator==(const Breadcrumb &b) const
Definition: Checklist.h:211
std::vector< Acl::Answer > bannedActions_
the list of actions which must ignored during acl checks
Definition: Checklist.h:245
virtual bool hasRequest() const =0
void markFinished(const Acl::Answer &newAnswer, const char *reason)
Definition: Checklist.cc:57
bool operator!=(const Breadcrumb &b) const
Definition: Checklist.h:212
virtual void checkForAsync(ACLChecklist *) const =0
virtual void syncAle(HttpRequest *adaptedRequest, const char *logUri) const =0
assigns uninitialized adapted_request and url ALE components
virtual bool hasReply() const =0
void preCheck(const char *what)
prepare for checking ACLs; called once per check
Definition: Checklist.cc:67
Breadcrumb(const Acl::InnerNode *aParent, Acl::Nodes::const_iterator aPos)
Definition: Checklist.h:210
unsigned asyncLoopDepth_
how many times the current async state has resumed
Definition: Checklist.h:238
void resumeNonBlockingCheck(AsyncState *state)
Definition: Checklist.cc:261
void matchAndFinish()
performs (or resumes) an ACL tree match and, if successful, sets the action
Definition: Checklist.cc:291
bool prepNonBlocking()
common parts of nonBlockingCheck() and resumeNonBlockingCheck()
Definition: Checklist.cc:20
bool matchChild(const Acl::InnerNode *parent, Acl::Nodes::const_iterator pos, const ACL *child)
Definition: Checklist.cc:81
virtual void checkForAsync(ACLChecklist *) const
Definition: Checklist.cc:206
void nonBlockingCheck(ACLCB *callback, void *callback_data)
Definition: Checklist.cc:237
bool bannedAction(const Acl::Answer &action) const
whether the action is banned or not
Definition: Checklist.cc:387