commit-inetutils
[Top][All Lists]
Advanced

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

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-53-g495beb


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-53-g495beb8
Date: Mon, 16 Mar 2015 22:26:11 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  495beb89dac593371c004c57c65c4efd290ecd51 (commit)
      from  0b7e8687494ed8522e0243b5e6390fbd4e5e54c9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=495beb89dac593371c004c57c65c4efd290ecd51


commit 495beb89dac593371c004c57c65c4efd290ecd51
Author: Mats Erik Andersson <address@hidden>
Date:   Mon Mar 16 23:22:12 2015 +0100

    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.

diff --git a/ChangeLog b/ChangeLog
index 0310c61..70c741c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2015-03-16  Mats Erik Andersson  <address@hidden>
+
+       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  <address@hidden>
 
        telnetd: Suppress PTY packet data.
diff --git a/ftp/cmds.c b/ftp/cmds.c
index 16ba5fc..422d365 100644
--- a/ftp/cmds.c
+++ b/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;
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog  |   11 +++++++++++
 ftp/cmds.c |   10 ++++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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