view release on metacpan or search on metacpan
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)
User-visible changes:
* improved Makefile.PL script
* new method '-AFS::KTC_TOKEN->FromString'
* 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
AFS::KTC_ENCRYPTIONKEY AFS::KTC_EKEY
Version 1.11 (released 6 December 2001, revision 80)
User-visible changes:
src/KTC_TOKEN/KTC_TOKEN.pm
src/KTC_TOKEN/Makefile.PL
src/KTC_TOKEN/t/KTC_TOKEN.t
src/Makefile.PL
src/ppport.h
src/PTS/Makefile.PL
src/PTS/PTS.pm
src/PTS/t/PTS.t
src/t/AFS.t
src/t/pod.t
src/typemap
src/Utils/Makefile.PL
src/Utils/t/Utils.t
src/Utils/Utils.pm
src/VLDB/Makefile.PL
src/VLDB/t/VLDB.t
src/VLDB/VLDB.pm
src/VOS/Makefile.PL
src/VOS/t/VOS.t
src/VOS/VOS.pm
test_ptype
pod/v2/afsperl.pod view on Meta::CPAN
B<Bernard Antoine> - for his bug report on a memory leak in the method
"AFS::ACL->retrieve".
B<Peter Scott> - for his bug report on a memory leak in the function
"getvolstats"
B<Peter Scott> - for his bug report on the function AFS::constant
B<Venkata Phani Achanta> - for his improved test drivers for several modules
B<David R. Boldt> - for his bug report on an undefined "typemap" entry
B<Alf Wachsmann> and B<Venkata Phani Achanta> - for their implementation
of the BOS, VOS, and VLDB modules
B<Phil Moore> - for his bug report on Itanium ia64 platform
B<Frank Burkhardt> and B<David Miller> - for their problem reports on
Perl "unthreaded" version within the Debian "unstable" distribution
B<Pierre-Yves Fontaniere> - for his configuration report for rs_aix51
pod/v2/afsperlpts.pod view on Meta::CPAN
=head1 DESCRIPTION
This class is used to communicate with the B<AFS Protection Server> in
order to maintain and to administer the Protection Database maintained
by the Protection Server. The Protection Database stores information
about AFS users, client machines, and groups which the File Server
process uses to determine whether clients are authorized to access AFS
data.
This class provides methods to map back and forth between user account
names and their internal numerical AFS identifiers. It also manages
the creation, manipulation, and update of user-defined groups suitable
for use on ACLs. It has methods to query the information held for any
given AFS user or group and to create, modify, and delete the records
in the PDB where the above information is held.
Before you can access any PDB records you must establish a connection
to the Protection Server. This is done by the constructor method
C<new> which returns a PTS object. A PTS object is essentially a
handle to talk to the Protection Server in a given cell. Such a PTS
pod/v2/afsperlpts.pod view on Meta::CPAN
=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]]);>
pod/v2/afsperlpts.pod view on Meta::CPAN
=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
pod/v2/afsperlpts.pod view on Meta::CPAN
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);>
pod/v2/afsperlpts.pod view on Meta::CPAN
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
src/Makefile.PL view on Meta::CPAN
# change the library name of the AFS system library "-lafsauthent"
if ($alpha_sys =~ /linux/ && $alpha_sys !~ /i386_linux2/) {
$command = "\'s#-lc -lafsauthent -lc#$AFSPath/lib/libafsauthent_pic.a#g\'";
}
else {
$command = "\'s#-lc -lafsauthent -lc#$AFSPath/lib/libafsauthent.a#g\'";
}
system("perl -p -i.bak -e $command Makefile");
# make changes to the typemap file if Perl < 5.6.0
$command = "\'s#T_UV#T_IV#\'";
system("perl -p -i.bak -e $command typemap") unless $] >= 5.006;
src/inc/Test/Builder.pm view on Meta::CPAN
}
}
return $Curr_Test;
}
sub summary {
my($self) = shift;
return map { $_->{'ok'} } @Test_Results;
}
sub details {
return @Test_Results;
}
sub todo {
my($self, $pack) = @_;
src/inc/Test/More.pm view on Meta::CPAN
# eval sometimes resets $!
eval { $proto->can($method) } || push @nok, $method;
}
my $name;
$name = @methods == 1 ? "$class->can('$methods[0]')"
: "$class->can(...)";
my $ok = $Test->ok( !@nok, $name );
$Test->diag(map " $class->can('$_') failed\n", @nok);
return $ok;
}
sub isa_ok ($$;$) {
my($object, $class, $obj_name) = @_;
my $diag;
$obj_name = 'The object' unless defined $obj_name;
src/inc/version.pm view on Meta::CPAN
# Set up any derived class
unless ($class eq 'version') {
local $^W;
*{$class.'::declare'} = \&version::declare;
*{$class.'::qv'} = \&version::qv;
}
my %args;
if (@_) { # any remaining terms are arguments
map { $args{$_} = 1 } @_
}
else { # no parameters at all on use line
%args =
(
qv => 1,
'UNIVERSAL::VERSION' => 1,
);
}
my $callpkg = caller();
src/ppport.h view on Meta::CPAN
die "Invalid version number format: '$opt{'compat-version'}'\n";
}
die "Only Perl 5 is supported\n" if $r != 5;
die "Invalid version number: $opt{'compat-version'}\n" if $v >= 1000 || $s >= 1000;
$opt{'compat-version'} = sprintf "%d.%03d%03d", $r, $v, $s;
}
else {
$opt{'compat-version'} = 5;
}
my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/
? ( $1 => {
($2 ? ( base => $2 ) : ()),
($3 ? ( todo => $3 ) : ()),
(index($4, 'v') >= 0 ? ( varargs => 1 ) : ()),
(index($4, 'p') >= 0 ? ( provided => 1 ) : ()),
(index($4, 'n') >= 0 ? ( nothxarg => 1 ) : ()),
} )
: die "invalid spec: $_" } qw(
AvFILLp|5.004050||p
AvFILL|||
src/ppport.h view on Meta::CPAN
}
$function = [$1, ''] if m{^DPPP_\(my_(\w+)\)};
$replace = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$};
$replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)};
$replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce};
$replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$};
if (m{^\s*$rccs\s+(\w+(\s*,\s*\w+)*)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) {
my @deps = map { s/\s+//g; $_ } split /,/, $3;
my $d;
for $d (map { s/\s+//g; $_ } split /,/, $1) {
push @{$depends{$d}}, @deps;
}
}
$need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)};
}
for (values %depends) {
my %s;
$_ = [sort grep !$s{$_}++, @$_];
src/ppport.h view on Meta::CPAN
push @flags, 'hint' if exists $hints{$f};
push @flags, 'warning' if exists $warnings{$f};
my $flags = @flags ? ' ['.join(', ', @flags).']' : '';
print "$f$flags\n";
}
exit 0;
}
my @files;
my @srcext = qw( .xs .c .h .cc .cpp -c.inc -xs.inc );
my $srcext = join '|', map { quotemeta $_ } @srcext;
if (@ARGV) {
my %seen;
for (@ARGV) {
if (-e) {
if (-f) {
push @files, $_ unless $seen{$_}++;
}
else { warn "'$_' is not a file.\n" }
}
src/ppport.h view on Meta::CPAN
}
else {
eval {
require File::Find;
File::Find::find(sub {
$File::Find::name =~ /($srcext)$/i
and push @files, $File::Find::name;
}, '.');
};
if ($@) {
@files = map { glob "*$_" } @srcext;
}
}
if (!@ARGV || $opt{filter}) {
my(@in, @out);
my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files;
for (@files) {
my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/($srcext)$/i;
push @{ $out ? \@out : \@in }, $_;
}
if (@ARGV && @out) {
warning("Skipping the following files (use --nofilter to avoid this):\n| ", join "\n| ", @out);
}
@files = @in;
}
src/ppport.h view on Meta::CPAN
return undef;
}
sub rec_depend
{
my($func, $seen) = @_;
return () unless exists $depends{$func};
$seen = {%{$seen||{}}};
return () if $seen->{$func}++;
my %s;
grep !$s{$_}++, map { ($_, rec_depend($_, $seen)) } @{$depends{$func}};
}
sub parse_version
{
my $ver = shift;
if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) {
return ($1, $2, $3);
}
elsif ($ver !~ /^\d+\.[\d_]+$/) {