Authen-Smb
view release on metacpan or search on metacpan
sub authen {
my @args = @_;
# Truncate everything to length 80 to avoid poor coding practices in the
# smbvalid.a (buffer overflows) PMK--fixme in smbvalid.a when possible.
for my $i ( 0..$#args ) {
$args[$i] = substr($args[$i], 0, 80);
}
my($username, $password, $server, $backup, $domain) = @args;
my $res = Valid_User($username, $password, $server, $backup, $domain);
$res
}
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.
my $constname;
if ( $authResult == Authen::Smb::NO_ERROR ) {
print "User successfully authenticated.\n";
} else {
print "User not authenticated with error level $authResult\n";
}
=head1 DESCRIPTION
Authen::Smb allows you to authenticate a user against an NT domain. You can
specify both a primary and a backup server to use for authentication. The
NT names of the machines should be used for specifying servers.
An authentication request will return one of four values:
NTV_NO_ERROR (0)
NTV_SERVER_ERROR (1)
NTV_PROTOCOL_ERROR (2)
NTV_LOGON_ERROR (3)
NTV_NO_ERROR is the only return value possible for a successful authentication.
MODULE = Authen::Smb PACKAGE = Authen::Smb
double
constant(name,arg)
char * name
int arg
int
Valid_User(username, password, server, backup, domain)
char * username
char * password
char * server
char * backup
char * domain
OUTPUT:
RETVAL
( run in 0.539 second using v1.01-cache-2.11-cpan-49f99fa48dc )