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-285-gd6a64


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-285-gd6a64f4
Date: Mon, 13 May 2013 22:10:05 +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  d6a64f4ff8444c697b18eedade1bf2b8ac3a0f71 (commit)
       via  4d72a588c2f1e269d1ca4564f1255392db2311d7 (commit)
       via  62db12b9cc52a9bece74744b6789d790bb8e6916 (commit)
      from  e854134ba2470c111532a8509d6780d99d486f1d (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=d6a64f4ff8444c697b18eedade1bf2b8ac3a0f71


commit d6a64f4ff8444c697b18eedade1bf2b8ac3a0f71
Author: Mats Erik Andersson <address@hidden>
Date:   Mon May 13 19:08:29 2013 +0200

    libtelnet: Availability of DES_OFB64.
    
    Declare properly that our code base supports DES_CFB64
    as well as DES_OFB64.  This prevents the system specific
    header to arrange matters otherwise.

diff --git a/ChangeLog b/ChangeLog
index 4626c55..90bbef2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
 2013-05-13  Mats Erik Andersson  <address@hidden>
 
+       libtelnet: Make availibility of DES_OFB64 in addition
+       to DES_CFB64 independent of host system.
+
+       * libtelnet/encryption.h (ENCTYPE_DES_OFB64)
+       [ENCRYPTION]: Define if missing.
+       (ENCTYPE_CNT, ENCTYPE_NAME_OK) [ENCRYPTION]:
+       Always redefine.
+
+       * libtelnet/encryption.c [ENCRYPTION]: Undefine
+       ENCRYPT_NAMES before including <arpa/telnet.h>.
+       (enctype_names) [ENCRYPTION]: New array variable.
+       (encrypt_is, encrypt_reply, encrypt_start) [ENCRYPTION]:
+       Before printing encryption type, check that ENCTYPE_NAME()
+       is non-null in addition to checking only ENCTYPE_NAME_OK().
+
+       * telnet/utilities.c (printsub) [ENCRYPTION]: Likewise.
+       * telnetd/utility.c (printsub) [ENCRYPTION]: Likewise.
+
+2013-05-13  Mats Erik Andersson  <address@hidden>
+
        * configure.ac <*olaris*>: New test for subcase
        `*olaris*11'.  Define SOLARIS11 for matches.
 
diff --git a/libtelnet/encrypt.c b/libtelnet/encrypt.c
index b55aa9b..c67e61b 100644
--- a/libtelnet/encrypt.c
+++ b/libtelnet/encrypt.c
@@ -71,7 +71,7 @@
 
 #ifdef ENCRYPTION
 
-# define ENCRYPT_NAMES
+# undef ENCRYPT_NAMES          /* Ignore enctype_names[].  */
 # include <arpa/telnet.h>
 
 # include "encrypt.h"
@@ -83,6 +83,13 @@
 # include <stdio.h>
 # include "genget.h"
 
+/* String representation of our capabilities.
+ * Solaris will gain DES_OFB64!
+ */
+char *enctype_names[] = {
+  "ANY", "DES_CFB64", "DES_OFB64", 0,
+};
+
 /* Callback from consumer.  */
 extern void printsub (char, unsigned char *, int);
 
@@ -565,7 +572,7 @@ encrypt_is (unsigned char *data, int cnt)
       if (encrypt_debug_mode)
        printf (">>>%s: Can't find type %s (%d) for initial negotiation\r\n",
                Name,
-               ENCTYPE_NAME_OK (type)
+               ENCTYPE_NAME_OK (type) && ENCTYPE_NAME (type)
                ? ENCTYPE_NAME (type) : "(unknown)", type);
       return;
     }
@@ -574,7 +581,7 @@ encrypt_is (unsigned char *data, int cnt)
       if (encrypt_debug_mode)
        printf (">>>%s: No initial negotiation needed for type %s (%d)\r\n",
                Name,
-               ENCTYPE_NAME_OK (type)
+               ENCTYPE_NAME_OK (type) && ENCTYPE_NAME (type)
                ? ENCTYPE_NAME (type) : "(unknown)", type);
       ret = 0;
     }
@@ -610,7 +617,7 @@ encrypt_reply (unsigned char *data, int cnt)
       if (encrypt_debug_mode)
        printf (">>>%s: Can't find type %s (%d) for initial negotiation\r\n",
                Name,
-               ENCTYPE_NAME_OK (type)
+               ENCTYPE_NAME_OK (type) && ENCTYPE_NAME (type)
                ? ENCTYPE_NAME (type) : "(unknown)", type);
       return;
     }
@@ -619,7 +626,7 @@ encrypt_reply (unsigned char *data, int cnt)
       if (encrypt_debug_mode)
        printf (">>>%s: No initial negotiation needed for type %s (%d)\r\n",
                Name,
-               ENCTYPE_NAME_OK (type)
+               ENCTYPE_NAME_OK (type) && ENCTYPE_NAME (type)
                ? ENCTYPE_NAME (type) : "(unknown)", type);
       ret = 0;
     }
@@ -679,7 +686,7 @@ encrypt_start (unsigned char *data, int cnt)
     {
       printf ("%s: Warning, Cannot decrypt type %s (%d)!!!\r\n",
              Name,
-             ENCTYPE_NAME_OK (decrypt_mode)
+             ENCTYPE_NAME_OK (decrypt_mode) && ENCTYPE_NAME (decrypt_mode)
              ? ENCTYPE_NAME (decrypt_mode) : "(unknown)", decrypt_mode);
       encrypt_send_request_end ();
     }
@@ -861,7 +868,7 @@ encrypt_start_output (int type)
        {
          printf (">>>%s: Can't encrypt with type %s (%d)\r\n",
                  Name,
-                 ENCTYPE_NAME_OK (type)
+                 ENCTYPE_NAME_OK (type) && ENCTYPE_NAME (type)
                  ? ENCTYPE_NAME (type) : "(unknown)", type);
        }
       return;
diff --git a/libtelnet/encrypt.h b/libtelnet/encrypt.h
index 444826f..f65b18f 100644
--- a/libtelnet/encrypt.h
+++ b/libtelnet/encrypt.h
@@ -88,6 +88,22 @@
 #   define ENCTYPE_CNT TELOPT_ENCTYPE_CNT
 #  endif
 
+/*
+ * Our capabilities are restricted to the encryption types
+ * DES_CFB64 and DES_OFB64.  The latter type is sometimes
+ * missing in <arpa/telnet.h>.  On the other hand, the same
+ * header file may indicate more encryption types than are
+ * supported by the present code.
+ */
+#  ifndef ENCTYPE_DES_OFB64
+#   define ENCTYPE_DES_OFB64   2       /* RFC 2953 */
+#  endif
+#  undef ENCTYPE_CNT
+#  define ENCTYPE_CNT  3               /* Up to DES_OFB64.  */
+
+#  undef ENCTYPE_NAME_OK
+#  define ENCTYPE_NAME_OK(x)   ((unsigned int)(x) < ENCTYPE_CNT)
+
 typedef unsigned char Block[8];
 typedef unsigned char *BlockT;
 
diff --git a/telnet/utilities.c b/telnet/utilities.c
index f97646b..d3320fd 100644
--- a/telnet/utilities.c
+++ b/telnet/utilities.c
@@ -597,7 +597,7 @@ printsub (char direction, unsigned char *pointer, int 
length)
                  fprintf (NetTrace, " (partial suboption??\?)");
                  break;
                }
-             if (ENCTYPE_NAME_OK (pointer[2]))
+             if (ENCTYPE_NAME_OK (pointer[2]) && ENCTYPE_NAME (pointer[2]))
                fprintf (NetTrace, "%s ", ENCTYPE_NAME (pointer[2]));
              else
                fprintf (NetTrace, " %d (unknown)", pointer[2]);
@@ -611,7 +611,7 @@ printsub (char direction, unsigned char *pointer, int 
length)
              fprintf (NetTrace, " SUPPORT ");
              while (i < length)
                {
-                 if (ENCTYPE_NAME_OK (pointer[i]))
+                 if (ENCTYPE_NAME_OK (pointer[i]) && ENCTYPE_NAME (pointer[i]))
                    fprintf (NetTrace, "%s ", ENCTYPE_NAME (pointer[i]));
                  else
                    fprintf (NetTrace, "%d ", pointer[i]);
diff --git a/telnetd/utility.c b/telnetd/utility.c
index 4e669b7..da16788 100644
--- a/telnetd/utility.c
+++ b/telnetd/utility.c
@@ -1503,7 +1503,7 @@ printsub (int direction, unsigned char *pointer, int 
length)
              debug_output_data (" (partial suboption??\?)");
              break;
            }
-         if (ENCTYPE_NAME_OK (pointer[2]))
+         if (ENCTYPE_NAME_OK (pointer[2]) && ENCTYPE_NAME (pointer[2]))
            debug_output_data ("%s ", ENCTYPE_NAME (pointer[2]));
          else
            debug_output_data (" %d (unknown)", pointer[2]);
@@ -1517,7 +1517,7 @@ printsub (int direction, unsigned char *pointer, int 
length)
          debug_output_data (" SUPPORT ");
          while (i < length)
            {
-             if (ENCTYPE_NAME_OK (pointer[i]))
+             if (ENCTYPE_NAME_OK (pointer[i]) && ENCTYPE_NAME (pointer[i]))
                debug_output_data ("%s ", ENCTYPE_NAME (pointer[i]));
              else
                debug_output_data ("%d ", pointer[i]);

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=4d72a588c2f1e269d1ca4564f1255392db2311d7


commit 4d72a588c2f1e269d1ca4564f1255392db2311d7
Author: Mats Erik Andersson <address@hidden>
Date:   Mon May 13 00:11:15 2013 +0200

    Login fixes for Solaris.

diff --git a/ChangeLog b/ChangeLog
index 9e31c44..4626c55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2013-05-13  Mats Erik Andersson  <address@hidden>
+
+       * configure.ac <*olaris*>: New test for subcase
+       `*olaris*11'.  Define SOLARIS11 for matches.
+
+       * telnetd/telnetd.c (login_invocation)
+       [SOLARIS && SOLARIS11]: Add `-p' to old value.
+
+       * src/rlogind.c (exec_login) <authenticated>
+       [SOLARIS]: Change service to `-s krlogin' in
+       argument list to execle().
+
 2013-05-09  Mats Erik Andersson  <address@hidden>
 
        * src/logger.c (parse_level): Rename PRI to PRIO,
diff --git a/configure.ac b/configure.ac
index 5ebc4d2..ac95660 100644
--- a/configure.ac
+++ b/configure.ac
@@ -943,7 +943,7 @@ AH_BOTTOM(
 # entry in utmpx.  Also for some OS they are better handled with
 # STREAMS.
 case "$host" in
-*-freebsd9* | *-freebsd10*)
+*-freebsd9* | *-freebsd10* )
   # FreeBSD 9.0 has implemented a non-standard and singular
   # UTMPX interface.  The readutmp module from GNUlib does
   # not support it, but we can fall back to getutxuser() for
@@ -953,7 +953,15 @@ case "$host" in
   #
   # Other issues?
   ;;
-*olaris*)
+*olaris* )
+  case "$host" in
+  *olaris*11 )
+    AC_DEFINE([SOLARIS11], 1, [OpenSolaris and newer Solaris.])
+    ;;
+  * )
+    # Older Solaris variants.
+    ;;
+  esac
   AC_DEFINE([SOLARIS], 1, [FIXME])
   AC_DEFINE([HAVE_STREAMSPTY], 1, [FIXME])
   ;;
diff --git a/src/rlogind.c b/src/rlogind.c
index 19525e4..70581ab 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -1119,7 +1119,7 @@ exec_login (int authenticated, struct auth_data *ap)
   if (authenticated)
     {
 #ifdef SOLARIS
-      execle (path_login, "login", "-p", "-s", "rlogin",
+      execle (path_login, "login", "-p", "-s", "krlogin",
              "-r", ap->hostname, "-U", ap->rusername,
              ap->lusername, NULL, ap->env);
 #else
diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c
index 3dfec8d..f7886f3 100644
--- a/telnetd/telnetd.c
+++ b/telnetd/telnetd.c
@@ -46,9 +46,11 @@ static void print_hostinfo (void);
 /* Template command line for invoking login program */
 
 char *login_invocation =
-#ifdef SOLARIS
+#ifdef SOLARIS11
+  PATH_LOGIN " -p -h %h %?T{-t %T} %?u{-u %u}"
+#elif defined SOLARIS
   PATH_LOGIN " -h %h %?T{-t %T} %?u{-u %u}"
-#else
+#else /* !SOLARIS */
   PATH_LOGIN " -p -h %h %?u{-f %u}"
 #endif
   ;

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=62db12b9cc52a9bece74744b6789d790bb8e6916


commit 62db12b9cc52a9bece74744b6789d790bb8e6916
Author: Mats Erik Andersson <address@hidden>
Date:   Thu May 9 23:32:37 2013 +0200

    logger: Default priority.

diff --git a/ChangeLog b/ChangeLog
index a6c8fab..9e31c44 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-05-09  Mats Erik Andersson  <address@hidden>
+
+       * src/logger.c (parse_level): Rename PRI to PRIO,
+       so as not to shadow the global variable.  Initiate
+       value to LOG_NOTICE, not to LOG_EMERG.
+
 2013-05-08  Mats Erik Andersson  <address@hidden>
 
        libtelnet: Parity adjust non-DES key.
diff --git a/src/logger.c b/src/logger.c
index 6da5b84..957843d 100644
--- a/src/logger.c
+++ b/src/logger.c
@@ -52,7 +52,7 @@
 
 static char *tag = NULL;
 static int logflags = 0;
-static int pri = MAKE_PRI (LOG_USER, LOG_NOTICE);
+static int pri = MAKE_PRI (LOG_USER, LOG_NOTICE);  /* Cf. parse_level */
 /* Only one of `host' and `unixsock' will be non-NULL
  * once option parsing has been completed. */
 static char *host = PATH_LOG;
@@ -106,7 +106,7 @@ int
 parse_level (char *str)
 {
   char *p;
-  int fac, pri = 0;
+  int fac, prio = LOG_NOTICE;  /* Default priority!  */
 
   p = strchr (str, '.');
   if (p)
@@ -114,8 +114,9 @@ parse_level (char *str)
 
   fac = decode (str, facilitynames, "facility");
   if (p)
-    pri = decode (p, prioritynames, "priority");
-  return MAKE_PRI (fac, pri);
+    prio = decode (p, prioritynames, "priority");
+
+  return MAKE_PRI (fac, prio);
 }
 
 

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

Summary of changes:
 ChangeLog           |   38 ++++++++++++++++++++++++++++++++++++++
 configure.ac        |   12 ++++++++++--
 libtelnet/encrypt.c |   21 ++++++++++++++-------
 libtelnet/encrypt.h |   16 ++++++++++++++++
 src/logger.c        |    9 +++++----
 src/rlogind.c       |    2 +-
 telnet/utilities.c  |    4 ++--
 telnetd/telnetd.c   |    6 ++++--
 telnetd/utility.c   |    4 ++--
 9 files changed, 92 insertions(+), 20 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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