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-54-gfa3245


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-54-gfa3245a
Date: Thu, 19 Mar 2015 13:19:58 +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  fa3245ac8c288b87139a0da8249d0a408c4dfb87 (commit)
      from  495beb89dac593371c004c57c65c4efd290ecd51 (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=fa3245ac8c288b87139a0da8249d0a408c4dfb87


commit fa3245ac8c288b87139a0da8249d0a408c4dfb87
Author: Mats Erik Andersson <address@hidden>
Date:   Thu Mar 19 13:49:43 2015 +0100

    telnetd: Enable autologin in legacy mode.
    
    Without authentication, autologin was broken.  Bug reported
    by Kuaikuai Wu to the list in `2014-12/msg00010.html'.

diff --git a/ChangeLog b/ChangeLog
index 70c741c..6f868c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2015-03-19  Mats Erik Andersson  <address@hidden>
+
+       telnetd: Enable autologin in legacy mode.
+       Without Kerberos authentication the autologin code was not
+       determining what user name to hand over to the login service.
+       Adding the user name, when applicable, resolves the issue.
+       Bug was reported by Kuaikuai Wu in
+       http://lists.gnu.org/archive/html/bug-inetutils/2014-12/msg00010.html
+
+       * telnetd/telnetd.c [SOLARIS10] (login_invocation):
+       Add device path "-d %L" and user name "%U", the latter
+       in the form of an else clause to the selector "%?u".
+       [!SOLARIS10] (login_invocation): Likewise for "%U" only.
+
+       * telnetd/utility.c (getterminaltype): Change the paramater
+       name `user_name' to `uname', as the former shadows a precious
+       and global variable name.
+       (_var_short_name) <case 'L'>: New case, returning full path
+       to the PTY device assigned to client.
+       <case 'U'>: New case, returning a copy of the environment
+       variable USER, or an empty string.
+
 2015-03-16  Mats Erik Andersson  <address@hidden>
 
        ftp: Honour host aliases.
diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c
index fff4432..faecc07 100644
--- a/telnetd/telnetd.c
+++ b/telnetd/telnetd.c
@@ -52,14 +52,14 @@ char *login_invocation =
    *       `-u' takes the Kerberos principal name
    *       of the authenticating, remote user.
    */
-  PATH_LOGIN " -p -h %h %?T{-t %T} %?u{-u %u}"
+  PATH_LOGIN " -p -h %h %?T{-t %T} -d %L %?u{-u %u}{%U}"
 
 #elif defined SOLARIS
   /* At least for SunOS 5.8.  */
-  PATH_LOGIN " -h %h %?T{%T} %?u{-- %u}"
+  PATH_LOGIN " -h %h %?T{%T} %?u{-- %u}{%U}"
 
 #else /* !SOLARIS */
-  PATH_LOGIN " -p -h %h %?u{-f %u}"
+  PATH_LOGIN " -p -h %h %?u{-f %u}{%U}"
 #endif
   ;
 
diff --git a/telnetd/utility.c b/telnetd/utility.c
index e644377..21a231e 100644
--- a/telnetd/utility.c
+++ b/telnetd/utility.c
@@ -695,7 +695,7 @@ _gettermname (void)
  * Changes terminaltype.
  */
 int
-getterminaltype (char *user_name, size_t len)
+getterminaltype (char *uname, size_t len)
 {
   int retval = -1;
 
@@ -721,10 +721,10 @@ getterminaltype (char *user_name, size_t len)
       ttloop (his_will_wont_is_changing (TELOPT_AUTHENTICATION));
 
       if (his_state_is_will (TELOPT_AUTHENTICATION))
-       retval = auth_wait (user_name, len);
+       retval = auth_wait (uname, len);
     }
 #else /* !AUTHENTICATION */
-  (void) user_name;    /* Silence warning.  */
+  (void) uname;        /* Silence warning.  */
 #endif
 
 #ifdef ENCRYPTION
@@ -1680,6 +1680,9 @@ _var_short_name (struct line_expander *exp)
     case 'l':
       return xstrdup (local_hostname);
 
+    case 'L':
+      return xstrdup (line);
+
     case 't':
       q = strchr (line + 1, '/');
       if (q)
@@ -1694,6 +1697,9 @@ _var_short_name (struct line_expander *exp)
     case 'u':
       return user_name ? xstrdup (user_name) : NULL;
 
+    case 'U':
+      return getenv ("USER") ? xstrdup (getenv ("USER")) : xstrdup ("");
+
     default:
       exp->state = EXP_STATE_ERROR;
       return NULL;

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

Summary of changes:
 ChangeLog         |   22 ++++++++++++++++++++++
 telnetd/telnetd.c |    6 +++---
 telnetd/utility.c |   12 +++++++++---
 3 files changed, 34 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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