about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2001-11-20 19:18:22 +0000
committerGraham Barr <gbarr@pobox.com>2001-11-20 19:18:22 +0000
commitfc77bc00adb13d8ca5c7019cd24094a5c265eafb (patch)
tree555cb57c534ac914fcb11413d24379693c35f978
parentc31293a0cac601e4a0885f589b5cca36f4318fb6 (diff)
downloadperl-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.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/Net/FTP.pm b/Net/FTP.pm
index 531ff40..49db7ca 100644
--- a/Net/FTP.pm
+++ b/Net/FTP.pm
@@ -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