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-18-g35b13a


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-18-g35b13ae
Date: Wed, 01 Feb 2012 12:13:40 +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  35b13aed4d8677c1f83c6ab3234ed5b5b2b8caa6 (commit)
      from  e18406105c2995fe6eac7e537a213ef38816583e (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=35b13aed4d8677c1f83c6ab3234ed5b5b2b8caa6


commit 35b13aed4d8677c1f83c6ab3234ed5b5b2b8caa6
Author: Mats Erik Andersson <address@hidden>
Date:   Wed Feb 1 12:33:57 2012 +0100

    Fix incomplete Kerberos code.

diff --git a/ChangeLog b/ChangeLog
index ceff4e8..a034063 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
 2012-02-01  Mats Erik Andersson <address@hidden>
 
+       * configure.ac: Check for typedefs `Schedule' and `Session_Key'
+       in <arpa/telnet.h>.
+       * libinetutils/des_rw.c [ENCRYPTION && KERBEROS && !MIN] (MIN):
+       Define missing macro.
+       [ENCRYPTION && KERBEROS && !roundup] (roundup): Likewise.
+       * libinetutils/kcmd.c (kcmd) [HAVE_SIGACTION]:  Use modern signal
+       handling.  New variables SIGS and OSIGS.
+       * libtelnet/auth.c [AUTHENTICATION] (AUTHTYPE_NAMES): New macro,
+       needed by OpenSolaris to fill in `authtype_names' by <arpa/telnet.h>.
+       * libtelnet/encrypt.h [ENCRYPTION && !HAVE_ARPA_TELNET_H_SCHEDULE]:
+       Typedef for `Schedule' is conditional.
+       [ENCRYPTION && !HAVE_ARPA_TELNET_H_SESSION_KEY]: Typedef for
+       `Session_Key' is conditional.
+       * libtelnet/misc.c: Include <arpa/telnet.h>.
+       * src/rlogind.c [KERBEROS && ENCRYPTION] (ENC_WRITE): Define macro
+       using correct name.
+       * src/rshd.c [!MAX] (MAX): Define missing macro.
+
+2012-02-01  Mats Erik Andersson <address@hidden>
+
        Detect and protect header files for Kerberos support.
        * configure.ac: Check for <com_err.h>, <kerberosIV/des.h>,
        <kerberosIV/krb.h>, <kerberosV/krb5.h>, <krb5.h>, <krb5/asn1.h>,
diff --git a/configure.ac b/configure.ac
index 91670a9..017d0ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -693,6 +693,16 @@ AC_CHECK_DECLS(telopts, , ,
   [IU_FLUSHLEFT([#undef TELOPTS
                  #include <arpa/telnet.h>])])
 
+dnl OpenSolaris provides Schedule and Session_Key.
+AC_CHECK_TYPE(Schedule,
+  AC_DEFINE([HAVE_ARPA_TELNET_H_SCHEDULE], 1,
+           [Define to one if <arpa/telnet.h> defines a type Schedule.]), ,
+  [#include <arpa/telnet.h>])
+AC_CHECK_TYPE(Session_Key,
+  AC_DEFINE([HAVE_ARPA_TELNET_H_SESSION_KEY], 1,
+           [Define to 1 if <arpa/telnet.h> defines a type Session_Key.]), ,
+  [#include <arpa/telnet.h>])
+
 ## Checks for function declarations.
 
 AC_DECL_SYS_SIGLIST
diff --git a/libinetutils/des_rw.c b/libinetutils/des_rw.c
index e2ca3cc..464753e 100644
--- a/libinetutils/des_rw.c
+++ b/libinetutils/des_rw.c
@@ -65,6 +65,13 @@
 #  include <time.h>
 #  include <unistd.h>
 
+#  ifndef MIN
+#   define MIN(a,b)    (((a)<(b))? (a):(b))
+#  endif
+#  ifndef roundup
+#   define roundup(x, y)   ((((x)+((y)-1))/(y))*(y))
+#  endif
+
 static unsigned char des_inbuf[10240], storage[10240], *store_ptr;
 static bit_64 *key;
 static unsigned char *key_schedule;
diff --git a/libinetutils/kcmd.c b/libinetutils/kcmd.c
index 58c6c0d..04d1687 100644
--- a/libinetutils/kcmd.c
+++ b/libinetutils/kcmd.c
@@ -106,7 +106,11 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short 
rport, char *locuser,
 # endif
 {
   int s, timo = 1, pid;
+# ifdef HAVE_SIGACTION
+  sigset_t sigs, osigs;
+# else
   long oldmask;
+# endif /* !HAVE_SIGACTION */
   struct sockaddr_in sin, from;
   char c;
 
@@ -142,7 +146,13 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short 
rport, char *locuser,
     realm = krb_realmofhost (host_save);
 # endif        /* KERBEROS */
 
+# ifdef HAVE_SIGACTION
+  sigemptyset (&sigs);
+  sigaddset (&sigs, SIGURG);
+  sigprocmask (SIG_BLOCK, &sigs, &osigs);
+# else
   oldmask = sigblock (sigmask (SIGURG));
+# endif /* !HAVE_SIGACTION */
   for (;;)
     {
       s = getport (&lport);
@@ -152,7 +162,11 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short 
rport, char *locuser,
            fprintf (stderr, "kcmd(socket): All ports in use\n");
          else
            perror ("kcmd: socket");
+# if HAVE_SIGACTION
+         sigprocmask (SIG_SETMASK, &osigs, NULL);
+# else
          sigsetmask (oldmask);
+# endif /* !HAVE_SIGACTION */
          return (-1);
        }
       fcntl (s, F_SETOWN, pid);
@@ -195,7 +209,12 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short 
rport, char *locuser,
 # endif        /* !(defined(ultrix) || defined(sun)) */
       if (errno != ECONNREFUSED)
        perror (hp->h_name);
+
+# if HAVE_SIGACTION
+      sigprocmask (SIG_SETMASK, &osigs, NULL);
+# else
       sigsetmask (oldmask);
+# endif /* !HAVE_SIGACTION */
 
       return (-1);
     }
@@ -326,7 +345,11 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short 
rport, char *locuser,
       status = -1;
       goto bad2;
     }
+# if HAVE_SIGACTION
+  sigprocmask (SIG_SETMASK, &osigs, NULL);
+# else
   sigsetmask (oldmask);
+# endif /* !HAVE_SIGACTION */
   *sock = s;
 # if defined KERBEROS
   return (KSUCCESS);
@@ -338,7 +361,11 @@ bad2:
     close (*fd2p);
 bad:
   close (s);
+# if HAVE_SIGACTION
+  sigprocmask (SIG_SETMASK, &osigs, NULL);
+# else
   sigsetmask (oldmask);
+# endif /* !HAVE_SIGACTION */
   return (status);
 }
 
diff --git a/libtelnet/auth.c b/libtelnet/auth.c
index 0ffd804..9f3f24f 100644
--- a/libtelnet/auth.c
+++ b/libtelnet/auth.c
@@ -76,6 +76,7 @@
 # include <sys/types.h>
 # include <signal.h>
 # define AUTH_NAMES
+# define AUTHTYPE_NAMES                /* Needed by Solaris.  */
 # include <arpa/telnet.h>
 # include <stdlib.h>
 # ifdef        NO_STRING_H
diff --git a/libtelnet/encrypt.h b/libtelnet/encrypt.h
index fd9788c..2dcdb0a 100644
--- a/libtelnet/encrypt.h
+++ b/libtelnet/encrypt.h
@@ -90,10 +90,13 @@
 
 typedef unsigned char Block[8];
 typedef unsigned char *BlockT;
+
+#  ifndef HAVE_ARPA_TELNET_H_SCHEDULE
 typedef struct
 {
   Block _;
 } Schedule[16];
+#  endif /* HAVE_ARPA_TELNET_H_SCHEDULE */
 
 #  ifndef VALIDKEY
 #   define VALIDKEY(key)       ( key[0] | key[1] | key[2] | key[3] | \
@@ -102,12 +105,14 @@ typedef struct
 
 #  define SAMEKEY(k1, k2)      (!memcmp ((void *) k1, (void *) k2, sizeof 
(Block)))
 
+#  ifndef HAVE_ARPA_TELNET_H_SESSION_KEY
 typedef struct
 {
   short type;
   int length;
   unsigned char *data;
 } Session_Key;
+#  endif /* HAVE_ARPA_TELNET_H_SESSION_KEY */
 
 typedef struct
 {
diff --git a/libtelnet/misc.c b/libtelnet/misc.c
index cd89460..4708302 100644
--- a/libtelnet/misc.c
+++ b/libtelnet/misc.c
@@ -50,6 +50,7 @@
 #include <config.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <arpa/telnet.h>
 
 #include "auth.h"
 #include "encrypt.h"
diff --git a/src/rlogind.c b/src/rlogind.c
index 9a23775..9888940 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -231,7 +231,7 @@ rlogind_sigchld (int sig)
      c = des_read(fd, buf, size); \
  else \
      c = read(fd, buf, size);
-# define EN_WRITE(c, fd, buf, size, ap) \
+# define ENC_WRITE(c, fd, buf, size, ap) \
  if (encrypt_io) \
      c = des_write(fd, buf, size); \
  else \
diff --git a/src/rshd.c b/src/rshd.c
index 9cb559c..a9d25c8 100644
--- a/src/rshd.c
+++ b/src/rshd.c
@@ -111,6 +111,10 @@
 # include <shishi_def.h>
 #endif
 
+#ifndef MAX
+# define MAX(a,b) (((a) > (b)) ? (a) : (b))
+#endif
+
 int keepalive = 1;             /* flag for SO_KEEPALIVE scoket option */
 int check_all;
 int log_success;               /* If TRUE, log all successful accesses */

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

Summary of changes:
 ChangeLog             |   20 ++++++++++++++++++++
 configure.ac          |   10 ++++++++++
 libinetutils/des_rw.c |    7 +++++++
 libinetutils/kcmd.c   |   27 +++++++++++++++++++++++++++
 libtelnet/auth.c      |    1 +
 libtelnet/encrypt.h   |    5 +++++
 libtelnet/misc.c      |    1 +
 src/rlogind.c         |    2 +-
 src/rshd.c            |    4 ++++
 9 files changed, 76 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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