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_4-28-g127a8a


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_4-28-g127a8a3
Date: Thu, 23 Feb 2017 18:08:09 -0500 (EST)

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  127a8a349168cfc91bd3699f911c5de42e5863aa (commit)
      from  2863d455b962440e00f26e918f1c7c3af7fea7dc (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=127a8a349168cfc91bd3699f911c5de42e5863aa


commit 127a8a349168cfc91bd3699f911c5de42e5863aa
Author: Mats Erik Andersson <address@hidden>
Date:   Fri Feb 24 00:02:14 2017 +0100

    telnetd: Scrub USER from environment.
    
    Avoid conflicting user identity by forgetting whatever
    the serving host considers to be the process owner.

diff --git a/ChangeLog b/ChangeLog
index 5b74b65..a423584 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-02-23  Mats Erik Andersson  <address@hidden>
+
+       telnetd: Scrub USER from environment.
+       Discard the environment variable USER.  It will later be set
+       properly for autologin, but at least one BSD system passes
+       a preset value when telnetd starts, a value which will cause
+       rejected login when autologin is not in effect.
+
+       * telnetd/telnetd.c (telnetd_setup): Unset environment
+       variable USER before calling getterminaltype().
+
 2017-02-21  Mats Erik Andersson  <address@hidden>
 
        * bootstrap: Updated from gnulib.
diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c
index 1dcd980..5e13e23 100644
--- a/telnetd/telnetd.c
+++ b/telnetd/telnetd.c
@@ -504,6 +504,14 @@ telnetd_setup (int fd)
 
   io_setup ();
 
+  /* Before doing anything related to the identity of the client,
+   * scrub the environment variable USER, since it may be set with
+   * an irrelevant user name at this point.  OpenBSD has been known
+   * to offend at this point with their own inetd.  Any demand for
+   * autologin will get attention in getterminaltype().
+   */
+  unsetenv ("USER");
+
   /* get terminal type. */
   uname[0] = 0;
   level = getterminaltype (uname, sizeof (uname));

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

Summary of changes:
 ChangeLog         | 11 +++++++++++
 telnetd/telnetd.c |  8 ++++++++
 2 files changed, 19 insertions(+)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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