bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-inetutils] ftp client bug .netrc


From: Mats Erik Andersson
Subject: Re: [bug-inetutils] ftp client bug .netrc
Date: Mon, 16 Mar 2015 23:37:39 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

Saturday den 14 February 2015 klockan 07:59 skrev john sullivan detta:
> Hi,
> 
> I found a bug.  What happens:  if the host name entered by the user
> does not match the official name, the .netrc command won't work
> because the host entered by the user is overwritten in the "hookup"
> function, and it shouldn't be.
> 
> host = hookup (host, port);
> 
> should be:
> 
> hostname = hookup (host, port);
> 
> in file:
> 
> inetutils-1.9.2/ftp/cmds.c

A great find indeed, but the remedy has an unwanted side effect.
The correct change is

  -  host = hookup (host, port);
  -  if (host)
  +  if (hookup (host, port))

This preserves the local variable HOST which is later needed
in `login(host)' and also retains the global variable `hostname'
to whom is assigned the corresponding canonical name by hookup().
This latter name is needed in status reporting in order to conform
with other implementations of the FTP client, including those of
netkit-ftp, of FreeBSD and Solaris, all of which I just have checked.

As this bug represents an old error in GNU Inetutils, your find
is very welcome indeed!

Best regards,
  Mats Erik Andersson



reply via email to

[Prev in Thread] Current Thread [Next in Thread]