AFS
view release on metacpan or search on metacpan
if (! defined $port{$server}) { die "Server $server unknown ...\n"; }
$hostname = 'localhost' unless defined $hostname;
$verbose = 0 unless defined $verbose;
AFS::_get_server_version($port{$server}, $hostname, $verbose);
}
# acl helpers...
sub getacl { require AFS::ACL; AFS::ACL->import; AFS::_getacl(@_); }
sub modifyacl {
my($path, $macl) = @_;
my($acl);
if ($acl = getacl($path)) {
$acl->addacl($macl);
return setacl($path, $acl);
}
else { return 0; }
}
sub copyacl {
my($from, $to, $follow) = @_;
my($acl);
$follow = 1 unless defined $follow;
if ($acl = _getacl($from, $follow)) { return setacl($to, $acl, $follow); }
else { return 0; }
}
sub cleanacl {
my($path, $follow) = @_;
my($acl);
$follow = 1 unless defined $follow;
if ($acl = _getacl($path, $follow)) { return setacl($path, $acl, $follow); }
else { return 0; }
}
# package AFS::PTS_SERVER;
# sub new { AFS::PTS->_new(@_); }
use AFS::KTC_PRINCIPAL;
# package AFS::KTC_PRINCIPAL;
# sub new { AFS::KTC_PRINCIPAL->_new(@_); }
use AFS::KAS;
# *** CAUTION ***
# these functions are now stored in AFS::KAS.pm !!!
#package AFS::KA_AUTHSERVER;
# package AFS::KAS;
# sub getentry { $_[0]->KAM_GetEntry($_[1],$_[2]); }
# sub debug { $_[0]->KAM_Debug(&AFS::KAMAJORVERSION); }
# sub getstats { $_[0]->KAM_GetStats(&AFS::KAMAJORVERSION); }
# sub randomkey { $_[0]->KAM_GetRandomKey; }
# sub create { $_[0]->KAM_CreateUser($_[1],$_[2],$_[3]); }
# sub setpassword { $_[0]->KAM_SetPassword($_[1],$_[2],$_[3],$_[4]); }
# sub delete { $_[0]->KAM_DeleteUser($_[1],$_[2]); }
# sub listentry { $_[0]->KAM_ListEntry($_[1],$_[2],$_[3]); }
# sub setfields { $_[0]->KAM_SetFields($_[1],$_[2],$_[3],$_[4],$_[5],$_[6],$_[7],$_[8]); }
package AFS;
sub AUTOLOAD {
# This AUTOLOAD is used to 'autoload' constants from the constant()
# XS function. If a constant is not found then control is passed
# to the AUTOLOAD in AutoLoader.
# taken from perl v5.005_02 for backward compatibility
my $constname;
($constname = $AUTOLOAD) =~ s/.*:://;
croak "& not defined" if $constname eq 'constant';
my $val = constant($constname, @_ ? $_[0] : 0);
if ($! != 0) {
if ($! =~ /Invalid/ || $!{EINVAL}) {
$AutoLoader::AUTOLOAD = $AUTOLOAD;
goto &AutoLoader::AUTOLOAD;
}
else {
croak "Your vendor has not defined AFS macro $constname";
}
}
{
no strict 'refs';
# Fixed between 5.005_53 and 5.005_61
if ($] >= 5.00561) {
*$AUTOLOAD = sub () { $val };
}
else {
*$AUTOLOAD = sub { $val };
}
}
goto &$AUTOLOAD;
}
END {
AFS::_finalize();
}
bootstrap AFS;
# Preloaded methods go here. Autoload methods go after __END__, and are
# processed by the autosplit program.
1;
__END__
( run in 0.745 second using v1.01-cache-2.11-cpan-df04353d9ac )