AFS
view release on metacpan or search on metacpan
MID TERM
--------
* remove the module AFS::KAS
* upgrade AFS::KTC_TOKEN
LONG TERM
---------
* verify whether all OpenAFS constants are included in the 'constant'
function
* develop sufficient test suites
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";
else
sprintf(buffer, "AFS::VOS: can't find volume ID or name '%s'\n", name);
VSETCODE(err ? err : ENOENT, buffer);
goto done;
}
code = GetVolumeInfo(avolid, &aserver, &apart, &vtype, &entry);
if (code) {
SETCODE(code);
goto done;
}
/* verify this is a readwrite volume */
if (vtype != RWVOL) {
char buffer[256];
sprintf(buffer, "%s not RW volume\n", name);
VSETCODE(-1, buffer);
goto done;
}
/* is there a backup volume already? */
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: ");
src/inc/version/vpp.pm view on Meta::CPAN
}
return ($self);
}
*parse = \&new;
sub numify
{
my ($self) = @_;
unless (_verify($self)) {
require Carp;
Carp::croak("Invalid version object");
}
my $width = $self->{width} || 3;
my $alpha = $self->{alpha} || "";
my $len = $#{$self->{version}};
my $digit = $self->{version}[0];
my $string = sprintf("%d.", $digit );
for ( my $i = 1 ; $i < $len ; $i++ ) {
src/inc/version/vpp.pm view on Meta::CPAN
{
$string .= sprintf("000");
}
return $string;
}
sub normal
{
my ($self) = @_;
unless (_verify($self)) {
require Carp;
Carp::croak("Invalid version object");
}
my $alpha = $self->{alpha} || "";
my $len = $#{$self->{version}};
my $digit = $self->{version}[0];
my $string = sprintf("v%d", $digit );
for ( my $i = 1 ; $i < $len ; $i++ ) {
$digit = $self->{version}[$i];
src/inc/version/vpp.pm view on Meta::CPAN
$string .= sprintf(".%0d", 0);
}
}
return $string;
}
sub stringify
{
my ($self) = @_;
unless (_verify($self)) {
require Carp;
Carp::croak("Invalid version object");
}
return exists $self->{original}
? $self->{original}
: exists $self->{qv}
? $self->normal
: $self->numify;
}
src/inc/version/vpp.pm view on Meta::CPAN
require UNIVERSAL;
my ($left,$right,$swap) = @_;
my $class = ref($left);
unless ( UNIVERSAL::isa($right, $class) ) {
$right = $class->new($right);
}
if ( $swap ) {
($left, $right) = ($right, $left);
}
unless (_verify($left)) {
require Carp;
Carp::croak("Invalid version object");
}
unless (_verify($right)) {
require Carp;
Carp::croak("Invalid version format");
}
my $l = $#{$left->{version}};
my $r = $#{$right->{version}};
my $m = $l < $r ? $l : $r;
my $lalpha = $left->is_alpha;
my $ralpha = $right->is_alpha;
my $retval = 0;
my $i = 0;
src/inc/version/vpp.pm view on Meta::CPAN
}
*declare = \&qv;
sub is_qv {
my ($self) = @_;
return (exists $self->{qv});
}
sub _verify {
my ($self) = @_;
if ( ref($self)
&& eval { exists $self->{version} }
&& ref($self->{version}) eq 'ARRAY'
) {
return 1;
}
else {
return 0;
}
src/ppport.h view on Meta::CPAN
The default namespace is C<DPPP_>.
=back
The good thing is that most of the above can be checked by running
F<ppport.h> on your source code. See the next section for
details.
=head1 EXAMPLES
To verify whether F<ppport.h> is needed for your module, whether you
should make any changes to your code, and whether any special defines
should be used, F<ppport.h> can be run as a Perl script to check your
source code. Simply say:
perl ppport.h
The result will usually be a list of patches suggesting changes
that should at least be acceptable, if not necessarily the most
efficient solution, or a fix for all possible problems.
src/ppport.h view on Meta::CPAN
vform||5.006000|
visit|||
vivify_defelem|||
vivify_ref|||
vload_module|5.006000||p
vmess||5.006000|
vnewSVpvf|5.006000|5.004000|p
vnormal||5.009002|
vnumify||5.009000|
vstringify||5.009000|
vverify||5.009003|
vwarner||5.006000|
vwarn||5.006000|
wait4pid|||
warn_nocontext|||vn
warn_sv||5.013001|
warner_nocontext|||vn
warner|5.006000|5.004000|pv
warn|||v
was_lvalue_sub|||
watch|||
( run in 0.573 second using v1.01-cache-2.11-cpan-5467b0d2c73 )