AFS

 view release on metacpan or  search on metacpan

INSTALL  view on Meta::CPAN


    Unpack the archive to create an AFS installation directory:

        gunzip AFS-<version>.tar.gz
        tar xvf AFS-<version>.tar

    'cd' into that directory, make, test and install the modules.

    You have to specify the location of the AFS system
    libraries. While running the 'perl Makefile.PL' step you will be
    prompted for the location of the AFS system libraries.  If you
    want to avoid that query, you should specify the environment
    variable 'AFSPATH' before you start [1].

    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>

INSTALL_64  view on Meta::CPAN


    Unpack the archive to create an AFS installation directory:

        gunzip AFS-<version>.tar.gz
        tar xvf AFS-<version>.tar

    'cd' into that directory, make, test and install the modules.

    You have to specify the location of the AFS system
    libraries. While running the 'perl Makefile.PL' step you will be
    prompted for the location of the AFS system libraries.  If you
    want to avoid that query, you should specify the environment
    variable 'AFSPATH' before you start [1].

    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>

LICENCES/IBM-LICENCE  view on Meta::CPAN

   Contributor includes the Program in a commercial product offering,
   such Contributor ("Commercial Contributor") hereby agrees to defend
   and indemnify every other Contributor ("Indemnified Contributor")
   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

examples/v2/ktck/ReadPassword  view on Meta::CPAN

#!/usr/local/bin/perl

use blib;
use strict;
use warnings;

use AFS::KTC_EKEY;

die "Usage: $0 prompt verify cell\n" if ($#ARGV != 2);

my $prompt = shift;
my $verify = shift;
my $cell = shift;

my $key = AFS::KTC_EKEY->ReadPassword($prompt, $verify, $cell);
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";
print "KEY = ", $key->string, " \n";

examples/v2/ktck/UserReadPassword  view on Meta::CPAN

#!/usr/local/bin/perl

use blib;
use strict;
use warnings;

use AFS::KTC_EKEY;

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

my $prompt = shift;

my $reason = '';
my $string = AFS::KTC_EKEY->UserReadPassword($prompt, $reason);
if ($reason) { print "reason = $reason\n"; }
if ($string) { print "password = ($string)\n"; }

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

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
C<KeyFile> file.  If STRING is omitted, the BOS Server prompts for the
string and does not echo it visibly.  It calls the AFS system library
function I<BOZO_AddKey>.

=item B<$ok = $bos-E<gt>adduser(USER);>

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

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

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


=item B<i> if restoring an incremental dump file.

=back

Set OFFLINE (default 0) to 1 to leave restored volume offline.  Set
READONLY (default 0) to 1 to make the restored volume read-only.

If the VOLUME already exists, the OVERWRITE argument is omitted, and
the INTER argument (default 0) is set to 1 the method is interactively
prompting for the type of restore (exactly like the I<vos restore>
command).

It calls the AFS system library function I<UV_RestoreVolume>.

=item B<$ok = $vos-E<gt>setquota(VOLUME, QUOTA [, CLEAR]);>

Sets the QUOTA for the specified volume.  Specify the number of
one-kilobyte blocks as a positive integer (1024 is one megabyte).
VOLUME specifies either the complete name or volume ID number of the
volume.  Set CLEAR (default 0) to 1 to clear the access counter on the

src/AFS.xs  view on Meta::CPAN

    CODE:
    {
        not_here("AFS::BOS::addkey");

        Zero(&tkey, 1, struct ktc_encryptionKey);

        RETVAL = 42;
        if (string)
            strcpy(buf, string);
        else {
            /* prompt for key */
            code = des_read_pw_string(buf, sizeof(buf), "input key: ", 0);
            if (code || strlen(buf) == 0) {
                char buffer[256];
                sprintf(buffer, "Bad key: \n");
                BSETCODE(code ? code : -1, buffer);
                RETVAL = 0;
            }
            code = des_read_pw_string(ver, sizeof(ver), "Retype input key: ", 0);
            if (code || strlen(ver) == 0) {
                char buffer[256];

src/AFS.xs  view on Meta::CPAN

        if (pwexpires != -1)
            sv_setiv(ST(4), (IV) pw);
        if (reason)
            sv_setpv(ST(5), r);
        SETCODE(code);
        EXTEND(sp, 1);
        PUSHs(sv_2mortal(newSViv(code == 0)));
    }

void
afs_ka_ReadPassword(prompt,verify=0,cell=0)
        char *  prompt
        int32   verify
        char *  cell
    PPCODE:
    {
        int32 code = 0;
        struct ktc_encryptionKey *key;
        SV *st;

        if (cell && (cell[0] == '\0' || cell[0] == '0'))
            cell = NULL;

        if (cell == 0) {
            cell = internal_GetLocalCell(&code);
            if (code)
                XSRETURN_UNDEF;
        }

        key = (struct ktc_encryptionKey *) safemalloc(sizeof(*key));
        code = ka_ReadPassword(prompt, verify, cell, key);
        if (code == 0) {
            EXTEND(sp, 1);
            st = sv_newmortal();
            sv_setref_pv(st, "AFS::KTC_EKEY", (void *) key);
            PUSHs(st);
            XSRETURN(1);
        }
        else {
            char buffer[256];
            sprintf(buffer, "AFS::KTC_EKEY: ");
            KSETCODE(code, buffer);
            safefree(key);
            XSRETURN_UNDEF;
        }
    }

void
afs_ka_UserReadPassword(prompt,reason=0)
        char *  prompt
        char *  reason
    PPCODE:
    {
        int32 code;
        char buffer[1024];
        char *r;
        code = ka_UserReadPassword(prompt, buffer, sizeof(buffer) - 1, &r);
        SETCODE(code);
        if (reason)
            sv_setpv(ST(1), r);
        if (code == 0) {
            EXTEND(sp, 1);
            PUSHs(sv_2mortal(newSVpv(buffer, strlen(buffer))));
        }
    }

void

src/Makefile.PL  view on Meta::CPAN

# used to build the AFS extension module
my $guess_path;
if    (-r "/usr/local/include/afs/afs.h") { $guess_path = '/usr/local'; }
elsif (-r "/usr/afsws/include/afs/afs.h") { $guess_path = '/usr/afsws'; }
elsif (-r "/usr/include/afs/afs.h")       { $guess_path = '/usr'; }
else                                      { $guess_path = 'unknown'; }

my $AFSPath = $ENV{AFSPATH} || $guess_path;
my $msg = "\nPath to the AFS installation (libraries, binaries, \n"
        . "header files) to be used for this installation? \t ";
$AFSPath = prompt($msg, $AFSPath);
$AFSPath =~ s\/$\\;
if ($AFSPath eq 'unknown') {
    warn "Most probabley you have not installed the AFS system libraries \n";
    if ($ENV{AUTOMATED_TESTING}) { exit 0; }
    die "Script terminated ...\n";
}

# determine the alpha_sys value
my $alpha_sys = 'unknown';
if ($ENV{AFS_SYSNAME}) {



( run in 0.851 second using v1.01-cache-2.11-cpan-6aa56a78535 )