Subject: | calc_mask doesn't work as expected |
calc_mask doesn't calculate/set the mask appropriately given the users/groups/permissions set in the acl.
The cause is a return that's a little too early in calc_mask (ACL.pm):
sub calc_mask
{
...
foreach $type ('users', 'groups')
{
if(defined $acl->{$type})
{
foreach $uid (keys(%{$acl->{$type}}))
{
$acl->{'mask'} |= $acl->{$type}->{$uid};
}
}
Show quoted text
>>> return $acl->{'mask'};
}
}
this will only traverse the lists of users/groups once before returning from the function - i.e groups won't be considered. The indicated line (return) should be moved to be below the following brace