Norbert Gruener > AFS > AFS::KTC_PRINCIPAL

Download:
AFS-2.6.3.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Module Version: v2.6.3   Source  

NAME ^

AFS::KTC_PRINCIPAL - Class to handle the AFS structure ktc_principal

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;

DESCRIPTION ^

This class provides methods to handle the AFS structure ktc_principal. This structure represents a principal which is used in the Kernel Token Cache (KTC). All entities on the network (users and services) are called principals. The KTC is part of the Cache Manager.

It is used to create, modify, and retrieve ktc_principal instances. It has methods to retrieve and to reset the KTC_principal attributes.

COMPATIBILITY ^

This release does NOT support any features and interfaces from version 1.

OBJECT ATTRIBUTES ^

name

Name of the user or service.

instance

Instance of the user or service.

cell

Name of the cell

METHODS ^

CONSTRUCTOR
 
$princ = AFS::KTC_PRINCIPAL->new(NAME [, INSTANCE [, CELL]]);
$princ = AFS::KTC_PRINCIPAL->new(NAME.INSTANCE@CELL);

Creates a new object of the class AFS::KTC_PRINCIPAL and sets its values for NAME, INSTANCE and CELL.

$service = AFS::KTC_PRINCIPAL->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 undef. It calls the AFS system library function 'ktc_ListTokens'.

CLASS METHODS
 
($name, $instance, $cell) = AFS::KTC_PRINCIPAL->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'.

ATTRIBUTES ACCESS
 
$princ->ATTRIBUTE([value]);

Retrieves or sets the value for the specified object attribute, where ATTRIBUTE is one of the above listed object attributes (e.g. name).

INSTANCE METHODS
 
$princ->set(NAME, INSTANCE, CELL);
$princ->set(NAME.INSTANCE@CELL);

Resets the value of the attributes NAME, INSTANCE and CELL for the principal instance.

CURRENT AUTHOR ^

Norbert E. Gruener <nog@MPA-Garching.MPG.de>

AUTHOR EMERITUS ^

Roland Schemers <schemers@slapshot.stanford.edu>

COPYRIGHT AND DISCLAIMER ^

 Copyright (c) 2001-2010 Norbert E. Gruener <nog@MPA-Garching.MPG.de>.
 All rights reserved.

 Copyright (c) 1994 Board of Trustees, Leland Stanford Jr. University.
 All rights reserved.

Most of the explanations in this document are taken from the original AFS documentation.

 AFS-3 Programmer's Reference:
 Authentication Server Interface
 Edward R. Zayas
 Copyright (c) 1991 Transarc Corporation.
 All rights reserved.

 IBM AFS Administration Reference
 Copyright (c) IBM Corporation 2000.
 All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The original module is covered by the following copyright:

Copyright (c) 1994 Board of Trustees, Leland Stanford Jr. University

Redistribution and use in source and binary forms are permitted provided that the above copyright notice and this paragraph are duplicated in all such forms and that any documentation, advertising materials, and other materials related to such distribution and use acknowledge that the software was developed by Stanford University. The name of the University may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

DOCUMENT VERSION ^

Revision $Rev: 1059 $

syntax highlighting: