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_1-288-g12916


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-288-g129168f
Date: Tue, 14 May 2013 23:05:00 +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  129168ffccbdf29ccaf5948f4154f0d2d58e63a2 (commit)
      from  e4c1a64a7b1a81078424ce5c1512864d9385e942 (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=129168ffccbdf29ccaf5948f4154f0d2d58e63a2


commit 129168ffccbdf29ccaf5948f4154f0d2d58e63a2
Author: Mats Erik Andersson <address@hidden>
Date:   Wed May 15 01:01:40 2013 +0200

    Audit of login options.

diff --git a/ChangeLog b/ChangeLog
index 1c8e2be..1ef073f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2013-05-15  Mats Erik Andersson  <address@hidden>
+
+       Audit of login options.
+
+       * configure.ac (SOLARIS10): Replace previous
+       macro SOLARIS11.
+       * src/rlogind.c (exec_login) [SOLARIS10]:
+       Use previous Solaris settings.
+       [SOLARIS]: Simplified setting.
+       * telnetd/telnetd.c (login_invocation)
+       [SOLARIS10 || SOLARIS]: Likewise, as two cases!
+
 2013-05-14  Mats Erik Andersson  <address@hidden>
 
        telnetd: Silence unwanted debugging.
diff --git a/configure.ac b/configure.ac
index ac95660..ac09d4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -955,8 +955,8 @@ case "$host" in
   ;;
 *olaris* )
   case "$host" in
-  *olaris*11 )
-    AC_DEFINE([SOLARIS11], 1, [OpenSolaris and newer Solaris.])
+  *olaris*10 | *olaris*11 )
+    AC_DEFINE([SOLARIS10], 1, [Solaris 10 and newer variants.])
     ;;
   * )
     # Older Solaris variants.
diff --git a/src/rlogind.c b/src/rlogind.c
index 70581ab..1334065 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -1118,24 +1118,39 @@ exec_login (int authenticated, struct auth_data *ap)
 {
   if (authenticated)
     {
-#ifdef SOLARIS
+#ifdef SOLARIS10
+      /* TODO: Add `-u' with Kerberos principal name of user.
+       */
       execle (path_login, "login", "-p", "-s", "krlogin",
              "-r", ap->hostname, "-U", ap->rusername,
              ap->lusername, NULL, ap->env);
+#elif defined SOLARIS
+      execle (path_login, "login", "-p", "-r", ap->hostname,
+             ap->lusername, NULL, ap->env);
 #else
-      execle (path_login, "login", "-p",
-             "-h", ap->hostname, "-f", ap->lusername, NULL, ap->env);
+      /* Some GNU/Linux systems, but not all,  provide `-r'
+       * for use instead of `-h'.  Some BSD systems provide `-u'.
+       */
+      execle (path_login, "login", "-p", "-h", ap->hostname, "-f",
+             ap->lusername, NULL, ap->env);
 #endif
     }
   else
     {
-#ifdef SOLARIS
+#ifdef SOLARIS10
+      /* `-U' in not strictly needed, but is harmless.  */
       execle (path_login, "login", "-p", "-s", "rlogin",
              "-r", ap->hostname, "-U", ap->rusername,
              ap->lusername, NULL, ap->env);
+#elif defined SOLARIS
+      execle (path_login, "login", "-p", "-r", ap->hostname,
+             ap->lusername, NULL, ap->env);
 #else
-      execle (path_login, "login", "-p",
-             "-h", ap->hostname, ap->lusername, NULL, ap->env);
+      /* Some GNU/Linux systems, but not all,  provide `-r'
+       * for use instead of `-h'.  Some BSD systems provide `-u'.
+       */
+      execle (path_login, "login", "-p", "-h", ap->hostname,
+             ap->lusername, NULL, ap->env);
 #endif
     }
   syslog (LOG_ERR, "can't exec login: %m");
diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c
index 2736545..3af45e6 100644
--- a/telnetd/telnetd.c
+++ b/telnetd/telnetd.c
@@ -43,13 +43,20 @@ static void telnetd_setup (int fd);
 static int telnetd_run (void);
 static void print_hostinfo (void);
 
-/* Template command line for invoking login program */
+/* Template command line for invoking login program.  */
 
 char *login_invocation =
-#ifdef SOLARIS11
+#ifdef SOLARIS10
+  /* TODO: `-s telnet' or `-s ktelnet'.
+   *       `-u' takes the Kerberos principal name
+   *       of the authenticating, remote user.
+   */
   PATH_LOGIN " -p -h %h %?T{-t %T} %?u{-u %u}"
+
 #elif defined SOLARIS
-  PATH_LOGIN " -h %h %?T{-t %T} %?u{-u %u}"
+  /* At least for SunOS 5.8.  */
+  PATH_LOGIN " -h %h %?T{%T} %?u{-- %u}"
+
 #else /* !SOLARIS */
   PATH_LOGIN " -p -h %h %?u{-f %u}"
 #endif

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

Summary of changes:
 ChangeLog         |   12 ++++++++++++
 configure.ac      |    4 ++--
 src/rlogind.c     |   27 +++++++++++++++++++++------
 telnetd/telnetd.c |   13 ++++++++++---
 4 files changed, 45 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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