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
