BIND 10 trac997, updated. 46f82ccf0e1984c8b195a5492618f5d065682c3e [trac997] The ACL class implementation
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Jun 13 11:20:42 UTC 2011
The branch, trac997 has been updated
via 46f82ccf0e1984c8b195a5492618f5d065682c3e (commit)
from d324bf65587ab92ffc8a5a6f94cefc2fc78a52f5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 46f82ccf0e1984c8b195a5492618f5d065682c3e
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Mon Jun 13 13:20:21 2011 +0200
[trac997] The ACL class implementation
-----------------------------------------------------------------------
Summary of changes:
src/lib/acl/acl.h | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/acl/acl.h b/src/lib/acl/acl.h
index bc77635..958cdaa 100644
--- a/src/lib/acl/acl.h
+++ b/src/lib/acl/acl.h
@@ -96,7 +96,13 @@ public:
* passed to the checks.
*/
Action execute(const Context& context) const {
- // TODO a for cycle
+ for (typename Entries::const_iterator i(entries_.begin());
+ i != entries_.end(); ++ i) {
+ if (i->first->matches(context)) {
+ return (i->second);
+ }
+ }
+ return (policy_);
}
/**
* \brief Add new entry at the end of the list.
@@ -109,7 +115,7 @@ public:
* \param action The action to return when the thing matches this check.
*/
void append(CheckPtr check, const Action& action) {
-
+ entries_.push_back(Entry(check, action));
}
private:
// Just type abbreviations.
More information about the bind10-changes
mailing list