AFS
view release on metacpan or search on metacpan
pod/v2/afsperlktcp.pod view on Meta::CPAN
#------------------------------------------------------------------------------
# RCS-Id: "@(#)$RCS-Id: pod/v2/afsperlktcp.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::KTC_PRINCIPAL> - Class to handle the B<AFS structure ktc_principal>
=head1 SYNOPSIS
use AFS::KTC_PRINCIPAL;
use AFS::Cell qw(localcell);
my ($name, $inst, $cell) = AFS::KTC_PRINCIPAL->ParseLoginName('nog.admin@MPA-GARCHING.MPG.DE');
print "name = ", $name, "\n";
print "instance = ", $inst, "\n";
print "cell = ", $cell, "\n\n";
my $user = AFS::KTC_PRINCIPAL->new('nog', '', localcell);
print "name = ", $user->name, "\n";
print "instance = ", $user->instance, "\n";
print "cell = ", $user->cell, "\n";
print "principal = ", $user->principal, "\n";
$user->set("rjsnfs", "root", localcell);
print "principal = ", $user->principal, "\n";
undef $user;
my $index =0;
while( $service = AFS::KTC_PRINCIPAL->ListTokens($index)) {
print "\nToken Num = $index\n";
print "name = ", $service->name, "\n";
print "instance = ", $service->instance, "\n";
print "cell = ", $service->cell, "\n";
print "principal = ", $service->principal, "\n";
}
undef $service;
=head1 DESCRIPTION
This class provides methods to handle the B<AFS structure ktc_principal>.
This structure represents a principal which is used in the I<Kernel Token
Cache> (KTC). All entities on the network (users and services) are
called I<principals>. The KTC is part of the Cache Manager.
It is used to create, modify, and retrieve B<ktc_principal> instances.
It has methods to retrieve and to reset the B<KTC_principal>
attributes.
=head1 COMPATIBILITY
B<This release does NOT support any features and interfaces
from version 1.>
=head1 OBJECT ATTRIBUTES
=over 4
=item B<name>
Name of the user or service.
=item B<instance>
Instance of the user or service.
=item B<cell>
Name of the cell
=back
=head1 METHODS
=over 4
=item B<CONSTRUCTOR>
=item S< >
=item B<$princ = AFS::KTC_PRINCIPAL-E<gt>new(NAME [, INSTANCE [, CELL]]);>
=item B<$princ = AFS::KTC_PRINCIPAL-E<gt>new(NAME.INSTANCE@CELL);>
Creates a new object of the class AFS::KTC_PRINCIPAL and sets its
values for NAME, INSTANCE and CELL.
=item B<$service = AFS::KTC_PRINCIPAL-E<gt>ListTokens(INDEX);>
Searches in the token cache for the INDEX+1th token. On success it
returns the corresponding principal instance $service and it
increments INDEX. If there is no INDEX+1th element AFS::CODE is set
and the return value is C<undef>. It calls the AFS system library
function 'ktc_ListTokens'.
=item B<CLASS METHODS>
=item S< >
=item B<($name, $instance, $cell) = AFS::KTC_PRINCIPAL-E<gt>ParseLoginName(LOGIN);>
Parses the string LOGIN. It defines a syntax to allow a user to
specify his identity in terms of his name, instance and cell with a
single string. The syntax is very simple: the first dot ('.')
separates the name from the instance and the first atsign ('@') begins
the cell name. A backslash ('\') can be used to quote these special
characters. It calls the AFS system library function
'ka_ParseLoginName'.
=item B<ATTRIBUTES ACCESS>
=item S< >
( run in 0.960 second using v1.01-cache-2.11-cpan-98e64b0badf )