mirror of
https://git.savannah.gnu.org/git/inetutils.git
synced 2026-01-12 00:19:39 +08:00
ftp: Honour host aliases.
Take care to preserve the desired peer's name. Do not replace it with its canonical name. Bug was reported to the list as `2015-02/msg00000.html' by John Sullivan.
This commit is contained in:
11
ChangeLog
11
ChangeLog
@@ -1,3 +1,14 @@
|
||||
2015-03-16 Mats Erik Andersson <gnu@gisladisker.se>
|
||||
|
||||
ftp: Honour host aliases.
|
||||
While establishing the connection, do not replace the desired
|
||||
peer name with its canonical name. This prevents correct use
|
||||
of the netrc file. Bug reported by John Sullivan in
|
||||
http://lists.gnu.org/archive/html/bug-inetutils/2015-02/msg00000.html
|
||||
|
||||
* ftp/cmds.c (setpeer): Do not assign value from hookup()
|
||||
to HOST. Instead, only test if it is non-null.
|
||||
|
||||
2015-03-15 Mats Erik Andersson <gnu@gisladisker.se>
|
||||
|
||||
telnetd: Suppress PTY packet data.
|
||||
|
||||
10
ftp/cmds.c
10
ftp/cmds.c
@@ -279,8 +279,14 @@ setpeer (int argc, char **argv)
|
||||
port = (sp) ? ntohs (sp->s_port) : DEFPORT;
|
||||
}
|
||||
|
||||
host = hookup (host, port);
|
||||
if (host)
|
||||
/* After hookup(), the global variable `hostname' contains
|
||||
* the canonical host name corresponding to the alias name
|
||||
* contained in HOST. The return value of hookup() is not
|
||||
* NULL only if the server has answered our call. The value
|
||||
* of HOST should be preserved for reporting inside login(),
|
||||
* which also detects a correct stanza of the netrc file.
|
||||
*/
|
||||
if (hookup (host, port))
|
||||
{
|
||||
int overbose;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user