AFS

 view release on metacpan or  search on metacpan

CHANGES  view on Meta::CPAN

 * added patch for OpenAFS to create "PIC" type system libraries on
   64-bit platforms
 * compiles with OpenAFS system libraries version 1.4.X on 32-bit and
   on 64-bit platforms
 * added installation description for 64-bit platforms
 * released the BOS methods
   - addhost
   - removehost
   - adduser
   - removeuser
   - setrestart
 * updated POD documentation of AFS::VLDB
   updated argument description for VOLUME in several
   methods: "(volume name or volume ID number)"
 * fixed method AFS::VOS->create
 * extended method AFS::VOS->dump: added "omitdir" option
 * added new method AFS::ACL->is_clean
 * modified AFS::ACL->cleanacl: uses method "is_clean" to check if
   there is anything to do
 * method AFS::VOS->listvolume provides also the values "copyDate",
   "backupDate", and "accessDate"

CHANGES  view on Meta::CPAN

 * fixed method AFS::VOS->listvolume: returns volume name when
   volume id number is given
 * patched function fs_getquota
 * improved POD documentation for AFS::VOS


 Developer-visible changes:
 * all unit test drivers are now using Test::More
 * modified the computing of the VERSION numbers
 * added dummy function "GetUInt32"
 * modified internal function set_code



Version 2.2.3 (released 17 Feb 2005, revision 679)

 NOTICE:
 * This release does not support AFS system libraries version 3.4 or
   version 3.5

 User-visible changes:

CHANGES  view on Meta::CPAN

  pts_PR_DumpEntry
  kas_KAM_GetEntry
  kas_KAM_Debug
  kas_KAM_GetStats



Version 2.02 (released 12 July 2002, revision 221)

 User-visible changes:
 * fixed bug in method AFS::KAS->setfields resp. AFS::KAS->KAM_SetFields
   introduced in version 2.01


 Developer-visible changes:
 * modified 'typemap' file: added type 'uint32'



Version 2.01 (released 8 July 2002, revision 211)

CHANGES  view on Meta::CPAN

   methods for all AFS classes have been corrected to conform with the
   Perl OO conventions.
 * module structure has been changed.  In order to have clean Perl
   interfaces the AFS Perl code has been separated into several
   logical modules.  All modules have been implemented as OO classes.
 * compatibility mode for version 1.X.  All old variables and
   functions from version 1 are still available for compatibility, but
   are deprecated.  These cases have been marked in the documentation.
 * numerous example scripts for version 2.0
 * new functions 'XSVERSION', 'get_syslib_version', 'get_server_version',
   'getcrypt' and 'setcrypt'
 * new set of POD documentations for version 2.0



 Developer-visible changes:
 * compiles with OpenAFS
 * constructor methods for all AFS classes have been corrected to
   conform with the Perl OO conventions.
 * modified 'typemap' file: renamed following types
   AFS::PTS_SERVER         AFS::PTS
   AFS::KA_AUTHSERVER      AFS::KAS

CHANGES  view on Meta::CPAN



 Developer-visible changes:
 * applied Patches from Perl Pollution Portability V1.0007



Version 1.08 beta (released 16 June 1999, revision 57)

 User-visible changes:
 * added example for function ka_setfields


 Developer-visible changes:
 * none



Version 1.08 alpha (released 3 May 1999, revision 55)

 User-visible changes:

CHANGES  view on Meta::CPAN



 Developer-visible changes:
 * none



Version 1.08 (released 27 April 1999, revision 54)

 User-visible changes:
 * patched function fs_setquota
 * added function flushcb


 Developer-visible changes:
 * none



Version 1.07 (released 8 April 1999, revision 44)

 User-visible changes:
 * added support for AIX machines
 * patched function fs_setquota


 Developer-visible changes:
 * none



Version 1.06 (released 6 April 1999, revision 40)

 User-visible changes:

INSTALL  view on Meta::CPAN


    If your AFS system type is not yet known by the make file because
    you can't run the "fs sysname" command, you can specify the
    environment variable 'AFS_SYSNAME' before you start [2].

    This is the sequence of commands to build the modules:

        cd AFS-<version>

        [1] this step is optional
        setenv AFSPATH 'path_to_the_AFS_system_libraries' # tcsh-shell
        export AFSPATH='path_to_the_AFS_system_libraries' # sh-shell

        [2] this step is optional
        setenv AFS_SYSNAME 'AFS_system_type'              # tcsh-shell
        export AFS_SYSNAME 'AFS_system_type'              # sh-shell

        perl Makefile.PL
             ---->  Which AFS system libraries should be used? [/usr/afsws]
        make
        make test
        make install
        make html   ;#(if you want to get the HTML documentation, see also next section)


INSTALL_64  view on Meta::CPAN


    If your AFS system type is not yet known by the make file because
    you can't run the "fs sysname" command, you can specify the
    environment variable 'AFS_SYSNAME' before you start [2].

    This is the sequence of commands to build the modules:

        cd AFS-<version>

        [1] this step is optional
        setenv AFSPATH 'path_to_the_AFS_system_libraries' # tcsh-shell
        export AFSPATH='path_to_the_AFS_system_libraries' # sh-shell

        [2] this step is optional
        setenv AFS_SYSNAME 'AFS_system_type'              # tcsh-shell
        export AFS_SYSNAME 'AFS_system_type'              # sh-shell

        perl Makefile.PL
             ---->  Which AFS system libraries should be used? [/usr/afsws]
        make
        make test
        make install
        make html   ;#(if you want to get the HTML documentation, see also next section)


LICENCES/IBM-LICENCE  view on Meta::CPAN

       import and otherwise transfer the Contribution of such
       Contributor, if any, in source code and object code form. This
       patent license shall apply to the combination of the Contribution
       and the Program if, at the time the Contribution is added by the
       Contributor, such addition of the Contribution causes such
       combination to be covered by the Licensed Patents. The patent
       license shall not apply to any other combinations which include
       the Contribution. No hardware per se is licensed hereunder.
       
   c) Recipient understands that although each Contributor grants the
       licenses to its Contributions set forth herein, no assurances are
       provided by any Contributor that the Program does not infringe the
       patent or other intellectual property rights of any other entity.
       Each Contributor disclaims any liability to Recipient for claims
       brought by any other entity based on infringement of intellectual
       property rights or otherwise. As a condition to exercising the
       rights and licenses granted hereunder, each Recipient hereby
       assumes sole responsibility to secure any other intellectual
       property rights needed, if any. For example, if a third party
       patent license is required to allow Recipient to distribute the
       Program, it is Recipient's responsibility to acquire that license
       before distributing the Program.
       
   d) Each Contributor represents that to its knowledge it has sufficient
       copyright rights in its Contribution, if any, to grant the
       copyright license set forth in this Agreement.
       
   3. REQUIREMENTS
   
   A Contributor may choose to distribute the Program in object code form
   under its own license agreement, provided that:
   a) it complies with the terms and conditions of this Agreement; and
       
   b) its license agreement:
       
   i) effectively disclaims on behalf of all Contributors all warranties

LICENCES/IBM-LICENCE  view on Meta::CPAN

   against any losses, damages and costs (collectively "Losses") arising
   from claims, lawsuits and other legal actions brought by a third party
   against the Indemnified Contributor to the extent caused by the acts
   or omissions of such Commercial Contributor in connection with its
   distribution of the Program in a commercial product offering. The
   obligations in this section do not apply to any claims or Losses
   relating to any actual or alleged intellectual property infringement.
   In order to qualify, an Indemnified Contributor must: a) promptly
   notify the Commercial Contributor in writing of such claim, and b)
   allow the Commercial Contributor to control, and cooperate with the
   Commercial Contributor in, the defense and any related settlement
   negotiations. The Indemnified Contributor may participate in any such
   claim at its own expense.
   
   For example, a Contributor might include the Program in a commercial
   product offering, Product X. That Contributor is then a Commercial
   Contributor. If that Commercial Contributor then makes performance
   claims, or offers warranties related to Product X, those performance
   claims and warranties are such Commercial Contributor's responsibility
   alone. Under this section, the Commercial Contributor would have to
   defend claims against the other Contributors related to those

MANIFEST  view on Meta::CPAN

examples/v2/bos/getrestricted
examples/v2/bos/listhosts
examples/v2/bos/listkeys
examples/v2/bos/listusers
examples/v2/bos/prune
examples/v2/bos/removehost
examples/v2/bos/removekey
examples/v2/bos/removeuser
examples/v2/bos/restart
examples/v2/bos/salvage
examples/v2/bos/setauth
examples/v2/bos/setcellname
examples/v2/bos/setrestart
examples/v2/bos/setrestricted
examples/v2/bos/shutdown
examples/v2/bos/start
examples/v2/bos/startup
examples/v2/bos/status
examples/v2/bos/stop
examples/v2/cell/configdir
examples/v2/cell/expandcell
examples/v2/cell/getcellinfo
examples/v2/cell/localcell
examples/v2/cell/whichcell

MANIFEST  view on Meta::CPAN

examples/v2/cm/cm_access
examples/v2/cm/flush
examples/v2/cm/flushcb
examples/v2/cm/flushvolume
examples/v2/cm/getcacheparms
examples/v2/cm/getcellstatus
examples/v2/cm/getcrypt
examples/v2/cm/getfid
examples/v2/cm/getvolstats
examples/v2/cm/pioctl
examples/v2/cm/setcachesize
examples/v2/cm/setcellstatus
examples/v2/cm/setcrypt
examples/v2/fs/examine
examples/v2/fs/getquota
examples/v2/fs/isafs
examples/v2/fs/lsmount
examples/v2/fs/mkmount
examples/v2/fs/rmmount
examples/v2/fs/setquota
examples/v2/fs/whereis
examples/v2/kas/Authenticate
examples/v2/kas/AuthServerConn
examples/v2/kas/ChangePassword
examples/v2/kas/constructor
examples/v2/kas/create
examples/v2/kas/debug
examples/v2/kas/delete
examples/v2/kas/examine
examples/v2/kas/getentry
examples/v2/kas/getstats
examples/v2/kas/GetToken
examples/v2/kas/listentry
examples/v2/kas/randomkey
examples/v2/kas/setfields
examples/v2/kas/setpassword
examples/v2/kas/SingleServerConn
examples/v2/ktck/des_string_to_key
examples/v2/ktck/ReadPassword
examples/v2/ktck/StringToKey
examples/v2/ktck/UserReadPassword
examples/v2/ktcp/constructor
examples/v2/ktcp/ListTokens
examples/v2/ktcp/ParseLoginName
examples/v2/ktct/ForgetAllTokens
examples/v2/ktct/FromString

MANIFEST  view on Meta::CPAN

examples/v2/pts/PR_ListEntry
examples/v2/pts/PR_ListMax
examples/v2/pts/PR_ListOwned
examples/v2/pts/PR_NameToID
examples/v2/pts/PR_NewEntry
examples/v2/pts/PR_RemoveFromGroup
examples/v2/pts/PR_WhereIsIt
examples/v2/pts/ptsaccess2ascii
examples/v2/pts/removeuser
examples/v2/pts/rename
examples/v2/pts/setaccess
examples/v2/pts/setgroupquota
examples/v2/pts/setmax
examples/v2/pts/whereisit
examples/v2/utils/get_server_version
examples/v2/utils/get_syslib_version
examples/v2/utils/setpag
examples/v2/utils/sysname
examples/v2/utils/unlog
examples/v2/utils/XSVERSION
examples/v2/vldb/addsite
examples/v2/vldb/changeloc
examples/v2/vldb/constructor
examples/v2/vldb/delentry
examples/v2/vldb/delgroups
examples/v2/vldb/listaddrs
examples/v2/vldb/listvldb

MANIFEST  view on Meta::CPAN

examples/v2/vos/listvol
examples/v2/vos/listvolume
examples/v2/vos/move
examples/v2/vos/offline
examples/v2/vos/online
examples/v2/vos/partinfo
examples/v2/vos/release
examples/v2/vos/remove
examples/v2/vos/rename
examples/v2/vos/restore
examples/v2/vos/setquota
examples/v2/vos/status
examples/v2/vos/zap
INSTALL
INSTALL_64
LICENCES/Artistic
LICENCES/COPYING
LICENCES/IBM-LICENCE
LICENCES/Stanford-LICENCE
Makefile.PL
MANIFEST			This list of files

examples/v2/acl/modifyacl  view on Meta::CPAN


my $new_acl = AFS::ACL->new({ 'guest', AFS::ACL->crights('all')});
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

my $ok = $new_acl->modifyacl($dir);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "OK = $ok \n"; }

system "fs la $dir";

$new_acl->set('guest', 'none');

$ok = $new_acl->modifyacl($dir);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "OK = $ok \n"; }

system "fs la $dir";

examples/v2/bos/setauth  view on Meta::CPAN


$server   = shift;
$cellname = shift;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

die "not yet tested ... \n";

print "bos->setauth()...\n";

my $ok = $bos->setauth('on'); # or 'off'
print "Error Code: $AFS::CODE\n" if ($AFS::CODE);
print "Something went wrong\n" unless $ok;

$bos->DESTROY;

examples/v2/bos/setcellname  view on Meta::CPAN


$server   = shift;
$cellname = shift;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

die "not yet tested ... \n";

my $ok = $bos->setcellname('newcell.example.com');
print "Error Code: $AFS::CODE\n" if ($AFS::CODE);

$bos->DESTROY;

examples/v2/bos/setrestart  view on Meta::CPAN


if (defined $general and !looks_like_number($general)) { warn "$0: GENERAL is not an INTEGER ...\n"; }
else                                                   { $general = int($general); }
if (defined $newbinary and !looks_like_number($newbinary)) { warn "$0: NEWBINARY is not an INTEGER ...\n"; }
else                                                       { $newbinary = int($newbinary); }

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

my $ok = $bos->setrestart($time, $general, $newbinary);
print "Error Code: $AFS::CODE\n" if ($AFS::CODE);

$bos->DESTROY;

examples/v2/bos/setrestricted  view on Meta::CPAN


$server   = shift;
$cellname = shift;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

my $mode = $bos->getrestricted;     # save old mode

my $ok = $bos->setrestricted(1);    # switch it on
print "Error Code-2: $AFS::CODE\n" if ($AFS::CODE);

$ok = $bos->setrestricted(0);       # switch it off
print "Error Code-3: $AFS::CODE\n" if ($AFS::CODE);

$ok = $bos->setrestricted($mode);    # reset it to old mode
print "Error Code-4: $AFS::CODE\n" if ($AFS::CODE);

$bos->DESTROY;

examples/v2/cm/getcellstatus  view on Meta::CPAN

use blib;
use strict;
use warnings;

use AFS::CM qw (getcellstatus);

die "Usage: $0 cell\n" if ($#ARGV==-1);

my $cell = shift;

my $setuid = getcellstatus($cell);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { printf("Setuid allowed: %s \n", $setuid ? 'yes' : 'no'); }

examples/v2/cm/setcachesize  view on Meta::CPAN

#!/usr/local/bin/perl

use blib;
use strict;
use warnings;

use AFS::CM qw (setcachesize);

die "Usage: $0 size\n" if ($#ARGV==-1);

my $size = shift;

my $ok = setcachesize($size);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "ok = $ok\n"; }

examples/v2/cm/setcellstatus  view on Meta::CPAN

#!/usr/local/bin/perl

use blib;
use strict;
use warnings;

use AFS::CM qw (setcellstatus);

die "Usage: $0 cell setuid\n" if ($#ARGV==-1);

my $cell = shift;
my $setuid = shift;

my $ok = setcellstatus($setuid, $cell);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { printf("Command successfull: %s \n", $ok ? 'yes' : 'no'); }

examples/v2/cm/setcrypt  view on Meta::CPAN

#!/usr/local/bin/perl

use blib;
use strict;
use warnings;

use AFS::CM qw (setcrypt);

my $ok = setcrypt('on');
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "OK = $ok \n"; }

examples/v2/fs/setquota  view on Meta::CPAN

#!/usr/local/bin/perl

use blib;
use strict;
use warnings;

use AFS::FS qw(setquota);

my ($path, $quota, $ok);

die "Usage: $0 path quota\n" if ($#ARGV == -1);

$path  = shift;
$quota = shift;

$ok = setquota($path, $quota);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "ok setquota = $ok\n"; }

examples/v2/kas/AuthServerConn  view on Meta::CPAN

#!/usr/local/bin/perl

use blib;
use AFS::KAS;
use AFS::KTC_PRINCIPAL;
use AFS::KTC_TOKEN;
use AFS::KTC_EKEY;
use AFS qw(raise_exception setpag);

die "Usage: admin\n" if ($#ARGV != 0);

raise_exception(1);

setpag;

my $princ = AFS::KTC_PRINCIPAL->new(shift);
my $key   = AFS::KTC_EKEY->ReadPassword($princ->name."'s Password:");
my $token = AFS::KTC_TOKEN->GetAdminToken($princ, $key, 300);

my $kas   = AFS::KAS->AuthServerConn($token, &AFS::KA_MAINTENANCE_SERVICE);
print "AFS::CODE = $AFS::CODE\n";

examples/v2/kas/SingleServerConn  view on Meta::CPAN

#!/usr/local/bin/perl

use blib;
use Time::localtime;
use AFS::KAS;
use AFS::KTC_PRINCIPAL;
use AFS::KTC_TOKEN;
use AFS::KTC_EKEY;
use AFS::Cell qw(localcell);
use AFS qw(checkafs raise_exception setpag);

die "Usage: host admin user\n" if ($#ARGV != 2);

raise_exception(1);

setpag;

my $host  = shift;
my $princ = AFS::KTC_PRINCIPAL->new(shift);
my $user  = AFS::KTC_PRINCIPAL->new(shift);
my $key   = AFS::KTC_EKEY->ReadPassword("Admin Password:");
my $token = AFS::KTC_TOKEN->GetAdminToken($princ, $key, 300);
my $kas   = AFS::KAS->SingleServerConn($host, $token, &AFS::KA_MAINTENANCE_SERVICE);

my $entry = $kas->getentry($user->name, $user->instance);

examples/v2/kas/setfields  view on Meta::CPAN

my $pwexpire = 10;       # number of days
my $pw_reuse = 2;        # pwreuse allowed: [1 = yes], [2 = no], [0 = not changed]
my $nfail    = 4;        # (nfail - 1) tries are allowed; => 3 tries
my $locktime = 3;        # unit is 8.5 min => 3 * (8.5)

$pwexpire++;
$nfail++;
$locktime++;

my $packed= (($pwexpire << 24) | ($pw_reuse  << 16) | ($nfail << 8) | $locktime );
#my $ok = $kas->setfields($user->name, $user->instance, $flags, $expire, $lifetime, $maxassoc, $packed);
my $ok = $kas->KAM_SetFields($user->name, $user->instance, $flags, $expire, $lifetime, $maxassoc, $packed);
printf("KAS setfields: %s \n", $ok ? 'yes' : 'no');
checkafs('SetFields');

$entry = $kas->getentry($user->name, $user->instance);
print "\n\nUser data for ", $user->name, $user->instance, ": \n";
foreach my $tp_key (sort keys %$entry) {
    printf("%20s  %s\n",$tp_key, $$entry{$tp_key});
    if ($tp_key =~ 'misc_auth_bytes') {
        if ($$entry{$tp_key}) {
            my $packed    = $$entry{$tp_key};
            my $pwexpire  = (($packed >> 24) & 0xff);

examples/v2/kas/setpassword  view on Meta::CPAN

raise_exception(1);


my $princ = AFS::KTC_PRINCIPAL->new(shift);
my $key   = AFS::KTC_EKEY->ReadPassword($princ->name."'s Password:");
my $token = AFS::KTC_TOKEN->GetAdminToken($princ, $key, 300);
my $kas = AFS::KAS->AuthServerConn($token, &AFS::KA_MAINTENANCE_SERVICE);

my $user  = AFS::KTC_PRINCIPAL->new(shift);
my $nkey   = AFS::KTC_EKEY->ReadPassword($user->name."'s NEW Password:");
my $ok = $kas->setpassword($user->name, $user->instance, 0, $nkey);
printf("setpasswd: Password changed: %s \n", $ok ? 'yes' : 'no');
checkafs('ChangePassword');

$ok = $kas->KAM_SetPassword($user->name, $user->instance, 0, $nkey);
printf("KAM_SetPasswd: Password changed: %s \n", $ok ? 'yes' : 'no');
checkafs('ChangePassword');

examples/v2/ktct/GetServerToken  view on Meta::CPAN


use blib;
use strict;
use warnings;

use Time::localtime;
use AFS::KTC_TOKEN;
use AFS::KTC_PRINCIPAL;
use AFS::KTC_EKEY;
use AFS::Cell qw(localcell);
use AFS::Utils qw(setpag);

die "Usage: user\n" if ($#ARGV != 0);

setpag;

my $user = AFS::KTC_PRINCIPAL->new(shift);
$user->cell(localcell) if ($user->cell eq'');

my $key  = AFS::KTC_EKEY->ReadPassword('Password:');
my $ok   = AFS::KTC_TOKEN->GetAuthToken($user, $key, 600);

my $service = AFS::KTC_PRINCIPAL->new("afs","",$user->cell);
my $token = AFS::KTC_TOKEN->GetServerToken($service, 600);

examples/v2/ktct/UserAuthenticateGeneral  view on Meta::CPAN

#!/usr/local/bin/perl

use blib;
use strict;
use warnings;

use AFS::KTC_TOKEN;
use AFS::KTC_PRINCIPAL;
use AFS::KTC_EKEY;
use AFS::Utils qw(setpag);

die "Usage: $0 user\n" if ($#ARGV != 0);

my $princ = shift;

setpag;
system "tokens";

my $user = AFS::KTC_PRINCIPAL->new($princ);
my $password = AFS::KTC_EKEY->UserReadPassword("Password:");
my $pw;
my $reason = '';
my $ok = AFS::KTC_TOKEN->UserAuthenticateGeneral($user, $password, 300,
          &AFS::KA_USERAUTH_VERSION | &AFS::KA_USERAUTH_DOSETPAG,
          $pw, $reason);

examples/v2/pts/setaccess  view on Meta::CPAN

use warnings;

use AFS::PTS;

print "name: "; chop(my $name=<STDIN>);
print "access: "; chop(my $access=<STDIN>);

my $pts = AFS::PTS->new;
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

my $ok = $pts->setaccess($name, $access);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "success  = $ok\n"; }

examples/v2/pts/setgroupquota  view on Meta::CPAN

use warnings;

use AFS::PTS;

print "name: "; chop(my $name=<STDIN>);
print "maxgroups: "; chop(my $ngroup=<STDIN>);

my $pts = AFS::PTS->new;
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

my $ok = $pts->setgroupquota($name, $ngroup);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "success  = $ok\n"; }

examples/v2/pts/setmax  view on Meta::CPAN

use warnings;

use AFS::PTS;

print "id : "; chop(my $id=<STDIN>);
print "isgroup: "; chop(my $isgroup=<STDIN>);

my $pts = AFS::PTS->new;
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

my $ok = $pts->setmax($id, $isgroup);
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "success  = $ok\n"; }

examples/v2/utils/setpag  view on Meta::CPAN

#!/usr/local/bin/perl

use blib;
use strict;
use warnings;

use AFS::Utils qw (setpag);

my $ok = setpag;
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { print "ok = $ok\n"; }

system "tokens";

examples/v2/vos/setquota  view on Meta::CPAN

$clear  = shift // 0;

if (defined $quota and !looks_like_number($quota)) { warn "$0: QUOTA is not an INTEGER ...\n"; }
else                                               { $quota = int($quota); }
if (defined $clear and !looks_like_number($clear)) { warn "$0: CLEAR is not an INTEGER ...\n"; }
else                                               { $clear = int($clear); }

$vos = AFS::VOS->new;
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

if ($clear) { $ok = $vos->setquota($volume, $quota, $clear); }
else        { $ok = $vos->setquota($volume, $quota); }
if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
else            { printf "Task %s \n", $ok ? "done" : "failed"; }

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

Methods that deal with principals related to tokens.  See L<AFS::KTC_PRINCIPAL>.

=item * Access to the AFS structure ktc_encryptionkey

Methods that deal with encryption keys related to tokens.  See
L<AFS::KTC_EKEY>.

=item * Access to shared utility routines

Utility functions for the AFS module bundle which are not part of any
AFS command suite (i.e, the setpag command).  See L<AFS::Utils>.

=item * Access to basic AFS functions and to AFS error codes

Basic functions like raising a Perl exception when any AFS function call
fails (useful for debugging) or retrieving the status value of the last
AFS function call. See L<AFS::Base>.

=back

=head1 PREREQUISITES

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

=head1 AUTHOR EMERITUS

Roland Schemers E<lt>schemers@slapshot.stanford.eduE<gt>

=head1 CREDITS

Thank you to (in chronological order):

B<Lawrence Greenfield> - for his update in the AFS.xs file

B<Alf Wachsmann> - for his bug report on the function "setquota"

B<Gerhard Gonter> - for his configuration report for rs_aix32

B<Peter Scott> - for his improvement on ACL->keys and ACL->nkeys

B<Thomas M. Payerle> - for his configuration report for alpha_dux40

B<Wolfgang Friebel> - for his bug report on the functions "lsmount" and "rmmount"

B<Alf Wachsmann> - for his patches for the XS code and his excellent ideas about

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


=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";
  }

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


  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

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

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);>

Converts the internal value FLAGS to its corresponding character string.

=item B<ATTRIBUTES ACCESS>

=item S< >

=item B<$rights = $acl-E<gt>get_rights(USER);>

=item B<$nrights = $acl-E<gt>nget_rights(USER);>

Returns the access rights for the given USER in the positive(-E<gt>get_rights) or
negative(-E<gt>nget_rights) ACL list.

=item B<$acl-E<gt>set(USER, RIGHTS);>

=item B<$acl-E<gt>nset(USER, RIGHTS);>

Adds the given USER and its access RIGHTS to the positive(-E<gt>set) or
negative(-E<gt>nset) ACL list.

=item B<$acl-E<gt>remove(USER);>

=item B<$acl-E<gt>nremove(USER);>

Removes the given USER and its access rights from the positive(-E<gt>remove) or
negative(-E<gt>nremove) ACL list.

=item B<$acl-E<gt>empty;>

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


Convenience function that calls die and prints an error message if
$AFS::CODE is not equal to 0. Used mainly for debugging.

=item B<if (afsok) { ... }>

Convenience function that returns true if $AFS::CODE is equal to 0

=item B<$cur_raise_flg = raise_exception([NEW]);>

If NEW is set to 1, then a Perl exception will be raised whenever
an error is returned from an AFS function call. This is used mainly for
debugging and testing.

=item B<$msg = error_message(NUM_CODE);>

Converts numeric code NUM_CODE into an error string.

=item B<$val = constant(NAME);>

Converts a constant NAME (i.e, #define) into scaler. Returns undef for

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

  $ok = $bos->addkey(11, 'My Secret');
  my ($date, $keys) = $bos->listkeys;
  $ok = $bos->removekey([10, 11]);

  $ok = $bos->adduser('username');
  my @users = $bos->listusers;
  $ok = $bos->removeuser('username');

  my ($generalTime, $newBinaryTime) = $bos->getrestart;
  my ($general, $newbinary, $time) = (1, 0, 'sat 4:00');
  $ok = $bos->setrestart($time, $general, $newbinary);

  $ok = $bos->startup;
  my $status = $bos->status;
  $ok = $bos->shutdown;

  $ok = $bos->start(['vlserver']);
  $ok = $bos->restart(['fs', 'vlserver']);
  $ok = $bos->restart_bos;
  $ok = $bos->restart_all;
  $ok = $bos->stop(['vlserver']);

  my $restricted = $bos->getrestricted;
  $ok = $bos->setrestricted('on');

  $ok = $bos->create('kaserver', 'simple', ['/usr/afs/bin/kaserver']);
  $ok = $bos->delete('instance');

  $ok = $bos->exec('/sbin/shutdown -r now');

  my @logentries = $bos->getlog('FileLog');

  my ($all, $bak, $old, $core) = (0, 0, 0, 1);
  $ok = $bos->prune($all, $bak, $old, $core);

  $ok = $bos->salvage('/vicepa');

  $ok = $bos->setauth('on');

  $ok = $bos->setcellname('newcell.example.com');

=head1 DESCRIPTION

This class is used to communicate with a B<AFS Basic Overseer Server>,
which runs on every AFS server machine. It monitors and administers
the other server processes on that machine.  It has also methods to
maintain system configuration files.

Before you can submit any tasks to a Basic OverSeer (BOS) Server you
must establish a connection to a BOS Server.  This is done by the

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


=item B<INSTANCE METHODS>

=item S< >

=item B<$ok = $bos-E<gt>addhost(HOST [, CLONE]);>

=item B<$ok = $bos-E<gt>addhost(\@HOST [, CLONE]);>

Adds the given HOST to the local C<CellServDB> file.  HOST is either a
scalar value or a reference to an array of hosts.  If CLONE is set to
1 (default 0) the ubik vote of this host does not count.  This
argument is only available under OpenAFS.  It calls the AFS system
library function I<BOZO_AddCellHost>.

=item B<$ok = $bos-E<gt>addkey(KVNO [, STRING]);>

B<NOT YET RELEASED>

Constructs a server encryption key from the text STRING provided,
assigns it the key version number KVNO, and adds it to the local

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

Adds the given USER to the list of privileged users in the local
C<UserList> file.  USER is either a scalar value or a reference to an
array of names.  It calls the AFS system library function
I<BOZO_AddSUser>.

=item B<$ok = $bos-E<gt>create(PROCESS, TYPE, COMMAND [, NOTIFIER]);>

=item B<$ok = $bos-E<gt>create(PROCESS, TYPE, \@COMMAND [, NOTIFIER]);>

Creates a server PROCESS entry in the local C<BosConfig> file on the
server machine, sets the process's status to I<Run> in the
C<BosConfig> file and in memory, and starts the process.  TYPE
specifies the process's type. Acceptable values are: 'simple', 'cron',
and 'fs'.  COMMAND is either a scalar value or an array reference
containing the commands the BOS Server should run to start the
process.  NOTIFIER specifies the complete pathname of a program that
the BOS Server invokes when the process terminates.  It calls the AFS
system library function I<BOZO_CreateBnode>.

=item B<$ok = $bos-E<gt>delete(INSTANCE);>

=item B<$ok = $bos-E<gt>delete(\@INSTANCE);>

Deletes the entry INSTANCE from the local C<BosConfig> file.  INSTANCE
is either a scalar value or a reference to an array of instance names.

Before using this method, issue the stop method to stop the process
and set its status flag in the BosConfig file to NotRun. The delete
method fails with an error message if a process's status flag is Run.
It calls the AFS system library function I<BOZO_DeleteBnode>.

=item B<$ok = $bos-E<gt>exec(COMMAND);>

Executes the indicated COMMAND on the BOS server machine.  It calls
the AFS system library function I<BOZO_Exec>.

=item B<@logfile = $bos-E<gt>getlog(LOGFILE);>

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

C</usr/afs/bin> directory that have a C<BAK> extension.

Set OLD to 1 (default 0) to remove all files from the local
C</usr/afs/bin> directory that have an C<OLD> extension.

Set CORE to 1 (default 0) to remove all files from the local
C</usr/afs/logs> directory that have a C<core> prefix.

Set ALL to 1 (default 0) to remove all three types of files at once.

If none of these flags are set, no files are removed, but a warning
message is displayed.  It calls the AFS system library function
I<BOZO_Prune>.

=item B<$ok = $bos-E<gt>removehost(HOST);>

=item B<$ok = $bos-E<gt>removehost(\@HOST);>

Removes the database server machine HOST from the local C<CellServDB>
file.  HOST is either a scalar value or a reference to an array of
names.  It calls the AFS system library function

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

??? Here must be a COMPLETE description of all arguments !!!

If your file server runs MR-AFS, a bunch of additional boolean options
are supported: debug, nowrite, force, oktozap, rootfiles, salvagedirs,
blockreads, ListResidencies, SalvageRemote, SalvageArchival,
IgnoreCheck, ForceOnLine, UseRootDirACL, TraceBadLinkCounts,
DontAskFS, LogLevel, rxdebug, Residencies.

Internally, a temporary cron job is created via 'BOZO_CreateBnode>.

=item B<$ok = $bos-E<gt>setauth('on' | 'off');>

Enables ('on') or disables('off') authorization checking for all
server processes on the server machine.  It calls the AFS system
library function I<BOZO_SetNoAuthFlag>.

=item B<$ok = $bos-E<gt>setcellname(NAME);>

B<NOT YET RELEASED>

Establishes the cell's NAME and makes the server machine a member of
it.  And it records the NAME in the two local files C<ThisCell> and
C<CellServDB>.  It calls the AFS system library function
I<BOZO_SetCellName>.

B<Cautions>

Use this method only when installing the cell's first AFS server
machine. The I<AFS Quick Beginnings> documentation explains how to
copy over the C<ThisCell> and C<CellServDB> files from this or another
appropriate machine during installation of additional server machines.

=item B<$ok = $bos-E<gt>setrestart(TIME [, GENERAL [, NEWBINARY]]);>

Sets the restart TIME at which the BOS Server restarts processes.  Set
GENERAL to 1 (default 0) to set the restart time of the BOS Server to
TIME.  This TIME is once per week.  Set NEWBINARY to 1 (default 0) to
set the binary restart time.  The TIME is once per day.  Only one of
the arguments GENERAL and NEWBINARY can be set.  It calls the AFS
system library function I<BOZO_SetRestartTime>.

=item B<$ok = $bos-E<gt>setrestricted(MODE);>

Enables (MODE = 1) or disables (MODE = 0) the I<restricted mode> for
the BOS server which disables certain bosserver functionality.  This
method is only available under OpenAFS if the AFS system libraries were
compiled with the I<Restricted Mode Option>.  It calls the AFS system
library function I<BOZO_SetRestrictedMode>.

=item B<$ok = $bos-E<gt>shutdown([SERVER, ] [WAIT]);>

=item B<$ok = $bos-E<gt>shutdown([\@SERVER, ] [WAIT]);>



( run in 1.570 second using v1.01-cache-2.11-cpan-49f99fa48dc )