AFS
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
pod/v2/afsperlacl.pod view on Meta::CPAN
#------------------------------------------------------------------------------
# RCS-Id: "@(#)$RCS-Id: pod/v2/afsperlacl.pod 2e2ca60 Tue Apr 15 13:04:20 2014 +0200 Norbert E Gruener$"
#
# © 2001-2014 Norbert E. Gruener <nog@MPA-Garching.MPG.de>
#
# This is free software; you can redistribute it and/or modify it under
# the same terms as the Perl 5 programming language system itself.
#------------------------------------------------------------------------------
=head1 NAME
B<AFS::ACL> - Class to handle the B<AFS Access Control Lists>
=head1 SYNOPSIS
use AFS::ACL;
my $acl = AFS::ACL->new({'foobar' => 'none'}, {'anyuser' => 'write'});
$acl->set('rjs' => 'write');
$acl->nset('opusl' => 'write');
$acl->remove('rjsnfs' => 'write');
$acl->clear;
foreach my $user ($acl->get_users) {
print " $user ", $acl->get_rights($user), "\n";
}
foreach my $user ($acl->nget_users) {
print " $user ", $acl->nget_rights($user), "\n";
}
my $ok = $acl->apply('/afs/mpa/home/guest');
my $copy = $acl->copy;
my $rights = AFS::ACL->crights('read');
my $new_acl = AFS::ACL->retrieve('/afs/mpa/home/nog');
$ok = $new_acl->modifyacl('/afs/mpa/home/guest');
=head1 DESCRIPTION
This class provides methods to handle the B<AFS Access Control Lists>
(ACL). It is used to create, modify, delete, and reset ACL instances.
It has methods to retrieve and to set the ACL list for directories and
its files.
These methods have the optional argument FOLLOW. FOLLOW determines
which file should be used should PATH be a symbolic link. If FOLLOW be
set to 1, then the symbolic link is followed to its target. If FOLLOW
is set to 0, then the method applies to the symbolic link itself. If
not specified FOLLOW defaults to 1.
=head1 COMPATIBILITY
B<This release does NOT support any features and interfaces
from version 1.>
=head1 METHODS
=over 4
=item B<CONSTRUCTOR>
=item S< >
=item B<$acl = AFS::ACL-E<gt>new([\%POS [, \%NEG]]);>
Creates a new object of the class AFS::ACL. The constructor takes two
optional arguments. C<%POS> and C<%NEG> are lists of positive and
negative ACL entries given in the form of user-rights pairs, just like a
hash table.
=item B<COPY CONSTRUCTOR>
=item S< >
=item B<$new_acl = $acl-E<gt>copy;>
Returns a copy of an existing ACL object.
=item B<CLASS METHODS>
=item S< >
=item B<$acl = AFS::ACL-E<gt>retrieve(PATH [, FOLLOW]);>
Retrieves the ACL list for the given PATH and stores it in the object $acl.
=item B<$ok = AFS::ACL-E<gt>copyacl(FROMDIR, TODIR [, FOLLOW]);>
Copies the ACL list from a source directory FROMDIR to the specified destination
directory TODIR. The source directory''s ACL is unchanged.
=item B<$ok = AFS::ACL-E<gt>cleanacl(PATH [, FOLLOW]);>
Removes from the ACL list of the specified PATH any entry that
refers to a user or group that no longer has a Protection Database entry.
=item B<$crights = AFS::ACL-E<gt>crights(RIGHTS);>
Canonicalizes the RIGHTS string. Duplicate rights will be removed. It recognizes
the following special strings:
read => rl
write => rlidwk
all => rlidwka
mail => lik
=item B<$flags = AFS::ACL-E<gt>ascii2rights(RIGHTS);>
Converts RIGHTS as expressed in a character string to its internal value
(an integer with the appropriate bits set). Returns -1 if RIGHTS are
not valid (rlidwka, read, write, all, none) or returns the internal
value (int32 with bits set).
=item B<$rights = AFS::ACL-E<gt>rights2ascii(FLAGS);>
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.391 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )