aboutsummaryrefslogtreecommitdiff
path: root/perl/lib/Wallet/ACL/Nested.pm
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2016-01-16 15:34:22 -0800
committerRuss Allbery <eagle@eyrie.org>2016-01-16 15:35:49 -0800
commitd2fde5b8330cab6bd6210ef99a628b1897676897 (patch)
tree3bdb4383a95efc5c36b7fabe07ca7df0cb50f719 /perl/lib/Wallet/ACL/Nested.pm
parent44b98b0005effceb6fb5497b336fa86e05675e6f (diff)
Pass object type and name to external ACL verifiers
This requires changing the ACL verifier plumbing to pass object type and name all the way through when verifying ACLs. Hopefully I caught everything.
Diffstat (limited to 'perl/lib/Wallet/ACL/Nested.pm')
-rw-r--r--perl/lib/Wallet/ACL/Nested.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/perl/lib/Wallet/ACL/Nested.pm b/perl/lib/Wallet/ACL/Nested.pm
index 07833f8..3b6c827 100644
--- a/perl/lib/Wallet/ACL/Nested.pm
+++ b/perl/lib/Wallet/ACL/Nested.pm
@@ -59,7 +59,7 @@ sub syntax_check {
# that entry. We also want to keep track of things already checked in order
# to avoid any loops.
sub check {
- my ($self, $principal, $group) = @_;
+ my ($self, $principal, $group, $type, $name) = @_;
unless ($principal) {
$self->error ('no principal specified');
return;
@@ -78,8 +78,9 @@ sub check {
# to go through each entry and decide if the given acl has access.
my @members = $self->get_membership ($group);
for my $entry (@members) {
- my ($type, $name) = @{ $entry };
- my $result = $acl->check_line ($principal, $type, $name);
+ my ($scheme, $identifier) = @{ $entry };
+ my $result = $acl->check_line ($principal, $scheme, $identifier,
+ $type, $name);
return 1 if $result;
}
return 0;