AFS
view release on metacpan or search on metacpan
pod/v2/afsperlpts.pod view on Meta::CPAN
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);>
Returns a non-zero value if NAME is a member of GROUP. It calls the
AFS system library function 'PR_IsAMemberOf'.
=item B<$entry = $pts-E<gt>listentry(NAME [, LOOKUP_ID [, CONV]]);>
Returns a reference to a hash table containing the values from the C
structure C<prcheckentry>. If LOOKUP_ID is 1 (default) then the PTS
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_ListEntry'.
=item B<($uid, $gid) = $pts-E<gt>listmax;>
Returns the largest allocated user ID and group ID. It calls the AFS
system library function 'PR_ListMax'.
=item B<@members = $pts-E<gt>members(NAME [, LOOKUP_ID [, OVER]]);>
Returns the list of groups in which the user NAME is a member. If NAME
is a group, this method returns a list of users which are in that
group. 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_ListElements'.
=item B<$name = $pts-E<gt>name(ID [, ANON]]);>
=item B<@name = $pts-E<gt>name(ID [, ANON]]);>
=item B<$nameref = $pts-E<gt>name(ID [, ANON]]);>
Converts AFS ID into a name. The first method returns a single
name. The second method takes a reference to an array of ids and
returns an array of names. The third method takes a reference to a
hash table, the keys of which are ids, and returns a reference to the
B<same hash>, with the names as the value of each key. If ANON is 1
(default) and a given id does not map into a name then the id value
will be converted to a string (i.e, 11234 => "11234").
If ANON is 0 then the name will be set to undef. It calls the AFS
system library function 'PR_IDToName'.
=item B<@members = $pts-E<gt>owned(NAME [, LOOKUP_ID [, OVER]]);>
Returns a list of AFS ids owned by the given user or group NAME. If
NAME is 0, then the PDB orphan list is returned. There is also a
global orphan list, which contains entries for all orphans, namely
groups belonging to users that have been deleted from the PDB. 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_ListOwned'.
=item B<$ok = $pts-E<gt>rename(NAME, NEWNAME);>
Renames NAME into NEWNAME. It calls the AFS system library function
'PR_ChangeEntry'.
=item B<$ok = $pts-E<gt>removeuser(NAME, GROUP);>
Removes the user NAME from GROUP. It calls the AFS system library
function 'PR_RemoveFromGroup'.
=item B<$ok = $pts-E<gt>setaccess(NAME, NEWFLAG);>
Sets the privacy flags for the given entry NAME to NEWFLAG. It calls
the AFS system library function 'PR_SetFieldsEntry'.
=item B<$ok = $pts-E<gt>setgroupquota(NAME, NGROUPS);>
Sets the group creation quota for NAME to NGROUPS. It calls the AFS
system library function 'PR_SetFieldsEntry'.
pod/v2/afsperlpts.pod view on Meta::CPAN
ANONYMOUSID, or SYSADMINID) will be rejected. The new name, if any, to
assign to the entry is held in NAME. If no name change is to be made,
then the name argument may be set to NULL. Similarly, the numerical
ID of the entry's (possibly new) owner is listed in the OID
parameter. If no owner change is desired, OID is set to zero. Finally,
a new numerical ID may be specified for the given entry in NEWID. If
this is set to zero, then the entry's ID will not be altered.
=item B<$ok = $pts-E<gt>PR_Delete(ID);>
Deletes the PDB entry for the user or group whose id is ID.
=item B<$entry = $pts-E<gt>PR_DumpEntry(POS);>
Returns the contents of the PDB entry located at byte offset POS
within the database, and is intended to be used only for debugging.
=item B<@ids = $pts-E<gt>PR_GetCPS(ID, OVER);>
Generate the Current Protection Subdomain, or CPS, for the AFS user with
the given numerical ID. Basically, the CPS is the closure of all
identities that the given ID can use. This list of groups and special
AFS ids (e.g. ANYUSERID and AUTHUSERID) to which the specified user
belongs is returned. The user's own ID also appears on this list. If
the size of the list has overflowed the maximum list size, PR_MAXGROUPS
(5,000), then the OVER argument is set to a nonÂzero value.
=item B<@names = $pts-E<gt>PR_IDToName(\@IDS);>
Converts the array of numerical AFS user IDS into the appropriate
printable AFS user names. Entries in the given list IDS for which the
Protection Server does not have an IDÂtoÂname mapping are translated
to the string representation of the numerical ID, in base 10.
=item B<$id = $pts-E<gt>PR_INewEntry(NAME, ID, OID);>
Creates an entry in the PDB for a user or group with the given NAME,
and whose owner's id is OID. The numerical AFS id must be set to the
given value ID. If successful, the given ID allocated for this new
entry is returned.
=item B<$ok = $pts-E<gt>PR_IsAMemberOf(UID, GID);>
Returns a non-zero value if user UID is a member of group GID.
=item B<@ids = $pts-E<gt>PR_ListElements(ID, OVER);>
For the user ID, this method returns the list of groups in which the
user is a member. For the group ID, this method returns a list of
users which are in that group. Note that this function returns
numerical ids, not names. If the size of the generated list has
overflowed the maximum list size, PR_MAXGROUPS (5,000), then the OVER
argument is set to a nonÂzero value.
=item B<$entry = $pts-E<gt>PR_ListEntry(ID);>
Returns a reference to a hash table containing the values from the C
structure C<prcheckentry> for the PDB entry ID. No conversion is done
on ids or flags.
=item B<($uid, $gid) = $pts-E<gt>PR_ListMax;>
Returns the largest allocated user id and group id.
=item B<@members = $pts-E<gt>PR_ListOwned(ID, OVER);>
Returns a list of AFS ids owned by the given user or group ID. If the
ID parameter is set to zero, then the PDB orphan list is returned. If
the size of the generated list has overflowed the maximum list size,
PR_MAXGROUPS (5,000), then the OVER argument is set to a nonÂzero
value.
=item B<@ids = $pts-E<gt>PR_NameToID(\@NAMES);>
Converts the array of AFS NAMES into the appropriate AFS ids. Entries
in the given list NAMES for which the Protection Server does not have
an IDÂtoÂname mapping are set to &AFS::ANONYMOUS.
=item B<$id = $pts-E<gt>PR_NewEntry(NAME, FLAG, OID);>
Creates an entry in the PDB for a user or group with the given NAME,
and whose owner's ID is OID. If successful, the user or group ID
allocated for this new entry is returned. The FLAG argument is used
to communicate whether the entry is for a user or group. Legal values
are
&AFS::PRGRP create a group
&AFS::PRUSER create a user
=item B<$ok = $pts-E<gt>PR_RemoveFromGroup(UID, GID);>
Removes the given AFS id UID from the group identified by GID.
=item B<$ok = $pts-E<gt>PR_SetFieldsEntry(ID, MASK, FLAGS, NGROUPS, NUSERS, S1, S2);>
This method allows a caller to change one or more fields within the
PDB entry matching the given user ID. The MASK argument is used to
select which fields are to be changed. Depending on what has been
selected, the values placed in the argument fLAGS (setting the flag
bits), NGROUPS (setting the group creation limit), and/or NUSERS
(setting the foreign user limit) are inserted into the PDB entry. The
remaining two arguments, S1 and S2, are not referenced, and are
reserved for future expansion.
=item B<$ok = $pts-E<gt>PR_SetMax(ID, GFLAG);>
Sets the value of either the highestÂallocated AFS user or group to
ID. The GFLAG argument is set to a nonÂzero value if the given ID is
for a group, and to zero for an individual user.
=item B<$pos = $pts-E<gt>PR_WhereIsIt(ID);>
Returns the PDB byte offset for ID. This method is used in conjunction
with the method 'PR_DumpEntry'.
=back
=head1 CURRENT AUTHOR
Norbert E. Gruener E<lt>nog@MPA-Garching.MPG.deE<gt>
( run in 0.855 second using v1.01-cache-2.11-cpan-ceb78f64989 )