diff options
author | Graham Barr <gbarr@pobox.com> | 2001-11-20 19:18:22 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 2001-11-20 19:18:22 +0000 |
commit | fc77bc00adb13d8ca5c7019cd24094a5c265eafb (patch) | |
tree | 555cb57c534ac914fcb11413d24379693c35f978 | |
parent | c31293a0cac601e4a0885f589b5cca36f4318fb6 (diff) | |
download | perl-libnet-fc77bc00adb13d8ca5c7019cd24094a5c265eafb.tar.gz |
Net::FTP
- Send -anonymous@ as the password for the anonymous user, not the real username. Patch from Eduardo Perez Ureta
-rw-r--r-- | Net/FTP.pm | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -22,7 +22,7 @@ use Net::Config; use Fcntl qw(O_WRONLY O_RDONLY O_APPEND O_CREAT O_TRUNC); # use AutoLoader qw(AUTOLOAD); -$VERSION = "2.61"; # $Id: //depot/libnet/Net/FTP.pm#61 $ +$VERSION = "2.62"; # $Id: //depot/libnet/Net/FTP.pm#62 $ @ISA = qw(Exporter Net::Cmd IO::Socket::INET); # Someday I will "use constant", when I am not bothered to much about @@ -310,7 +310,7 @@ sub login { ($ruser,$pass,$acct) = $rc->lpa() if ($rc); - $pass = "-" . (eval { (getpwuid($>))[0] } || $ENV{NAME} ) . '@' + $pass = '-anonymous@' if (!defined $pass && (!defined($ruser) || $ruser =~ /^anonymous/o)); } @@ -1200,7 +1200,7 @@ Net::FTP - FTP Client class use Net::FTP; $ftp = Net::FTP->new("some.host.name", Debug => 0); - $ftp->login("anonymous",'me@here.there'); + $ftp->login("anonymous",'-anonymous@'); $ftp->cwd("/pub"); $ftp->get("that.file"); $ftp->quit; @@ -1718,6 +1718,6 @@ under the same terms as Perl itself. =for html <hr> -I<$Id: //depot/libnet/Net/FTP.pm#61 $> +I<$Id: //depot/libnet/Net/FTP.pm#62 $> =cut |