home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
perl_ste.zip
/
auto
/
Net
/
FTP
/
authorize.al
< prev
next >
Wrap
Text File
|
1997-11-28
|
624b
|
32 lines
# NOTE: Derived from ./blib/lib/Net/FTP.pm. Changes made here will be lost.
package Net::FTP;
sub authorize
{
@_ >= 1 || @_ <= 3 or croak 'usage: $ftp->authorize( [AUTH [, RESP]])';
my($ftp,$auth,$resp) = @_;
unless(defined $resp)
{
require Net::Netrc;
$auth ||= (getpwuid($>))[0];
my $rc = Net::Netrc->lookup(${*$ftp}{'net_ftp_firewall'}, $auth)
|| Net::Netrc->lookup(${*$ftp}{'net_ftp_firewall'});
($auth,$resp) = $rc->lpa()
if($rc);
}
my $ok = $ftp->_AUTH($auth || "");
$ok = $ftp->_RESP($resp || "")
if ($ok == CMD_MORE);
$ok == CMD_OK;
}
1;