| 1 | package Authen::Smb; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | require Exporter; | |||||||||
| 8 | 1 | require DynaLoader; | |||||||||
| 9 | 1 | require AutoLoader; | |||||||||
| 10 | |||||||||||
| 11 | 1 | @ISA = qw(Exporter DynaLoader); | |||||||||
| 12 | # Items to export into callers namespace by default. Note: do not export | ||||||||||
| 13 | # names by default without a very good reason. Use EXPORT_OK instead. | ||||||||||
| 14 | # Do not simply export all your public functions/methods/constants. | ||||||||||
| 15 | 1 | @EXPORT_OK = qw( | |||||||||
| 16 | NTV_LOGON_ERROR | ||||||||||
| 17 | NTV_NO_ERROR | ||||||||||
| 18 | NTV_PROTOCOL_ERROR | ||||||||||
| 19 | NTV_SERVER_ERROR | ||||||||||
| 20 | ); | ||||||||||
| 21 | 1 | $VERSION = '0.96'; | |||||||||
| 22 | |||||||||||
| 23 | 0 | ▶ | sub authen { | ||||||||
|
Subroutine
authen: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 24 | 0 | my @args = @_; | |||||||||
| 25 | |||||||||||
| 26 | # Truncate everything to length 80 to avoid poor coding practices in the | ||||||||||
| 27 | # smbvalid.a (buffer overflows) PMK--fixme in smbvalid.a when possible. | ||||||||||
| 28 | 0 | for my $i ( 0..$#args ) { | |||||||||
| 29 | 0 | $args[$i] = substr($args[$i], 0, 80); | |||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | 0 | my($username, $password, $server, $backup, $domain) = @args; | |||||||||
| 33 | |||||||||||
| 34 | 0 | my $res = Valid_User($username, $password, $server, $backup, $domain); | |||||||||
| 35 | 0 | $res | |||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | |||||||||||
| 39 | 0 | ▶ | sub AUTOLOAD { | ||||||||
|
Subroutine
AUTOLOAD: not called CC=4 SCAR=30.0
| |||||||||||
| 40 | # This AUTOLOAD is used to 'autoload' constants from the constant() | ||||||||||
| 41 | # XS function. If a constant is not found then control is passed | ||||||||||
| 42 | # to the AUTOLOAD in AutoLoader. | ||||||||||
| 43 | |||||||||||
| 44 | 0 | my $constname; | |||||||||
| 45 | 0 | ($constname = $AUTOLOAD) =~ s/.*:://; | |||||||||
| 46 | 0 | ▶ | my $val = constant($constname, @_ ? $_[0] : 0); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 47 | 0 | ▶ | if ($! != 0) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 48 | 0 | ▶ | if ($! =~ /Invalid/) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 49 | 0 | $AutoLoader::AUTOLOAD = $AUTOLOAD; | |||||||||
| 50 | 0 | goto &AutoLoader::AUTOLOAD; | |||||||||
| 51 | } | ||||||||||
| 52 | else { | ||||||||||
| 53 | 0 | croak "Your vendor has not defined Authen::Smb macro $constname"; | |||||||||
| 54 | } | ||||||||||
| 55 | } | ||||||||||
| 56 | 0 | eval "sub $AUTOLOAD { $val }"; | |||||||||
| 57 | 0 | goto &$AUTOLOAD; | |||||||||
| 58 | } | ||||||||||
| 59 | |||||||||||
| 60 | 1 | bootstrap Authen::Smb $VERSION; | |||||||||
| 61 | |||||||||||
| 62 | # Preloaded methods go here. | ||||||||||
| 63 | |||||||||||
| 64 | # Autoload methods go after =cut, and are processed by the autosplit program. | ||||||||||
| 65 | |||||||||||
| 66 | 1 | 1; | |||||||||
| 67 | __END__ | ||||||||||