AFS

 view release on metacpan or  search on metacpan

pod/v2/afsperlpts.pod  view on Meta::CPAN


   0    un-authenticated connection should be made
   1    try authenticated first, fall back to un-authenticated
   2    fail if an authenticated connection can't be made

=item B<DESTRUCTOR>

=item S< >

=item B<$pts-E<gt>DESTROY;>

Destroys the ubik connection to the Protection Server and frees the ubik
connection structure.

=item B<CLASS METHODS>

=item S< >

=item B<$bits = AFS::PTS-E<gt>ascii2ptsaccess(FLAGS);>

Converts the privacy flags FLAGS (a string of five characters) into
its corresponding five privacy bits. The privacy flags indicate who
can display or administer certain aspects of a PTS entry.

=item B<$flags = AFS::PTS-E<gt>ptsaccess2ascii(BITS);>

Converts the five PTS privacy bits BITS into its corresponding privacy
flags (a string of five characters).  The privacy flags indicate who
can display or administer certain aspects of a PTS entry.

=item B<$value = AFS::PTS-E<gt>convert_numeric_names;>

=item B<AFS::PTS-E<gt>convert_numeric_names(NEWVAL);>

Gets or sets the global flag for converting names into numeric AFS ids.
If conversion is 'on' (default) all names NOT looking like a numeric
value are converted into its AFS id. If you set NEWVAL to 0 (conversion
is 'off'), B<NO> conversion is done.  You'll probably want to leave
conversion 'on' unless you create PTS names that look exactly like
numbers. (not a good idea to begin with :-)

=item S< >

=item B<INSTANCE METHODS> (high-level)

All high-level methods will accept either numeric AFS ids or AFS user
names.

=item S< >

=item B<$ok = $pts-E<gt>adduser(NAME, GROUP);>

Adds the given user NAME to the specified GROUP.  It calls the AFS
system library function 'PR_AddToGroup'.

=item B<$ok = $pts-E<gt>chid(NAME, NEWID);>

Changes the id for the given entry NAME to NEWID.  It calls the AFS
system library function 'PR_ChangeEntry'.

=item B<$ok = $pts-E<gt>chown(NAME, OWNER);>

Changes the owner of the given entry NAME to OWNER.  It calls the AFS
system library function 'PR_ChangeEntry'.

=item B<$id = $pts-E<gt>creategroup(NAME [, OWNER [, GID]]);>

Creates the new group NAME. You can optionally specify the OWNER and
the id GID of the new group.  If successful, the group ID allocated
for this new entry is returned. It calls the AFS system library
function 'PR_INewEntry' or 'PR_NewEntry'.

=item B<$id = $pts-E<gt>createuser(NAME [, UID]);>

Creates the new user NAME. You can optionally specify the id UID of
the new user.  If successful, the user ID allocated for this new entry
is returned. It calls the AFS system library function 'PR_INewEntry'
or 'PR_NewEntry'.

=item B<$ok = $pts-E<gt>delete(NAME);>

Deletes the entry NAME.  It calls the AFS system library function
'PR_Delete'.

=item B<$entry = $pts-E<gt>dumpentry(POS [, LOOKUP_ID [, CONV]]);>

Returns a reference to a hash table containing the values from the C
structure C<prdebugentry>. If LOOKUP_ID is 1 (default) then the AFS ids
in the hash table will be converted to names. If CONV is 1 (default)
then flags will be converted to its ASCII representation.  It calls
the AFS system library function 'PR_DumpEntry'.

=item B<@members = $pts-E<gt>getcps(NAME [, LOOKUP_ID [, OVER]]);>

Returns the I<Current Protection Subdomain> (CPS) for the given PTS
id. The CPS is the closure of all identities that the given NAME can
use. This list includes all the groups NAME belongs to, the special
AFS ids (system:anyuser and system:authuser), as well as the id
itself. If LOOKUP_ID is 1 (default) then names will be returned.  If
the size of the list is greater then &AFS::PR_MAXGROUPS then OVER will
be set to a non-zero value and only &AFS::PR_MAXGROUPS items will be
returned.  It calls the AFS system library function 'PR_GetCPS'.

=item B<$id = $pts-E<gt>id($NAME [, ANON]]);>

=item B<@id = $pts-E<gt>id(\@NAME [, ANON]]);>

=item B<$idref = $pts-E<gt>id(\%NAME [, ANON]]);>

Converts the NAME into a AFS id. The first method returns a single
id. The second method takes a reference to an array of names and
returns an array of ids. The third method takes a reference to a hash
table, the keys of which are names, and returns a reference to the
B<same hash>, with the ids as the value of each key.

If ANON is 1 (default) and a given name does not map into an id then
the value &AFS::ANONYMOUSID will be returned. If ANON is 0 then the id
will be set to undef.  It calls the AFS system library function
'PR_NameToID'.

=item B<$ok = $pts-E<gt>ismember(NAME, GROUP);>



( run in 0.511 second using v1.01-cache-2.11-cpan-5511b514fd6 )