
afsperlacl - ACL functions

use AFS; # import all AFS names use AFS @AFS::ACL; # import just the ACL names AFS::ACL::new ascii2rights cleanacl copyacl crights getacl modifyacl newacl rights2ascii setacl $acl -> empty; $acl -> addacl $acl -> clear $acl -> copy; $acl -> exists $acl -> get $acl -> keys $acl -> length $acl -> remove $acl -> set $acl -> nclear $acl -> nexists $acl -> nget $acl -> nkeys $acl -> nlength $acl -> nremove $acl -> nset

This document describes the ACL related functions available in the AFS module.


Used to create an ACL object. The second form is exported by the AFS
module and is therefore a little easier to use.
Examples:
$acl = newacl({"schemers"=>crights("all"), "system:anyuser"=>"l"});
$acl = newacl({"schemers"=>"rl"}, {"rjs"=>"l"});

Returns a copy of an existing ACL.
$newacl = $acl->copy;
Changes made to $newacl do not change $acl.

Adds all the ACL entries in $newacl to $acl.

Removes all positive and negative entries from an ACL.

Returns all the keys (PTS names) from the positive ACL hash.

Returns the length (number of keys) in the postive ACL hash.

Returns the access rights for the given key in the positive ACL hash.

Returns 1 if the given key exists in the positive ACL hash.

Adds the given key and access rights to the positive ACL hash.

Removes the given key from the positive ACL hash.

Removes all positive entries from the ACL.







Same as above but work on the negative ACL hash instead of the positive.

Retrieves the ACL for the given path.
For example:
$acl = getacl("/afs/ir.stanford.edu");

Sets the ACL for the given path. This call replaces the existing ACL value with the new ACLs.

Sets the ACL to the union of the given ACL and the current ACL.
An access right of "none" or "" will cause an entry to be removed from
the ACL.
Example:
$ok = modifyacl($path,newacl({"schemers" => "none"}));
Will remove "schemers" from the ACL on $path. Since this function does
a union on both hash tables it is not an error if "schemers" is not
on the existing ACl.

Copies the ACL on $from_path to $to_path.

Removes any "orphan" ids on an ACL. An orphan id is an ID that corresponds to an ID that is longer in the PTS database. Orphan ids are also removed during a setacl or modifyacl call.

Returns -1 if $rights are not valid (rlidwka, read, write, all, none). or returns the internal value (int32 with flags set).

Converts $internal_value to ascii.

Canonicalize rights string. Recognizes the following "special" rights
strings:
read => rl
write => rlidwk
all => rlidwka
mail => lik
Will also remove duplicate rights and "sort" the rights (rlidwka)
$crights = crights("arkail"); # "rlika"