On Tue, Dec 13, 2005 at 09:03:05PM +0100, Matt Anton wrote:
> With lftp 3.3.0, login and password for "ftp_host1" were used (as they've 
> been defined in ~/.netrc), the connection is made and i get the listing 
> of ftp_host1's root.
> With lftp 3.3.5, the login and password for "ftp_host1" aren't used, thus 
> using 'anonymous' as the login.

Ok, I see now. It is a bug. For workaround, specify desired login along
with host name, like this:

        lftp [EMAIL PROTECTED]

and lftp would take password from netrc.

Or apply attached patch.

-- 
   Alexander..
Index: commands.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/commands.cc,v
retrieving revision 1.233
diff -u -p -r1.233 commands.cc
--- commands.cc 8 Dec 2005 13:50:07 -0000       1.233
+++ commands.cc 14 Dec 2005 10:40:12 -0000
@@ -858,8 +858,9 @@ Job *CmdExec::builtin_open()
       if(host && host[0])
       {
         url=new ParsedURL(host);
+        bool no_proto=(!url->proto);
 
-        if(!url->proto && url->host)
+        if(no_proto && url->host)
         {
            const char *p=ResMgr::Query("cmd:default-protocol",url->host);
            if(!p)
@@ -911,7 +912,7 @@ Job *CmdExec::builtin_open()
         }
 
         // user gets substituted only if no proto is specified.
-        if(!pass && (user || !uc.proto))
+        if(!pass && (user || no_proto))
         {
            nrc=NetRC::LookupHost(host,user);
            if(nrc)

Reply via email to