From MAILER-DAEMON Wed Feb 01 07:13:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RsZ4U-00028J-GF
	for mharc-commit-inetutils@gnu.org; Wed, 01 Feb 2012 07:13:54 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45391)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RsZ4M-000273-VR
	for commit-inetutils@gnu.org; Wed, 01 Feb 2012 07:13:53 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RsZ4L-0002mv-4N
	for commit-inetutils@gnu.org; Wed, 01 Feb 2012 07:13:46 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:44502)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RsZ4L-0002mf-1c
	for commit-inetutils@gnu.org; Wed, 01 Feb 2012 07:13:45 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RsZ4G-0002iU-Fg
	for commit-inetutils@gnu.org; Wed, 01 Feb 2012 12:13:43 +0000
Date: Wed, 01 Feb 2012 12:13:40 +0000
Message-Id: <E1RsZ4G-0002iU-Fg@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-18-g35b13ae
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: e18406105c2995fe6eac7e537a213ef38816583e
X-Git-Newrev: 35b13aed4d8677c1f83c6ab3234ed5b5b2b8caa6
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Feb 2012 12:13:53 -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 <gnu@gisladisker.se>
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 <gnu@gisladisker.se>
 
+	* 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 <gnu@gisladisker.se>
+
 	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 


From MAILER-DAEMON Wed Feb 01 10:14:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rsbsv-000785-76
	for mharc-commit-inetutils@gnu.org; Wed, 01 Feb 2012 10:14:09 -0500
Received: from eggs.gnu.org ([140.186.70.92]:43600)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rsbsj-00070r-Lw
	for commit-inetutils@gnu.org; Wed, 01 Feb 2012 10:14:07 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rsbsi-0006LI-6P
	for commit-inetutils@gnu.org; Wed, 01 Feb 2012 10:13:57 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:44241)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rsbsi-0006LC-3j
	for commit-inetutils@gnu.org; Wed, 01 Feb 2012 10:13:56 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1Rsbsh-0003nk-RF
	for commit-inetutils@gnu.org; Wed, 01 Feb 2012 15:13:56 +0000
Date: Wed, 01 Feb 2012 15:13:55 +0000
Message-Id: <E1Rsbsh-0003nk-RF@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-19-gd170fb9
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 35b13aed4d8677c1f83c6ab3234ed5b5b2b8caa6
X-Git-Newrev: d170fb9449fc301b3d925a8d4054886452393c33
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Feb 2012 15:14:07 -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  d170fb9449fc301b3d925a8d4054886452393c33 (commit)
      from  35b13aed4d8677c1f83c6ab3234ed5b5b2b8caa6 (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=d170fb9449fc301b3d925a8d4054886452393c33


commit d170fb9449fc301b3d925a8d4054886452393c33
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed Feb 1 15:51:53 2012 +0100

    Remove unneeded library dependencies.
    
    The executables in `src/' have non-uniform dependencies.

diff --git a/ChangeLog b/ChangeLog
index a034063..e939075 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-01  Guillem Jover  <guillem@hadrons.org>
+
+	* src/Makefile.am (LDADD): Set to minimal, common value.
+	(rcp_LDADD, rexecd_LDADD, rlogin_LDADD, rlogind_LDADD, rsh_LDADD)
+	(rshd_LDADD, traceroute_LDADD, uucpd_LDADD): New variables.
+
 2012-02-01  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* configure.ac: Check for typedefs `Schedule' and `Session_Key'
diff --git a/src/Makefile.am b/src/Makefile.am
index 3df5284..a85fff4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -21,6 +21,8 @@
 inetdaemondir = @inetdaemondir@
 
 # Initialise variables.
+LDADD = $(iu_LIBRARIES) $(LIBUTIL)
+
 inetdaemon_PROGRAMS =
 bin_PROGRAMS =
 EXTRA_PROGRAMS =
@@ -36,6 +38,7 @@ EXTRA_PROGRAMS += logger
 
 bin_PROGRAMS += @rcp_BUILD@
 rcp_SOURCES = rcp.c
+rcp_LDADD = $(LDADD) $(LIBAUTH)
 EXTRA_PROGRAMS += rcp
 
 bin_PROGRAMS += @rexec_BUILD@
@@ -44,10 +47,12 @@ EXTRA_PROGRAMS += rexec
 
 bin_PROGRAMS += @rlogin_BUILD@
 rlogin_SOURCES = rlogin.c
+rlogin_LDADD = $(LDADD) $(LIBAUTH)
 EXTRA_PROGRAMS += rlogin
 
 bin_PROGRAMS += @rsh_BUILD@
 rsh_SOURCES = rsh.c
+rsh_LDADD = $(LDADD) $(LIBAUTH)
 EXTRA_PROGRAMS += rsh
 
 bin_PROGRAMS += @tftp_BUILD@
@@ -56,6 +61,7 @@ EXTRA_PROGRAMS += tftp
 
 bin_PROGRAMS += @traceroute_BUILD@
 traceroute_SOURCES = traceroute.c
+traceroute_LDADD = $(top_builddir)/libicmp/libicmp.a $(LDADD)
 EXTRA_PROGRAMS += traceroute
 
 inetdaemon_PROGRAMS += @inetd_BUILD@
@@ -64,14 +70,17 @@ EXTRA_PROGRAMS += inetd
 
 inetdaemon_PROGRAMS += @rexecd_BUILD@
 rexecd_SOURCES = rexecd.c
+rexecd_LDADD = $(LDADD) $(LIBCRYPT)
 EXTRA_PROGRAMS += rexecd
 
 inetdaemon_PROGRAMS += @rlogind_BUILD@
 rlogind_SOURCES = rlogind.c
+rlogind_LDADD = $(LDADD) $(LIBAUTH)
 EXTRA_PROGRAMS += rlogind
 
 inetdaemon_PROGRAMS += @rshd_BUILD@
 rshd_SOURCES = rshd.c
+rshd_LDADD = $(LDADD) $(LIBAUTH)
 EXTRA_PROGRAMS += rshd
 
 inetdaemon_PROGRAMS += @syslogd_BUILD@
@@ -84,12 +93,11 @@ EXTRA_PROGRAMS += tftpd
 
 inetdaemon_PROGRAMS += @uucpd_BUILD@
 uucpd_SOURCES = uucpd.c
+uucpd_LDADD = $(LDADD) $(LIBCRYPT)
 EXTRA_PROGRAMS += uucpd
 
 INCLUDES = $(iu_INCLUDES) -I$(top_srcdir)/libicmp
 
-LDADD = $(iu_LIBRARIES) $(top_builddir)/libicmp/libicmp.a $(LIBAUTH) $(LIBCRYPT) $(LIBUTIL)
-
 AM_CPPFLAGS = $(PATHDEF_BSHELL) $(PATHDEF_CONSOLE) $(PATHDEF_CP) $(PATHDEF_DEFPATH) $(PATHDEF_DEV) $(PATHDEF_INETDCONF) $(PATHDEF_INETDDIR) $(PATHDEF_INETDPID) $(PATHDEF_KLOG) $(PATHDEF_LOG) $(PATHDEF_LOGCONF) $(PATHDEF_LOGIN) $(PATHDEF_LOGPID) $(PATHDEF_NOLOGIN) $(PATHDEF_RLOGIN) $(PATHDEF_RSH) $(PATHDEF_TTY) $(PATHDEF_UTMP) $(PATHDEF_UUCICO)
 
 SUIDMODE = -o root -m 4775

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

Summary of changes:
 ChangeLog       |    6 ++++++
 src/Makefile.am |   12 ++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed Feb 01 14:01:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RsfQm-0005zs-4L
	for mharc-commit-inetutils@gnu.org; Wed, 01 Feb 2012 14:01:20 -0500
Received: from eggs.gnu.org ([140.186.70.92]:59944)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RsfQj-0005zi-Nn
	for commit-inetutils@gnu.org; Wed, 01 Feb 2012 14:01:18 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RsfQe-0004lE-3j
	for commit-inetutils@gnu.org; Wed, 01 Feb 2012 14:01:17 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:38415)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RsfQd-0004lA-Vq
	for commit-inetutils@gnu.org; Wed, 01 Feb 2012 14:01:12 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RsfQV-0007Sp-5m
	for commit-inetutils@gnu.org; Wed, 01 Feb 2012 19:01:05 +0000
Date: Wed, 01 Feb 2012 19:01:03 +0000
Message-Id: <E1RsfQV-0007Sp-5m@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-20-g304585e
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: d170fb9449fc301b3d925a8d4054886452393c33
X-Git-Newrev: 304585e609b5caa16bb9216a0645cb697d3a3388
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Feb 2012 19:01:19 -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  304585e609b5caa16bb9216a0645cb697d3a3388 (commit)
      from  d170fb9449fc301b3d925a8d4054886452393c33 (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=304585e609b5caa16bb9216a0645cb697d3a3388


commit 304585e609b5caa16bb9216a0645cb697d3a3388
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed Feb 1 19:58:27 2012 +0100

    Restart failed TFTP test.

diff --git a/ChangeLog b/ChangeLog
index e939075..72e0c57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-02-01  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* tests/syslogd.sh (do_inet_socket): New variable.
+	<port is busy>: Continue, but disable INET test.  Issue a notice.
+	* tests/tftp.sh (write_conf): New function.
+	<failed inetd launch>: Make a second start attempt, with new port.
+
 2012-02-01  Guillem Jover  <guillem@hadrons.org>
 
 	* src/Makefile.am (LDADD): Set to minimal, common value.
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index ebd584d..f9335c5 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -53,6 +53,7 @@ PWD="${PWD:-`pwd`}"
 do_cleandir=false
 do_socket_length=true
 do_unix_socket=true
+do_inet_socket=true
 
 # The UNIX socket name length is preset by the system
 # and is also system dependent.
@@ -250,6 +251,7 @@ if [ `id -u` -ne 0 ]; then
 	WARNING!!  Disabling INET server tests since you seem
 	to be underprivileged.
 	EOT
+    do_inet_socket=false
 else
     # Is the INET port already in use? If so,
     # skip the test in its entirety.
@@ -266,7 +268,7 @@ else
 		The INET port $PORT/$PROTO is already in use.
 		No reliable test of INET socket is possible.
 	EOT
-	exit 77
+	do_inet_socket=false
     fi
 fi
 
@@ -307,8 +309,8 @@ if $do_socket_length; then
     IU_OPTIONS="$IU_OPTIONS -a '$IU_LONG_SOCKET' -a '$IU_EXCESSIVE_SOCKET'"
 fi
 
-## Enable INET service when running as root.
-if [ `id -u` -eq 0 ]; then
+## Enable INET service when possible.
+if $do_inet_socket; then
     IU_OPTIONS="$IU_OPTIONS --ipany --inet --hop"
 fi
 ## Bring in additional options from command line.
@@ -369,7 +371,7 @@ if $do_socket_length; then
 	-t "$TAG" "Sending via long socket name. (pid $$)"
 fi
 
-if [ `id -u` -eq 0 ]; then
+if $do_inet_socket; then
     TESTCASES=`expr $TESTCASES + 2`
     $LOGGER -4 -h "$TARGET" -p user.info -t "$TAG" \
 	"Sending IPv4 message. (pid $$)"
@@ -394,6 +396,9 @@ fi
 
 echo "Registered $SUCCESSES successes out of $TESTCASES."
 
+# Report incomplete test setup.
+$do_inet_socket || echo 'NOTICE: No INET socket tests were performed.' >&2
+
 if [ "$SUCCESSES" -eq "$TESTCASES" ]; then
     echo "Successful testing."
     EXITCODE=0
diff --git a/tests/tftp.sh b/tests/tftp.sh
index af6e8e1..d5273d8 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -130,14 +130,18 @@ fi
 # name because `inetd' chdirs to `/' in daemon mode; ditto for
 # $INETD_CONF.  Thus the dependency on file locations will be
 # identical in daemon-mode and in debug-mode.
-cat > "$INETD_CONF" <<EOF
-$PORT dgram ${PROTO}4 wait $USER $TFTPD   tftpd -l $TMPDIR/tftp-test
-$PORT dgram ${PROTO}6 wait $USER $TFTPD   tftpd -l $TMPDIR/tftp-test
-EOF
+write_conf () {
+    cat > "$INETD_CONF" <<-EOF
+	$PORT dgram ${PROTO}4 wait $USER $TFTPD   tftpd -l $TMPDIR/tftp-test
+	$PORT dgram ${PROTO}6 wait $USER $TFTPD   tftpd -l $TMPDIR/tftp-test
+	EOF
+}
+
+write_conf
 
 # Launch `inetd', assuming it's reachable at all $ADDRESSES.
 $INETD ${VERBOSE+-d} -p"$INETD_PID" "$INETD_CONF" &
-sleep 1
+sleep 2
 inetd_pid="`cat $INETD_PID`"
 
 test -z "$VERBOSE" || echo "Launched Inetd as process $inetd_pid." >&2
@@ -150,8 +154,26 @@ locate_port $PROTO $PORT
 if test $? -ne 0; then
     # No it did not.
     ps "$inetd_pid" >/dev/null 2>&1 && kill "$inetd_pid" 2>/dev/null
-    echo "Failed in starting correct Inetd instance." >&2
-    exit 1
+    echo 'First attempt at starting Inetd has failed.' >&2
+    echo 'A new attempt will follow after some delay.' >&2
+    echo 'Increasing verbosity for better backtrace.' >&2
+    sleep 7
+
+    # Select a new port, with offset and some randomness.
+    PORT=`expr $PORT + 137 + \( ${RANDOM:-$$} % 517 \)`
+    write_conf
+
+    $INETD -d -p"$INETD_PID" "$INETD_CONF" &
+    sleep 2
+    inetd_pid="`cat $INETD_PID`"
+    echo "Launched Inetd as process $inetd_pid." >&2
+
+    if locate_port $PROTO $PORT; then
+	: # Successful this time.
+    else
+	echo "Failed again at starting correct Inetd instance." >&2
+	exit 1
+    fi
 fi
 
 if [ -r /dev/urandom ]; then

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

Summary of changes:
 ChangeLog        |    7 +++++++
 tests/syslogd.sh |   13 +++++++++----
 tests/tftp.sh    |   36 +++++++++++++++++++++++++++++-------
 3 files changed, 45 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Thu Feb 02 06:39:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rsv18-0004OK-Cq
	for mharc-commit-inetutils@gnu.org; Thu, 02 Feb 2012 06:39:54 -0500
Received: from eggs.gnu.org ([140.186.70.92]:36761)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rsv15-0004Nm-UM
	for commit-inetutils@gnu.org; Thu, 02 Feb 2012 06:39:53 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rsv0y-0004GW-2M
	for commit-inetutils@gnu.org; Thu, 02 Feb 2012 06:39:51 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:48230)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rsv0x-0004GS-Vm
	for commit-inetutils@gnu.org; Thu, 02 Feb 2012 06:39:44 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1Rsv0q-0006D0-No
	for commit-inetutils@gnu.org; Thu, 02 Feb 2012 11:39:42 +0000
Date: Thu, 02 Feb 2012 11:39:41 +0000
Message-Id: <E1Rsv0q-0006D0-No@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-21-g5797e60
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 304585e609b5caa16bb9216a0645cb697d3a3388
X-Git-Newrev: 5797e60bbe497ace08232d4e76801b0a69b717c3
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 02 Feb 2012 11:39:53 -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  5797e60bbe497ace08232d4e76801b0a69b717c3 (commit)
      from  304585e609b5caa16bb9216a0645cb697d3a3388 (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=5797e60bbe497ace08232d4e76801b0a69b717c3


commit 5797e60bbe497ace08232d4e76801b0a69b717c3
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Thu Feb 2 12:37:44 2012 +0100

    Missing prototypes with libshishi.

diff --git a/ChangeLog b/ChangeLog
index 72e0c57..fd564cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+2012-02-02  Mats Erik Andersson <gnu@gisladisker.se>
+
+	Full set of prototypes for Shishi enabled builds.
+	* libinetutils/shishi_def.h [SHISHI] (krcmd, krcmd_mutual):
+	New prototypes.
+	* libtelnet/auth-proto.h [AUTHENTICATION] (auth_name): Likewise.
+	* libtelnet/auth.c [AUTHENTICATION] (auth_onoff): Likewise.
+	* libtelnet/enc-proto.h [ENCRYPTION] (EncryptStart, EncryptStartInput)
+	(EncryptStartOutput, EncryptStatus, EncryptStop, EncryptStopInput)
+	(EncryptStopOutput, EncryptType, encrypt_start, encrypt_end)
+	(encrypt_request_start, encrypt_request_end, encrypt_support)
+	(encrypt_dec_keyid, encrypt_enc_keyid): Likewise.
+	* libtelnet/genget.h (Ambiguous): Likewise.
+	* libtelnet/misc-proto.h (auth_encrypt_user): Likewise.
+	* src/rlogind.c [SHISHI] (do_shishi_login): New prototype.
+	* telnet/commands.c [ENCRYPTION]: Include <libtelnet/encrypt.h>.
+	[AUTHENTICATION || ENCRYPTION]: Include <libtelnet/misc.h>.
+	* telnet/main.c [AUTHENTICATION]: Include <libtelnet/auth.h>.
+	[ENCRYPTION]: Include <libtelnet/encrypt.h>.
+	* telnet/telnet.c [AUTHENTICATION]: Include <libtelnet/auth.h>.
+	[ENCRYPTION]: Include <libtelnet/encrypt.h>.
+	[AUTHENTICATION || ENCRYPTION]: Include <libtelnet/misc.h>.
+	* telnet/terminal.c [ENCRYPTION]: Include <libtelnet/encrypt.h>.
+	* telnetd/telnetd.c [AUTHENTICATION || ENCRYPTION]: Include
+	<libtelnet/misc.h>.
+
 2012-02-01  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* tests/syslogd.sh (do_inet_socket): New variable.
diff --git a/libinetutils/shishi_def.h b/libinetutils/shishi_def.h
index fe885c4..8a43b10 100644
--- a/libinetutils/shishi_def.h
+++ b/libinetutils/shishi_def.h
@@ -68,4 +68,11 @@ extern int readenc (Shishi * h, int sock, char *buf, int *len,
 extern int writeenc (Shishi * h, int sock, char *buf, int wlen, int *len,
 		     shishi_ivector * iv, Shishi_key * enckey, int proto);
 
+extern int krcmd (Shishi ** h, char **ahost, unsigned short rport,
+		  char **remuser, char *cmd, int *fd2p, char *realm);
+
+extern int krcmd_mutual (Shishi ** h, char **ahost, unsigned short rport,
+			 char **remuser, char *cmd, int *fd2p, char *realm,
+			 Shishi_key ** key);
+
 #endif
diff --git a/libtelnet/auth-proto.h b/libtelnet/auth-proto.h
index f155d36..7d21375 100644
--- a/libtelnet/auth-proto.h
+++ b/libtelnet/auth-proto.h
@@ -79,6 +79,7 @@ void auth_is (unsigned char *, int);
 void auth_reply (unsigned char *, int);
 void auth_finished (TN_Authenticator *, int);
 int auth_wait (char *);
+void auth_name (unsigned char *, int);
 void auth_disable_name (char *);
 void auth_printsub (unsigned char *, int, unsigned char *, int);
 int auth_sendname (unsigned char *, int);
diff --git a/libtelnet/auth.c b/libtelnet/auth.c
index 9f3f24f..886b0ef 100644
--- a/libtelnet/auth.c
+++ b/libtelnet/auth.c
@@ -307,6 +307,8 @@ getauthmask (char *type, int *maskp)
   return (0);
 }
 
+int auth_onoff (char *, int);
+
 int
 auth_enable (char *type)
 {
diff --git a/libtelnet/enc-proto.h b/libtelnet/enc-proto.h
index d0c5f1b..8632733 100644
--- a/libtelnet/enc-proto.h
+++ b/libtelnet/enc-proto.h
@@ -68,6 +68,15 @@
  */
 
 #ifdef	ENCRYPTION
+int EncryptStart (char *);
+int EncryptStartInput (void);
+int EncryptStartOutput (void);
+int EncryptStatus (void);
+int EncryptStop (char *);
+int EncryptStopInput (void);
+int EncryptStopOutput (void);
+int EncryptType (char *, char *);
+
 void encrypt_init (char *, int);
 Encryptions *findencryption (int);
 void encrypt_send_supprt (void);
@@ -75,16 +84,23 @@ void encrypt_auto (int);
 void decrypt_auto (int);
 void encrypt_is (unsigned char *, int);
 void encrypt_reply (unsigned char *, int);
+void encrypt_start (unsigned char *, int);
 void encrypt_start_input (int);
 void encrypt_session_key (Session_Key *, int);
+void encrypt_end (void);
 void encrypt_end_input (void);
 void encrypt_start_output (int);
 void encrypt_end_output (void);
+void encrypt_request_start (unsigned char *, int);
 void encrypt_send_request_start (void);
+void encrypt_request_end (void);
 void encrypt_send_request_end (void);
 void encrypt_send_end (void);
 void encrypt_wait (void);
+void encrypt_support (unsigned char *, int);
 void encrypt_send_support (void);
+void encrypt_dec_keyid (unsigned char *, int);
+void encrypt_enc_keyid (unsigned char *, int);
 void encrypt_send_keyid (int, unsigned char *, int, int);
 void encrypt_printsub (unsigned char *, int, unsigned char *, int);
 int net_write (unsigned char *, int);
diff --git a/libtelnet/genget.h b/libtelnet/genget.h
index 7321de3..0b56f7d 100644
--- a/libtelnet/genget.h
+++ b/libtelnet/genget.h
@@ -18,3 +18,4 @@
 
 int isprefix (register char *s1, register char *s2);
 char **genget (char *name, char **table, int stlen);
+int Ambiguous (char *s);
diff --git a/libtelnet/misc-proto.h b/libtelnet/misc-proto.h
index 96d8d22..009d9b2 100644
--- a/libtelnet/misc-proto.h
+++ b/libtelnet/misc-proto.h
@@ -71,6 +71,7 @@
 # define __MISC_PROTO__
 
 void auth_encrypt_init (char *, char *, char *, int);
+void auth_encrypt_user (char *);
 void auth_encrypt_connect (int);
 void printd (unsigned char *, int);
 
diff --git a/src/rlogind.c b/src/rlogind.c
index 9888940..663da5b 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -211,6 +211,10 @@ void fatal (int f, const char *msg, int syserr);
 int in_local_domain (char *hostname);
 char *topdomain (char *name, int max_dots);
 
+#ifdef SHISHI
+int do_shishi_login (int infd, struct auth_data *ad, const char **err_msg);
+#endif
+
 void
 rlogind_sigchld (int sig)
 {
diff --git a/telnet/commands.c b/telnet/commands.c
index 7c2a7f4..aca45ca 100644
--- a/telnet/commands.c
+++ b/telnet/commands.c
@@ -86,6 +86,13 @@
 #include "xalloc.h"
 #include "xvasprintf.h"
 
+#ifdef	ENCRYPTION
+# include <libtelnet/encrypt.h>
+#endif
+#if defined AUTHENTICATION || defined ENCRYPTION
+# include <libtelnet/misc.h>
+#endif
+
 #if !defined CRAY && !defined sysV88
 # ifdef HAVE_NETINET_IN_SYSTM_H
 #  include <netinet/in_systm.h>
diff --git a/telnet/main.c b/telnet/main.c
index 7ca93a7..a1a35c9 100644
--- a/telnet/main.c
+++ b/telnet/main.c
@@ -62,6 +62,13 @@
 #include <argp.h>
 #include <libinetutils.h>
 
+#ifdef	AUTHENTICATION
+# include <libtelnet/auth.h>
+#endif
+#ifdef	ENCRYPTION
+# include <libtelnet/encrypt.h>
+#endif
+
 /* These values need to be the same as defined in libtelnet/kerberos5.c */
 /* Either define them in both places, or put in some common header file. */
 #define OPTS_FORWARD_CREDS           0x00000002
diff --git a/telnet/telnet.c b/telnet/telnet.c
index 768e316..70f24ca 100644
--- a/telnet/telnet.c
+++ b/telnet/telnet.c
@@ -79,6 +79,16 @@
 # include <curses.h>
 # include <term.h>
 #endif
+
+#ifdef AUTHENTICATION
+# include <libtelnet/auth.h>
+#endif
+#ifdef ENCRYPTION
+# include <libtelnet/encrypt.h>
+#endif
+#if defined AUTHENTICATION || defined ENCRYPTION
+# include <libtelnet/misc.h>
+#endif
 
 
 #define strip(x) ((my_want_state_is_wont(TELOPT_BINARY)) ? ((x)&0x7f) : (x))
diff --git a/telnet/terminal.c b/telnet/terminal.c
index d47bffa..b0e5a1e 100644
--- a/telnet/terminal.c
+++ b/telnet/terminal.c
@@ -59,6 +59,10 @@
 #include "externs.h"
 #include "types.h"
 
+#ifdef  ENCRYPTION
+# include <libtelnet/encrypt.h>
+#endif
+
 Ring ttyoring, ttyiring;
 unsigned char ttyobuf[2 * BUFSIZ], ttyibuf[BUFSIZ];
 
diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c
index 22f1a96..d844d37 100644
--- a/telnetd/telnetd.c
+++ b/telnetd/telnetd.c
@@ -28,6 +28,10 @@
 #include <error.h>
 #include <libinetutils.h>
 
+#if defined AUTHENTICATION || defined ENCRYPTION
+# include <libtelnet/misc.h>
+#endif
+
 static void parse_authmode (char *str);
 static void parse_linemode (char *str);
 static void parse_debug_level (char *str);

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

Summary of changes:
 ChangeLog                 |   26 ++++++++++++++++++++++++++
 libinetutils/shishi_def.h |    7 +++++++
 libtelnet/auth-proto.h    |    1 +
 libtelnet/auth.c          |    2 ++
 libtelnet/enc-proto.h     |   16 ++++++++++++++++
 libtelnet/genget.h        |    1 +
 libtelnet/misc-proto.h    |    1 +
 src/rlogind.c             |    4 ++++
 telnet/commands.c         |    7 +++++++
 telnet/main.c             |    7 +++++++
 telnet/telnet.c           |   10 ++++++++++
 telnet/terminal.c         |    4 ++++
 telnetd/telnetd.c         |    4 ++++
 13 files changed, 90 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Thu Feb 02 18:43:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rt6JD-0003vA-RE
	for mharc-commit-inetutils@gnu.org; Thu, 02 Feb 2012 18:43:19 -0500
Received: from eggs.gnu.org ([140.186.70.92]:58538)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rt6JA-0003ud-6j
	for commit-inetutils@gnu.org; Thu, 02 Feb 2012 18:43:18 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rt6J8-0004SG-7j
	for commit-inetutils@gnu.org; Thu, 02 Feb 2012 18:43:16 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:45986)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rt6J8-0004SB-2E
	for commit-inetutils@gnu.org; Thu, 02 Feb 2012 18:43:14 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1Rt6J7-0004cC-33
	for commit-inetutils@gnu.org; Thu, 02 Feb 2012 23:43:13 +0000
Date: Thu, 02 Feb 2012 23:43:13 +0000
Message-Id: <E1Rt6J7-0004cC-33@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-22-g3ce1d4d
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5797e60bbe497ace08232d4e76801b0a69b717c3
X-Git-Newrev: 3ce1d4da27e6986ac3428f6057630fb6801d6893
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 02 Feb 2012 23:43:18 -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  3ce1d4da27e6986ac3428f6057630fb6801d6893 (commit)
      from  5797e60bbe497ace08232d4e76801b0a69b717c3 (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=3ce1d4da27e6986ac3428f6057630fb6801d6893


commit 3ce1d4da27e6986ac3428f6057630fb6801d6893
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Feb 3 00:41:03 2012 +0100

    Tighten test diagnosis for FTP and TFTP.

diff --git a/ChangeLog b/ChangeLog
index fd564cd..8247445 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2012-02-03  Mats Erik Andersson <gnu@gisladisker.se>
+
+	Attempt full detection of any intermediary step failing.
+	* tests/ftp-localhost.sh: Test presence of grep(1), netstat(1).
+	Capture failing mktemp(1).
+	(posttesting): Verify non-empty TMPDIR and it being a directory.
+	<inetd.conf, .netrc>: Test successful write to these files.
+	<starting INETD>: Test successful start as well as presence of
+	`$TMPDIR/inetd.pid' afterwards.
+	* tests/tftp.sh: Test presence of grep(1) and netstat(1).
+	Capture failing mktemp(1).
+	(posttesting): Verify non-empty TMPDIR and it being a directory.
+	<write_conf>: Test successful execution.
+	(REDIRECT): New variable.
+	<INETD invokation>: Always use debug-mode `-d', but suppress STDERR
+	in non-verbose execution mode.  An eval call implements this during
+	the first attempt.  Test the validity of `inetd_pid' afterwards.
+	<restart of INETD>: Use `kill -9' and delete the file INETD_PID.
+	<creation of test files>: Check validity of TMPDIR and test for
+	failure when creating the directory `$TMPDIR/tftp-test'.
+
 2012-02-02  Mats Erik Andersson <gnu@gisladisker.se>
 
 	Full set of prototypes for Shishi enabled builds.
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index 194a411..cb7a1df 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -59,6 +59,18 @@ elif [ ! -x $INETD ]; then
     exit 77
 fi
 
+which grep >/dev/null 2>&1 ||
+    {
+	echo 'No available grep(1), used for diagnosis.  Skipping test.' >&2
+	exit 77
+    }
+
+which netstat >/dev/null 2>&1 ||
+    {
+	echo 'No available netstat(1), used for diagnosis.  Skipping test.' >&2
+	exit 77
+    }
+
 if [ $VERBOSE ]; then
     set -x
     $FTP --version | head -1
@@ -101,12 +113,17 @@ fi
 # Note that inetd changes directory to / when --debug is not given so
 # all paths must be absolute for things to work.
 
-TMPDIR=`mktemp -d $PWD/tmp.XXXXXXXXXX`
+TMPDIR=`mktemp -d $PWD/tmp.XXXXXXXXXX` ||
+    {
+	echo 'Failed at creating test directory.  Aborting.' >&2
+	exit 1
+    }
 
 posttesting () {
-    test -f "$TMPDIR/inetd.pid" && test -r "$TMPDIR/inetd.pid" \
+    test -n "$TMPDIR" && test -f "$TMPDIR/inetd.pid" \
+	&& test -r "$TMPDIR/inetd.pid" \
 	&& kill -9 "`cat $TMPDIR/inetd.pid`"
-    rm -rf "$TMPDIR"
+    test -n "$TMPDIR" && test -d "$TMPDIR" && rm -rf "$TMPDIR"
 }
 
 trap posttesting 0 1 2 3 15
@@ -148,19 +165,44 @@ $PORT stream tcp4 nowait $USER $PWD/$FTPD ftpd -A -l
 $PORT stream tcp6 nowait $USER $PWD/$FTPD ftpd -A -l
 EOT
 
+if test $? -ne 0; then
+    echo 'Failed at writing configuration for Inetd.  Skipping test.' >&2
+    exit 77
+fi
+
 cat <<EOT > "$TMPDIR/.netrc"
 machine $TARGET login $FTPUSER password foobar
 machine $TARGET6 login $FTPUSER password foobar
 machine $TARGET46 login $FTPUSER password foobar
 EOT
 
-chmod 600 $TMPDIR/.netrc
+if test $? -ne 0; then
+    echo 'Failed at writing access file ".netrc".  Skipping test.' >&2
+    exit 77
+fi
+
+chmod 600 "$TMPDIR/.netrc"
 
-$INETD --pidfile="$TMPDIR/inetd.pid" "$TMPDIR/inetd.conf"
+$INETD --pidfile="$TMPDIR/inetd.pid" "$TMPDIR/inetd.conf" ||
+    {
+	echo 'Not able to start Inetd.  Skipping test.' >&2
+	exit 1
+    }
 
 # Wait for inetd to write pid and open socket
 sleep 2
 
+
+test -r "$TMPDIR/inetd.pid" ||
+    {
+	cat <<-EOT >&2
+		Inetd could not write a PID-file, but did claim a start.
+		This is a serious problem.  Doing an emergency abort,
+		without possibility of killing the Inetd-process.
+	EOT
+	exit 1
+    }
+
 # Test evaluation helper
 #
 # test_report  errno output_file hint_msg
@@ -170,7 +212,7 @@ test_report () {
 
     if [ $1 != 0 ]; then
 	echo "Running '$FTP' failed with errno $1." >&2
-	exit 77
+	exit 1
     fi
 
     # Did we get access?
diff --git a/tests/tftp.sh b/tests/tftp.sh
index d5273d8..b787021 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -46,22 +46,43 @@ elif [ ! -x $IFCONFIG_SIMPLE ]; then	# Remove options
     exit 77
 fi
 
+# Check that netstat works before proceeding.
+netstat -na > /dev/null 2>&1
+if [ $? -ne 0 ]; then
+    echo "netstat: command failed to execute successfully" >&2
+    exit 77
+fi
+
+# And grep!
+which grep > /dev/null 2>&1 ||
+    {
+	echo 'grep(1) is not available.  Skipping test.' >&2
+	exit 77
+    }
+
 AF=${AF:-inet}
 PROTO=${PROTO:-udp}
 USER=`id -u -n`
 
-# Random base diractory at testing time.
-TMPDIR=`mktemp -d $PWD/tmp.XXXXXXXXXX`
+# Random base directory at testing time.
+TMPDIR=`mktemp -d $PWD/tmp.XXXXXXXXXX` ||
+    {
+	echo 'Failed at creating test directory.  Aborting.' >&2
+	exit 1
+    }
+
 INETD_CONF="$TMPDIR/inetd.conf.tmp"
 INETD_PID="$TMPDIR/inetd.pid.$$"
 
 posttesting () {
-    if test -f "$INETD_PID" && test -r "$INETD_PID" \
+    if test -n "$TMPDIR" && test -f "$INETD_PID" \
+	&& test -r "$INETD_PID" \
 	&& ps "`cat $INETD_PID`" >/dev/null 2>&1
     then
 	kill -9 "`cat $INETD_PID`" 2>/dev/null
     fi
-    rm -rf "$TMPDIR" $FILELIST
+    test -n "$TMPDIR" && test -d "$TMPDIR" \
+	&& rm -rf "$TMPDIR" $FILELIST
 }
 
 trap posttesting EXIT HUP INT QUIT TERM
@@ -79,13 +100,6 @@ if [ "$ADDRESSES" = "sense" ]; then
 	-e "s/^.*$AF \([:.0-9]\{1,\}\) .*$/\1/g"`"
 fi
 
-# Check that netstat works before proceeding.
-netstat -na > /dev/null
-if [ ! $? -eq 0 ]; then
-    echo "netstat: command failed to execute successfully" >&2
-    exit 77
-fi
-
 # Work around the peculiar output of netstat(1m,solaris).
 #
 # locate_port proto port
@@ -137,12 +151,32 @@ write_conf () {
 	EOF
 }
 
-write_conf
+write_conf ||
+    {
+	echo 'Could not create configuration file for Inetd.  Aborting.' >&2
+	exit 1
+    }
 
 # Launch `inetd', assuming it's reachable at all $ADDRESSES.
-$INETD ${VERBOSE+-d} -p"$INETD_PID" "$INETD_CONF" &
+# Must use '-d' consistently to prevent daemonizing, but we
+# would like to suppress the verbose output.  The variable
+# REDIRECT is set to '2>/dev/null' in non-verbose mode.
+#
+test -n "${VERBOSE+yes}" || REDIRECT='2>/dev/null'
+
+eval "$INETD -d -p'$INETD_PID' '$INETD_CONF' $REDIRECT &"
+
 sleep 2
-inetd_pid="`cat $INETD_PID`"
+
+inetd_pid="`cat $INETD_PID 2>/dev/null`" ||
+    {
+	cat <<-EOT >&2
+		Inetd did not create a PID-file.  Aborting test,
+		but loosing control whether an Inetd process is
+		still around.
+	EOT
+	exit 1
+    }
 
 test -z "$VERBOSE" || echo "Launched Inetd as process $inetd_pid." >&2
 
@@ -153,7 +187,9 @@ sleep 1
 locate_port $PROTO $PORT
 if test $? -ne 0; then
     # No it did not.
-    ps "$inetd_pid" >/dev/null 2>&1 && kill "$inetd_pid" 2>/dev/null
+    ps "$inetd_pid" >/dev/null 2>&1 && kill -9 "$inetd_pid" 2>/dev/null
+    rm -f "$INETD_PID"
+
     echo 'First attempt at starting Inetd has failed.' >&2
     echo 'A new attempt will follow after some delay.' >&2
     echo 'Increasing verbosity for better backtrace.' >&2
@@ -161,11 +197,24 @@ if test $? -ne 0; then
 
     # Select a new port, with offset and some randomness.
     PORT=`expr $PORT + 137 + \( ${RANDOM:-$$} % 517 \)`
-    write_conf
+    write_conf ||
+	{
+	    echo 'Could not create configuration file for Inetd.  Aborting.' >&2
+	    exit 1
+	}
 
     $INETD -d -p"$INETD_PID" "$INETD_CONF" &
     sleep 2
-    inetd_pid="`cat $INETD_PID`"
+    inetd_pid="`cat $INETD_PID 2>/dev/null`" ||
+	{
+	    cat <<-EOT >&2
+		Inetd did not create a PID-file.  Aborting test,
+		but loosing control whether an Inetd process is
+		still around.
+		EOT
+	    exit 1
+	}
+
     echo "Launched Inetd as process $inetd_pid." >&2
 
     if locate_port $PROTO $PORT; then
@@ -182,8 +231,12 @@ else
     input="/dev/zero"
 fi
 
-rm -fr $TMPDIR/tftp-test tftp-test-file*
-mkdir -p $TMPDIR/tftp-test
+test -d "$TMPDIR" && rm -fr "$TMPDIR/tftp-test" tftp-test-file*
+test -d "$TMPDIR" && mkdir -p "$TMPDIR/tftp-test" \
+    || {
+	echo 'Failed at creating directory for master files.  Aborting.' >&2
+	exit 1
+    }
 
 # It is important to test data of differing sizes.
 #
@@ -193,8 +246,7 @@ mkdir -p $TMPDIR/tftp-test
 
 FILEDATA="file-small 320 1
 file-medium 320 2
-tftp-test-file 1024 170
-"
+tftp-test-file 1024 170"
 
 echo "$FILEDATA" |
 while read name bsize count; do
@@ -212,7 +264,7 @@ RESULT=0
 echo "Looking into '`echo $ADDRESSES | tr "\n" ' '`'."
 
 for addr in $ADDRESSES; do
-    echo "trying with address \`$addr'..." >&2
+    echo "trying address '$addr'..." >&2
 
     for name in $FILELIST; do
 	EFFORTS=`expr $EFFORTS + 1`

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

Summary of changes:
 ChangeLog              |   21 ++++++++++
 tests/ftp-localhost.sh |   54 ++++++++++++++++++++++++---
 tests/tftp.sh          |   96 +++++++++++++++++++++++++++++++++++++-----------
 3 files changed, 143 insertions(+), 28 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Thu Feb 02 20:15:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rt7k3-0000Ru-9W
	for mharc-commit-inetutils@gnu.org; Thu, 02 Feb 2012 20:15:07 -0500
Received: from eggs.gnu.org ([140.186.70.92]:59820)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rt7k0-0000Q3-7e
	for commit-inetutils@gnu.org; Thu, 02 Feb 2012 20:15:05 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rt7jx-0003CT-MP
	for commit-inetutils@gnu.org; Thu, 02 Feb 2012 20:15:04 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:33922)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rt7jx-0003C4-JY
	for commit-inetutils@gnu.org; Thu, 02 Feb 2012 20:15:01 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1Rt7jw-0001n3-MD
	for commit-inetutils@gnu.org; Fri, 03 Feb 2012 01:15:01 +0000
Date: Fri, 03 Feb 2012 01:15:00 +0000
Message-Id: <E1Rt7jw-0001n3-MD@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-23-gc4f4c25
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 3ce1d4da27e6986ac3428f6057630fb6801d6893
X-Git-Newrev: c4f4c250a60fd67bd8b16686f531f7b2ad6e3d4f
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 03 Feb 2012 01:15: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  c4f4c250a60fd67bd8b16686f531f7b2ad6e3d4f (commit)
      from  3ce1d4da27e6986ac3428f6057630fb6801d6893 (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=c4f4c250a60fd67bd8b16686f531f7b2ad6e3d4f


commit c4f4c250a60fd67bd8b16686f531f7b2ad6e3d4f
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Feb 3 02:12:33 2012 +0100

    False negatives in test evaluations.

diff --git a/ChangeLog b/ChangeLog
index 8247445..49f5020 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2012-02-03  Mats Erik Andersson <gnu@gisladisker.se>
 
+	Do not use which(1) in test scripts.
+	* tests/ftp-localhost.sh: Use a trivial match to detect grep(1)
+	and a trivial invokation of netstat(1).  Use `sysctl -a', while
+	discarding STDOUT and STDERR, to sense for sysctl(8).
+	* tests/tftp.sh: Likewise with grep(1).
+
+2012-02-03  Mats Erik Andersson <gnu@gisladisker.se>
+
 	Attempt full detection of any intermediary step failing.
 	* tests/ftp-localhost.sh: Test presence of grep(1), netstat(1).
 	Capture failing mktemp(1).
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index cb7a1df..f85cd3f 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -59,13 +59,14 @@ elif [ ! -x $INETD ]; then
     exit 77
 fi
 
-which grep >/dev/null 2>&1 ||
-    {
+# Use a trivial test to detect grep(1).
+echo 'Good luck.' | grep 'ood' >/dev/null 2>&1 \
+    || {
 	echo 'No available grep(1), used for diagnosis.  Skipping test.' >&2
 	exit 77
     }
 
-which netstat >/dev/null 2>&1 ||
+netstat -na >/dev/null 2>&1 ||
     {
 	echo 'No available netstat(1), used for diagnosis.  Skipping test.' >&2
 	exit 77
@@ -324,7 +325,7 @@ if $have_address_mapping; then
     :
 else
     # Do we have sysctl(1) available?
-    if which sysctl >/dev/null 2>&1; then
+    if sysctl -a >/dev/null 2>&1; then
 	have_sysctl=true
     else
 	echo "Warning: Not testing IPv4-mapped addresses." >&2
diff --git a/tests/tftp.sh b/tests/tftp.sh
index b787021..40d68a6 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -54,8 +54,8 @@ if [ $? -ne 0 ]; then
 fi
 
 # And grep!
-which grep > /dev/null 2>&1 ||
-    {
+echo 'Good luck.' | grep 'ood' > /dev/null 2>&1 \
+    || {
 	echo 'grep(1) is not available.  Skipping test.' >&2
 	exit 77
     }

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

Summary of changes:
 ChangeLog              |    8 ++++++++
 tests/ftp-localhost.sh |    9 +++++----
 tests/tftp.sh          |    4 ++--
 3 files changed, 15 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Fri Feb 03 06:01:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtGt2-0007Ye-29
	for mharc-commit-inetutils@gnu.org; Fri, 03 Feb 2012 06:01:00 -0500
Received: from eggs.gnu.org ([140.186.70.92]:40468)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RtGst-0007Y2-Qp
	for commit-inetutils@gnu.org; Fri, 03 Feb 2012 06:00:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RtGss-0005kt-8V
	for commit-inetutils@gnu.org; Fri, 03 Feb 2012 06:00:51 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:36715)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RtGss-0005km-08
	for commit-inetutils@gnu.org; Fri, 03 Feb 2012 06:00:50 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RtGsr-0002TQ-Ei
	for commit-inetutils@gnu.org; Fri, 03 Feb 2012 11:00:49 +0000
Date: Fri, 03 Feb 2012 11:00:49 +0000
Message-Id: <E1RtGsr-0002TQ-Ei@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-24-ga6ea201
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: c4f4c250a60fd67bd8b16686f531f7b2ad6e3d4f
X-Git-Newrev: a6ea201f3eed7b199632e44ec7a0b671df4654a9
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 03 Feb 2012 11:00: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  a6ea201f3eed7b199632e44ec7a0b671df4654a9 (commit)
      from  c4f4c250a60fd67bd8b16686f531f7b2ad6e3d4f (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=a6ea201f3eed7b199632e44ec7a0b671df4654a9


commit a6ea201f3eed7b199632e44ec7a0b671df4654a9
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Feb 3 11:58:25 2012 +0100

    Ducument test dependency. (silent change)

diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index f85cd3f..0ac7f26 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -19,6 +19,17 @@
 
 # Written by Simon Josefsson
 
+# Prerequisites:
+#
+#  * Shell: SVR4 Bourne shell, or newer.
+#
+#  * cat(1), chmod(1), head(1), kill(1), rm(1).
+#
+#  * id(1), grep(1), mktemp(1), netstat(8), sed(1), uname(1).
+#
+#  * Detection of sysctl(8) is made.  Availability will
+#    lead to better test coverage.
+
 # FIXME: Better test coverage!
 #
 # Implemented: anonymous-only in inetd-mode.
diff --git a/tests/hostname.sh b/tests/hostname.sh
index cde7e03..ebeea1e 100755
--- a/tests/hostname.sh
+++ b/tests/hostname.sh
@@ -17,6 +17,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see `http://www.gnu.org/licenses/'.
 
+# Prerequisites:
+#
+#  * Shell: SVR3 Bourne shell, or newer.
+#
+#  * id(1), uname(1).
+
 hostname=${hostname:-../src/hostname$EXEEXT}
 
 if [ $VERBOSE ]; then
diff --git a/tests/ping-localhost.sh b/tests/ping-localhost.sh
index 0bda2fc..75c7839 100755
--- a/tests/ping-localhost.sh
+++ b/tests/ping-localhost.sh
@@ -17,6 +17,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see `http://www.gnu.org/licenses/'.
 
+# Prerequisites:
+#
+#  * Shell: SVR3 Bourne shell, or newer.
+#
+#  * id(1).
+
 PING=${PING:-../ping/ping$EXEEXT}
 TARGET=${TARGET:-127.0.0.1}
 
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index f9335c5..89b487b 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -21,6 +21,14 @@
 #
 # Written by Mats Erik Andersson.
 
+# Prerequisites:
+#
+#  * Shell: SVR4 Bourne shell, or newer.
+#
+#  * cat(1), expr(1), head(1), kill(1), pwd(1), rm(1), rmdir(1).
+#
+#  * id(1), grep(1), mktemp(1), netstat(8), ps(1), touch(1), uname(1).
+
 
 # Is usage explanation in demand?
 #
diff --git a/tests/tftp.sh b/tests/tftp.sh
index 40d68a6..a627de0 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -19,6 +19,15 @@
 
 # Run `inetd' with `tftpd' and try to fetch a file from there using `tftp'.
 
+# Prerequisites:
+#
+#  * Shell: SVR4 Bourne shell, or newer.
+#
+#  * cat(1), expr(1), head(1), kill(1), pwd(1), rm(1).
+#
+#  * cmp(1), dd(1), id(1), grep(1), mktemp(1), netstat(8),
+#    ps(1), sed(1), uname(1).
+
 if [ "$VERBOSE" ]; then
     set -x
 fi
diff --git a/tests/traceroute-localhost.sh b/tests/traceroute-localhost.sh
index a9f9e4c..6b254f9 100755
--- a/tests/traceroute-localhost.sh
+++ b/tests/traceroute-localhost.sh
@@ -17,6 +17,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see `http://www.gnu.org/licenses/'.
 
+# Prerequisites:
+#
+#  * Shell: SVR3 Bourne shell, or newer.
+#
+#  * id(1)
+
 TRACEROUTE=${TRACEROUTE:-../src/traceroute$EXEEXT}
 TARGET=${TARGET:-127.0.0.1}
 

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

Summary of changes:
 tests/ftp-localhost.sh        |   11 +++++++++++
 tests/hostname.sh             |    6 ++++++
 tests/ping-localhost.sh       |    6 ++++++
 tests/syslogd.sh              |    8 ++++++++
 tests/tftp.sh                 |    9 +++++++++
 tests/traceroute-localhost.sh |    6 ++++++
 6 files changed, 46 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Sat Feb 04 13:30:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtkNT-0007aV-JA
	for mharc-commit-inetutils@gnu.org; Sat, 04 Feb 2012 13:30:23 -0500
Received: from eggs.gnu.org ([140.186.70.92]:35027)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RtkNQ-0007X2-OG
	for commit-inetutils@gnu.org; Sat, 04 Feb 2012 13:30:22 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RtkNN-0000DN-U5
	for commit-inetutils@gnu.org; Sat, 04 Feb 2012 13:30:20 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:50912)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RtkNN-0000D1-Bk
	for commit-inetutils@gnu.org; Sat, 04 Feb 2012 13:30:17 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RtkNL-0006WV-Q1
	for commit-inetutils@gnu.org; Sat, 04 Feb 2012 18:30:16 +0000
Date: Sat, 04 Feb 2012 18:30:16 +0000
Message-Id: <E1RtkNL-0006WV-Q1@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-25-g83e7003
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: a6ea201f3eed7b199632e44ec7a0b671df4654a9
X-Git-Newrev: 83e7003cbeb8aeacc77274091c566bf659579f81
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 04 Feb 2012 18:30:22 -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  83e7003cbeb8aeacc77274091c566bf659579f81 (commit)
      from  a6ea201f3eed7b199632e44ec7a0b671df4654a9 (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=83e7003cbeb8aeacc77274091c566bf659579f81


commit 83e7003cbeb8aeacc77274091c566bf659579f81
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sat Feb 4 19:27:49 2012 +0100

    libinetutils: Actually use INCAUTH.

diff --git a/ChangeLog b/ChangeLog
index 49f5020..abbcbf1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-04  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* libinetutils/Makefile.am (INCLUDES): Add $(INCAUTH) to list.
+	* src/Makefile.am (INCLUDES): Likewise.
+
 2012-02-03  Mats Erik Andersson <gnu@gisladisker.se>
 
 	Do not use which(1) in test scripts.
diff --git a/libinetutils/Makefile.am b/libinetutils/Makefile.am
index 01585ce..f674eeb 100644
--- a/libinetutils/Makefile.am
+++ b/libinetutils/Makefile.am
@@ -45,4 +45,4 @@ libinetutils_a_SOURCES = \
 
 AM_CPPFLAGS = $(PATHDEF_WTMPX) $(PATHDEF_TTY_PFX) $(PATHDEF_DEVNULL) $(PATHDEF_HEQUIV)
 
-INCLUDES = $(iu_INCLUDES)
+INCLUDES = $(iu_INCLUDES) $(INCAUTH)
diff --git a/src/Makefile.am b/src/Makefile.am
index a85fff4..726e7c6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -96,7 +96,7 @@ uucpd_SOURCES = uucpd.c
 uucpd_LDADD = $(LDADD) $(LIBCRYPT)
 EXTRA_PROGRAMS += uucpd
 
-INCLUDES = $(iu_INCLUDES) -I$(top_srcdir)/libicmp
+INCLUDES = $(iu_INCLUDES) $(INCAUTH) -I$(top_srcdir)/libicmp
 
 AM_CPPFLAGS = $(PATHDEF_BSHELL) $(PATHDEF_CONSOLE) $(PATHDEF_CP) $(PATHDEF_DEFPATH) $(PATHDEF_DEV) $(PATHDEF_INETDCONF) $(PATHDEF_INETDDIR) $(PATHDEF_INETDPID) $(PATHDEF_KLOG) $(PATHDEF_LOG) $(PATHDEF_LOGCONF) $(PATHDEF_LOGIN) $(PATHDEF_LOGPID) $(PATHDEF_NOLOGIN) $(PATHDEF_RLOGIN) $(PATHDEF_RSH) $(PATHDEF_TTY) $(PATHDEF_UTMP) $(PATHDEF_UUCICO)
 

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

Summary of changes:
 ChangeLog                |    5 +++++
 libinetutils/Makefile.am |    2 +-
 src/Makefile.am          |    2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Sat Feb 04 17:51:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RtoS0-0008E1-Bt
	for mharc-commit-inetutils@gnu.org; Sat, 04 Feb 2012 17:51:20 -0500
Received: from eggs.gnu.org ([140.186.70.92]:38415)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RtoRy-0008Ds-6T
	for commit-inetutils@gnu.org; Sat, 04 Feb 2012 17:51:19 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RtoRw-0000mF-Df
	for commit-inetutils@gnu.org; Sat, 04 Feb 2012 17:51:18 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:47048)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RtoRw-0000mB-C5
	for commit-inetutils@gnu.org; Sat, 04 Feb 2012 17:51:16 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RtoRw-0004eR-5N
	for commit-inetutils@gnu.org; Sat, 04 Feb 2012 22:51:16 +0000
Date: Sat, 04 Feb 2012 22:51:16 +0000
Message-Id: <E1RtoRw-0004eR-5N@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-26-g073f4fc
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 83e7003cbeb8aeacc77274091c566bf659579f81
X-Git-Newrev: 073f4fc44c6e5b95993afd555668d886c5654010
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 04 Feb 2012 22:51:19 -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  073f4fc44c6e5b95993afd555668d886c5654010 (commit)
      from  83e7003cbeb8aeacc77274091c566bf659579f81 (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=073f4fc44c6e5b95993afd555668d886c5654010


commit 073f4fc44c6e5b95993afd555668d886c5654010
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sat Feb 4 23:49:19 2012 +0100

    logger: Add standard option `-u'.

diff --git a/ChangeLog b/ChangeLog
index abbcbf1..b6c7dea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2012-02-04  Mats Erik Andersson <gnu@gisladisker.se>
 
+	* src/logger.c (unixsock): New variable.
+	(open_socket): Allow HOST and UNIXSOCK to determine
+	UNIX socket name.  Add test that HOST be non-NULL.
+	(argp_options): New option `-u/--unix'.
+	(parse_opt) <h>: Erase UNIXSOCK, i.e., clear `-u'.
+	<u>: New option. Set UNIXSOCK, erase HOST.
+
+2012-02-04  Mats Erik Andersson <gnu@gisladisker.se>
+
 	* libinetutils/Makefile.am (INCLUDES): Add $(INCAUTH) to list.
 	* src/Makefile.am (INCLUDES): Likewise.
 
diff --git a/src/logger.c b/src/logger.c
index 2bcbdda..2d3185f 100644
--- a/src/logger.c
+++ b/src/logger.c
@@ -52,7 +52,10 @@
 static char *tag = NULL;
 static int logflags = 0;
 static int pri = MAKE_PRI (LOG_USER, LOG_NOTICE);
+/* Only one of `host' and `unixsock' will be non-NULL
+ * once option parsing has been completed. */
 static char *host = PATH_LOG;
+static char *unixsock = NULL;
 static char *source;
 static char *pidstr;
 
@@ -131,9 +134,17 @@ open_socket (void)
   int ret;
 #endif
 
-  if (host[0] == '/')
+  /* A UNIX socket name can be specified in two ways.
+   * Zero length of `unixsock' is handled automatically.  */
+  if ((host != NULL && host[0] == '/') || unixsock != NULL)
     {
-      size_t len = strlen (host);
+      size_t len;
+
+      /* Copy `unixsock' to `host' if necessary.
+       * There is no need to differentiate them.  */
+      if (unixsock)
+	host = unixsock;
+      len = strlen (host);
       if (len >= sizeof sockaddr.sunix.sun_path)
 	error (EXIT_FAILURE, 0, "UNIX socket name too long");
       strcpy (sockaddr.sunix.sun_path, host);
@@ -379,7 +390,9 @@ static struct argp_option argp_options[] = {
   {"ipv4", '4', NULL, 0, "use IPv4 for logging to host" },
   {"ipv6", '6', NULL, 0, "use IPv6 with a host target" },
   { "host", 'h', "HOST", 0,
-    "log to host instead of the default " PATH_LOG },
+    "log to HOST instead of to the default " PATH_LOG },
+  { "unix", 'u', "SOCK", 0,
+    "log to UNIX socket SOCK instead of " PATH_LOG },
   { "source", 'S', "IP", 0,
     "set source IP address" },
   { "id", 'i', "PID", OPTION_ARG_OPTIONAL,
@@ -417,6 +430,12 @@ parse_opt (int key, char *arg, struct argp_state *state)
 
     case 'h':
       host = arg;
+      unixsock = NULL;	/* Erase any previous `-u'.  */
+      break;
+
+    case 'u':
+      unixsock = arg;
+      host = NULL;	/* Erase previous `-h'.  */
       break;
 
     case 'S':

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

Summary of changes:
 ChangeLog    |    9 +++++++++
 src/logger.c |   25 ++++++++++++++++++++++---
 2 files changed, 31 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Sun Feb 05 17:22:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RuATQ-0006Zr-GS
	for mharc-commit-inetutils@gnu.org; Sun, 05 Feb 2012 17:22:16 -0500
Received: from eggs.gnu.org ([140.186.70.92]:39136)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RuATM-0006Yw-VM
	for commit-inetutils@gnu.org; Sun, 05 Feb 2012 17:22:14 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RuATL-0001mZ-5U
	for commit-inetutils@gnu.org; Sun, 05 Feb 2012 17:22:12 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:39179)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RuATL-0001mU-3l
	for commit-inetutils@gnu.org; Sun, 05 Feb 2012 17:22:11 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RuATK-0002QV-BG
	for commit-inetutils@gnu.org; Sun, 05 Feb 2012 22:22:10 +0000
Date: Sun, 05 Feb 2012 22:22:10 +0000
Message-Id: <E1RuATK-0002QV-BG@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-27-g6f8fd11
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 073f4fc44c6e5b95993afd555668d886c5654010
X-Git-Newrev: 6f8fd11c36f9c4d5ca7f26243d90a3c672925b30
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 05 Feb 2012 22:22:14 -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  6f8fd11c36f9c4d5ca7f26243d90a3c672925b30 (commit)
      from  073f4fc44c6e5b95993afd555668d886c5654010 (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=6f8fd11c36f9c4d5ca7f26243d90a3c672925b30


commit 6f8fd11c36f9c4d5ca7f26243d90a3c672925b30
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sun Feb 5 23:20:45 2012 +0100

    tests/tftp.sh: Activate job control.

diff --git a/ChangeLog b/ChangeLog
index b6c7dea..1bd422c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-02-05  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* tests/tftp.sh: Need job control, issue `set -m'.
+	(spawned_pid): New variable.
+	<inetd restart failure>: For better robustness, kill process
+	immediately using SPAWNED_PID.
+
 2012-02-04  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* src/logger.c (unixsock): New variable.
diff --git a/tests/tftp.sh b/tests/tftp.sh
index a627de0..38faba6 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -21,13 +21,16 @@
 
 # Prerequisites:
 #
-#  * Shell: SVR4 Bourne shell, or newer.
+#  * Shell: SVR4 Bourne shell, or newer, and allowing job control.
 #
 #  * cat(1), expr(1), head(1), kill(1), pwd(1), rm(1).
 #
 #  * cmp(1), dd(1), id(1), grep(1), mktemp(1), netstat(8),
 #    ps(1), sed(1), uname(1).
 
+# Need job control when spawning Inetd.
+set -m
+
 if [ "$VERBOSE" ]; then
     set -x
 fi
@@ -175,6 +178,9 @@ test -n "${VERBOSE+yes}" || REDIRECT='2>/dev/null'
 
 eval "$INETD -d -p'$INETD_PID' '$INETD_CONF' $REDIRECT &"
 
+# Debug mode allows the shell to recover PID of Inetd.
+spawned_pid=$!
+
 sleep 2
 
 inetd_pid="`cat $INETD_PID 2>/dev/null`" ||
@@ -213,6 +219,7 @@ if test $? -ne 0; then
 	}
 
     $INETD -d -p"$INETD_PID" "$INETD_CONF" &
+    spawned_pid=$!
     sleep 2
     inetd_pid="`cat $INETD_PID 2>/dev/null`" ||
 	{
@@ -221,6 +228,7 @@ if test $? -ne 0; then
 		but loosing control whether an Inetd process is
 		still around.
 		EOT
+	    ps "$spawned_pid" >/dev/null 2>&1 && kill -9 "$spawned_pid" 2>/dev/null
 	    exit 1
 	}
 
@@ -230,6 +238,7 @@ if test $? -ne 0; then
 	: # Successful this time.
     else
 	echo "Failed again at starting correct Inetd instance." >&2
+	ps "$spawned_pid" >/dev/null 2>&1 && kill -9 "$spawned_pid" 2>/dev/null
 	exit 1
     fi
 fi

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

Summary of changes:
 ChangeLog     |    7 +++++++
 tests/tftp.sh |   11 ++++++++++-
 2 files changed, 17 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Mon Feb 06 17:22:55 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RuWxb-0000VV-2o
	for mharc-commit-inetutils@gnu.org; Mon, 06 Feb 2012 17:22:55 -0500
Received: from eggs.gnu.org ([140.186.70.92]:60261)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RuWxY-0000VN-Ci
	for commit-inetutils@gnu.org; Mon, 06 Feb 2012 17:22:53 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RuWxW-0001OU-IR
	for commit-inetutils@gnu.org; Mon, 06 Feb 2012 17:22:52 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:47690)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RuWxW-0001OQ-FZ
	for commit-inetutils@gnu.org; Mon, 06 Feb 2012 17:22:50 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RuWxV-0007NS-SA
	for commit-inetutils@gnu.org; Mon, 06 Feb 2012 22:22:50 +0000
Date: Mon, 06 Feb 2012 22:22:49 +0000
Message-Id: <E1RuWxV-0007NS-SA@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-28-g71281f6
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6f8fd11c36f9c4d5ca7f26243d90a3c672925b30
X-Git-Newrev: 71281f6d103838e7db6bed8b26aea72d747828ac
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Feb 2012 22:22:53 -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  71281f6d103838e7db6bed8b26aea72d747828ac (commit)
      from  6f8fd11c36f9c4d5ca7f26243d90a3c672925b30 (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=71281f6d103838e7db6bed8b26aea72d747828ac


commit 71281f6d103838e7db6bed8b26aea72d747828ac
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Mon Feb 6 23:19:30 2012 +0100

    Test presence of lookup files.
    
    The FTP and TFTP tests depend in /etc/nsswitch.conf,
    /etc/passwd, and /etc/protocols.  Check their presence.

diff --git a/ChangeLog b/ChangeLog
index 1bd422c..53c4fbf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-02-06  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* doc/inetutils.texi (logger invocation): Describe option `-u/--unix'.
+	(ftpd invocation): Describe options `-4/ipv4' and `-6/--ipv6'.
+	* tests/ftp-localhost.sh (NSSWITCH, PASSWD, PROTOCOLS): New variables
+	naming standard files.  Check their presence and skip test otherwise.
+	* tests/tftp.sh (NSSWITCH, PASSWD, PROTOCOLS): Likewise.
+
 2012-02-05  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* tests/tftp.sh: Need job control, issue `set -m'.
diff --git a/doc/inetutils.texi b/doc/inetutils.texi
index 392d537..2fb2e0b 100644
--- a/doc/inetutils.texi
+++ b/doc/inetutils.texi
@@ -330,7 +330,7 @@ must be separated from it by exactly one equals sign.
 @opindex -h
 @opindex --host
 Send messages to the given host or socket.  The @var{host} argument
-can be either a local UNIX socket name (starting with a dash @samp{/}),
+can be either a local UNIX socket name (starting with a slash @samp{/}),
 or:
 
 @smallexample
@@ -345,6 +345,14 @@ the port number corresponding to the @samp{syslog} service is used.
 If a numerical IPv6 address is given without a port specification,
 then the address must be enclosed within brackets (like [::1]).
 
+@item -u @var{socket}
+@itemx --unix=@var{socket}
+@opindex -h
+@opindex --host
+Send messages to the given local UNIX socket.  The @var{socket} argument
+can be either an absolute path (starting with a slash @samp{/}), or a relative
+path understood relative to the current working directory.
+
 @item -S @var{addr}
 @itemx --source=@var{addr}
 @opindex -S
@@ -2676,6 +2684,18 @@ ftpd [@var{option}]@dots{}
 @end example
 
 @table @option
+@item -4
+@itemx --ipv4
+@opindex -4
+@opindex --ipv4
+Daemon uses only IPv4 addressing.  Ignored in inetd mode.
+
+@item -6
+@itemx --ipv6
+@opindex -6
+@opindex --ipv6
+Daemon uses only IPv6 addressing.  Ignored in inetd mode.
+
 @item -A
 @itemx --anonymous-only
 @opindex -A
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index 0ac7f26..ab4cb0b 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -29,6 +29,9 @@
 #
 #  * Detection of sysctl(8) is made.  Availability will
 #    lead to better test coverage.
+#
+#  * Accessed by launched Inetd:
+#      /etc/nsswitch.conf, /etc/passwd, /etc/protocols.
 
 # FIXME: Better test coverage!
 #
@@ -83,6 +86,24 @@ netstat -na >/dev/null 2>&1 ||
 	exit 77
     }
 
+# The superserver Inetd puts constraints on any chroot
+# when running this script, since it needs to look up
+# some basic facts stated in the configuration file.
+NSSWITCH=/etc/nsswitch.conf
+PASSWD=/etc/passwd
+PROTOCOLS=/etc/protocols
+
+if test ! -r $NSSWITCH || test ! -r $PASSWD \
+      || test ! -r $PROTOCOLS; then
+    cat <<-EOT >&2
+	The use of the superserver Inetd in this script requires
+	the availability of "$NSSWITCH", "$PASSWD", and
+	"$PROTOCOLS".  At least one of these is now missing.
+	Therefore skipping test.
+	EOT
+    exit 77
+fi
+
 if [ $VERBOSE ]; then
     set -x
     $FTP --version | head -1
diff --git a/tests/tftp.sh b/tests/tftp.sh
index 38faba6..add33c3 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -27,6 +27,9 @@
 #
 #  * cmp(1), dd(1), id(1), grep(1), mktemp(1), netstat(8),
 #    ps(1), sed(1), uname(1).
+#
+#  * Accessed by launched Inetd:
+#      /etc/nsswitch.conf, /etc/passwd, /etc/protocols.
 
 # Need job control when spawning Inetd.
 set -m
@@ -72,6 +75,24 @@ echo 'Good luck.' | grep 'ood' > /dev/null 2>&1 \
 	exit 77
     }
 
+# The superserver Inetd puts constraints on any chroot
+# when running this script, since it needs to look up
+# some basic facts stated in the configuration file.
+NSSWITCH=/etc/nsswitch.conf
+PASSWD=/etc/passwd
+PROTOCOLS=/etc/protocols
+
+if test ! -r $NSSWITCH || test ! -r $PASSWD \
+      || test ! -r $PROTOCOLS; then
+    cat <<-EOT >&2
+	The use of the superserver Inetd in this script requires
+	the availability of "$NSSWITCH", "$PASSWD", and
+	"$PROTOCOLS".  At least one of these is now missing.
+	Therefore skipping test.
+	EOT
+    exit 77
+fi
+
 AF=${AF:-inet}
 PROTO=${PROTO:-udp}
 USER=`id -u -n`

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

Summary of changes:
 ChangeLog              |    8 ++++++++
 doc/inetutils.texi     |   22 +++++++++++++++++++++-
 tests/ftp-localhost.sh |   21 +++++++++++++++++++++
 tests/tftp.sh          |   21 +++++++++++++++++++++
 4 files changed, 71 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed Feb 08 06:33:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rv5mG-000629-ED
	for mharc-commit-inetutils@gnu.org; Wed, 08 Feb 2012 06:33:32 -0500
Received: from eggs.gnu.org ([140.186.70.92]:42780)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rv5mA-00061L-Nx
	for commit-inetutils@gnu.org; Wed, 08 Feb 2012 06:33:31 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rv5m3-00069J-PQ
	for commit-inetutils@gnu.org; Wed, 08 Feb 2012 06:33:26 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:33698)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rv5m3-000699-NL
	for commit-inetutils@gnu.org; Wed, 08 Feb 2012 06:33:19 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1Rv5m4-0000ma-6f
	for commit-inetutils@gnu.org; Wed, 08 Feb 2012 11:33:20 +0000
Date: Wed, 08 Feb 2012 11:33:20 +0000
Message-Id: <E1Rv5m4-0000ma-6f@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-30-g92acd8b
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 71281f6d103838e7db6bed8b26aea72d747828ac
X-Git-Newrev: 92acd8bcfee7731bd558e8c7d89b93c5a5c668d1
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 08 Feb 2012 11:33:31 -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  92acd8bcfee7731bd558e8c7d89b93c5a5c668d1 (commit)
       via  860baccb1e204a84efe32ed4267c18fc2ece8725 (commit)
      from  71281f6d103838e7db6bed8b26aea72d747828ac (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=92acd8bcfee7731bd558e8c7d89b93c5a5c668d1


commit 92acd8bcfee7731bd558e8c7d89b93c5a5c668d1
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed Feb 8 12:30:42 2012 +0100

    Test syslogd on standard port.

diff --git a/ChangeLog b/ChangeLog
index aacd4d5..baa6ff4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2012-02-08  Mats Erik Andersson <gnu@gisladisker.se>
 
+	* tests/syslogd.sh: Reimplement a subtest using standard INET port.
+	A second SYSLOG daemon is started, which only uses INET sockets.
+	(do_standard_port): New variable, initially `true', changed to
+	`false' for non-root user and when 514/udp is in use.
+
+2012-02-08  Mats Erik Andersson <gnu@gisladisker.se>
+
 	* src/syslogd.c: Implement presetable inet port, defaulting to the
 	standard port `syslog/udp'.  Fall back to `514' if `syslog' fails.
 	(find_inet_port): New function.
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index bb4457d..a362dd7 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -62,6 +62,7 @@ do_cleandir=false
 do_socket_length=true
 do_unix_socket=true
 do_inet_socket=true
+do_standard_port=true
 
 # The UNIX socket name length is preset by the system
 # and is also system dependent.
@@ -266,7 +267,9 @@ TAG="syslogd-test"
 rm -f "$OUT" "$PID" "$CONF"
 
 # Full testing at the standard port needs a superuser.
-# Randomise if necessary.
+# Randomise if necessary to get an underprivileged port.
+test `id -u` -eq 0 || do_standard_port=false
+
 if test `id -u` -ne 0 && test $PORT -le 1023; then
     cat <<-EOT >&2
 	WARNING!!  The preset port $PORT/$PROTO is not usable,
@@ -399,6 +402,35 @@ if $do_inet_socket; then
 	"Sending IPv6 message. (pid $$)"
 fi
 
+# Remove previous SYSLOG daemon.
+test -r "$PID" && ps "`cat "$PID"`" >/dev/null 2>&1 &&
+    kill "`cat "$PID"`"
+
+# Check functionality of standard port, i.e., execution
+# where neither syslogd nor logger have been instructed
+# to use specific ports for inet sockets.
+#
+locate_port $PROTO 514 && do_standard_port=false
+
+if $do_standard_port; then
+    echo 'Checking also standard port 514/udp.' >&2
+    TESTCASES=`expr $TESTCASES + 2`
+
+    # New configuration, but continuing old message file.
+    rm -f "$PID"
+    cat > "$CONF" <<-EOT
+	*.*	$OUT
+	EOT
+
+    # Only INET socket, no UNIX socket.
+    $SYSLOGD --rcfile="$CONF" --pidfile="$PID" --socket='' \
+	--inet --ipany $OPTIONS
+    $LOGGER -4 -h "$TARGET" -p user.info -t "$TAG" \
+	"IPv4 to standard port. (pid $$)"
+    $LOGGER -6 -h "$TARGET6" -p user.info -t "$TAG" \
+	"IPv6 to standard port. (pid $$)"
+fi
+
 # Detection of registered messages.
 #
 COUNT=`grep "$TAG" "$OUT" | wc -l`
@@ -417,7 +449,10 @@ fi
 echo "Registered $SUCCESSES successes out of $TESTCASES."
 
 # Report incomplete test setup.
-$do_inet_socket || echo 'NOTICE: No INET socket tests were performed.' >&2
+$do_inet_socket ||
+    echo 'NOTICE: Port specified INET socket test was not run' >&2
+$do_standard_port ||
+    echo 'NOTICE: Standard port test was not run.' >&1
 
 if [ "$SUCCESSES" -eq "$TESTCASES" ]; then
     echo "Successful testing."
@@ -427,6 +462,7 @@ else
 fi
 
 # Remove the daemon process.
-[ -r "$PID" ] && kill "`cat "$PID"`"
+test -r "$PID" && ps "`cat "$PID"`" >/dev/null 2>&1 &&
+    kill "`cat "$PID"`"
 
 exit $EXITCODE

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=860baccb1e204a84efe32ed4267c18fc2ece8725


commit 860baccb1e204a84efe32ed4267c18fc2ece8725
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed Feb 8 00:15:45 2012 +0100

    syslogd: Allow use of non-standard ports.

diff --git a/ChangeLog b/ChangeLog
index 53c4fbf..aacd4d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,32 @@
+2012-02-08  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* src/syslogd.c: Implement presetable inet port, defaulting to the
+	standard port `syslog/udp'.  Fall back to `514' if `syslog' fails.
+	(find_inet_port): New function.
+	(BindPort): New variable.
+	[IPPORT_SYSLOG] (portstr): New variable.
+	(LogPortText): Initialize to NULL.
+	(LogForwardPort): New variable.
+	(argp_options, parse_opt): New option `-B/--bind-port'.
+	(main): New call to `find_inet_port'.
+	(create_inet_socket): Check that LOGPORTTEXT is non-null,
+	otherwise inet sockets are left disabled.
+	[AI_ADDRCONFIG] (fprintflog, cfline): Only AF_UNSPEC invokes
+	AI_ADDRCONFIG.  Replace LOGPORTTEXT by LOGFORWARDPORT in calls
+	to getaddrinfo.
+
+	* tests/syslogd.sh: Adapt to `syslogd' allowing non-standard ports.
+	(PORT): Make presetable from command line.
+	(locate_port): New function.
+	<non-root && privileged port>: Use a pseudo-random port.
+	<port in use>: Take a pseudo-random step to an even higher port, only
+	to disable inet sockets if even that action fails.
+	[do_inet_socket]: Add `-B$PORT' to IU_OPTIONS and append `:$PORT'
+	to option `-h' in calls to logger.
+
+	* tests/ftp-localhost.sh, tests/tftp.sh (NSSWITCH): Override
+	with value `/etc/services' when running OpenBSD.
+
 2012-02-06  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* doc/inetutils.texi (logger invocation): Describe option `-u/--unix'.
diff --git a/src/syslogd.c b/src/syslogd.c
index faeebac..a5b7e0b 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -251,6 +251,7 @@ int decode (const char *, CODE *);
 void die (int);
 void doexit (int);
 void domark (int);
+void find_inet_port (const char *);
 void fprintlog (struct filed *, const char *, int, const char *);
 void init (int);
 void logerror (const char *);
@@ -272,6 +273,11 @@ char *LocalHostName;		/* Our hostname.  */
 char *LocalDomain;		/* Our local domain name.  */
 char *BindAddress = NULL;	/* Binding address for INET listeners.
 				 * The default is a wildcard address.  */
+char *BindPort = NULL;		/* Optional non-standard port, instead
+				 * of the usual 514/udp.  */
+#ifdef IPPORT_SYSLOG
+char portstr[8];		/* Fallback port number.  */
+#endif
 char addrstr[INET6_ADDRSTRLEN];	/* Common address presentation.  */
 char addrname[NI_MAXHOST];	/* Common name lookup.  */
 int usefamily = AF_INET;	/* Address family for INET services.
@@ -281,7 +287,8 @@ int finet[2] = {-1, -1};	/* Internet datagram socket fd.  */
 #define IU_FD_IP4	0	/* Indices for the address families.  */
 #define IU_FD_IP6	1
 int fklog = -1;			/* Kernel log device fd.  */
-char *LogPortText = "syslog";	/* Service/port for INET connections.  */
+char *LogPortText = NULL;	/* Service/port for INET connections.  */
+char *LogForwardPort = NULL;	/* Target port for message forwarding.  */
 int Initialized;		/* True when we are initialized. */
 int MarkInterval = 20 * 60;	/* Interval between marks in seconds.  */
 int MarkSeq;			/* Mark sequence number.  */
@@ -328,6 +335,7 @@ static struct argp_option argp_options[] = {
   {"ipv6", '6', NULL, 0, "restrict to IPv6 transport", GRP+1},
   {"ipany", OPT_IPANY, NULL, 0, "allow transport with IPv4 and IPv6", GRP+1},
   {"bind", 'b', "ADDR", 0, "bind listener to this address/name", GRP+1},
+  {"bind-port", 'B', "PORT", 0, "bind listener to this port", GRP+1},
   {"mark", 'm', "INTVL", 0, "specify timestamp interval in logs (0 for no "
    "timestamps)", GRP+1},
   {"no-detach", 'n', NULL, 0, "do not enter daemon mode", GRP+1},
@@ -400,6 +408,10 @@ parse_opt (int key, char *arg, struct argp_state *state)
       BindAddress = arg;
       break;
 
+    case 'B':
+      BindPort = arg;
+      break;
+
     case 'm':
       v = strtol (arg, &endptr, 10);
       if (*endptr)
@@ -464,13 +476,16 @@ main (int argc, char *argv[])
 
   set_program_name (argv[0]);
 
-  /* Initiliaze PATH_LOG as the first element of the unix sockets array.  */
+  /* Initialize PATH_LOG as the first element of the unix sockets array.  */
   add_funix (PATH_LOG);
 
   /* Parse command line */
   iu_argp_init ("syslogd", default_program_authors);
   argp_parse (&argp, argc, argv, 0, NULL, NULL);
 
+  /* Check desired port, if in demand at all.  */
+  find_inet_port (BindPort);
+
   /* Daemonise, if not, set the buffering for line buffer.  */
   if (!NoDetach)
     {
@@ -849,6 +864,12 @@ create_inet_socket (int af, int fd46[2])
   /* Invalidate old descriptors.  */
   fd46[IU_FD_IP4] = fd46[IU_FD_IP6] = -1;
 
+  if (!LogPortText)
+    {
+      dbg_printf ("No listen port has been accepted.\n");
+      return;
+    }
+
   memset (&hints, 0, sizeof (hints));
   hints.ai_family = af;
   hints.ai_socktype = SOCK_DGRAM;
@@ -1300,9 +1321,11 @@ fprintlog (struct filed *f, const char *from, int flags, const char *msg)
 	  memset (&hints, 0, sizeof (hints));
 	  hints.ai_family = usefamily;
 #ifdef AI_ADDRCONFIG
-	  hints.ai_flags = AI_ADDRCONFIG;
+	  if (usefamily == AF_UNSPEC)
+	    hints.ai_flags |= AI_ADDRCONFIG;
 #endif
-	  err = getaddrinfo (f->f_un.f_forw.f_hname, LogPortText, &hints, &rp);
+	  err = getaddrinfo (f->f_un.f_forw.f_hname, LogForwardPort,
+			     &hints, &rp);
 	  if (err)
 	    {
 	      dbg_printf ("Failure: %s\n", gai_strerror (err));
@@ -1360,7 +1383,7 @@ fprintlog (struct filed *f, const char *from, int flags, const char *msg)
 	      hints.ai_socktype = SOCK_DGRAM;
 	      hints.ai_flags = AI_PASSIVE;
 
-	      err = getaddrinfo (NULL, LogPortText, &hints, &rp);
+	      err = getaddrinfo (NULL, LogForwardPort, &hints, &rp);
 	      if (err)
 		{
 		  dbg_printf ("Not forwarding due to lookup failure: %s.\n",
@@ -2067,13 +2090,14 @@ cfline (const char *line, struct filed *f)
       hints.ai_family = usefamily;
       hints.ai_socktype = SOCK_DGRAM;
 #ifdef AI_ADDRCONFIG
-      hints.ai_flags = AI_ADDRCONFIG;
+      if (usefamily == AF_UNSPEC)
+	hints.ai_flags |= AI_ADDRCONFIG;
 #endif
 
       f->f_un.f_forw.f_addrlen = 0;	/* Invalidate address.  */
       memset (&f->f_un.f_forw.f_addr, 0, sizeof (f->f_un.f_forw.f_addr));
 
-      err = getaddrinfo (p, LogPortText, &hints, &rp);
+      err = getaddrinfo (p, LogForwardPort, &hints, &rp);
       if (err)
 	{
 	  switch (err)
@@ -2225,3 +2249,59 @@ trigger_restart (int signo _GL_UNUSED_PARAMETER)
 {
   restart = 1;
 }
+
+/* Override default port with a non-NULL argument.
+ * Otherwise identify the default syslog/udp with
+ * proper fallback to avoid resolve issues.  */
+void
+find_inet_port (const char *port)
+{
+  int err;
+  struct addrinfo hints, *ai;
+
+  /* Fall back to numerical description.  */
+#ifdef IPPORT_SYSLOG
+  snprintf (portstr, sizeof (portstr), "%u", IPPORT_SYSLOG);
+  LogForwardPort = portstr;
+#else
+  LogForwardPort = "514";
+#endif
+
+  memset (&hints, 0, sizeof (hints));
+  hints.ai_family = AF_UNSPEC;
+  hints.ai_socktype = SOCK_DGRAM;
+  hints.ai_flags = AI_PASSIVE;
+
+  err = getaddrinfo (NULL, "syslog", &hints, &ai);
+  if (err == 0)
+    {
+      LogForwardPort = "syslog";	/* Symbolic name is usable.  */
+      freeaddrinfo (ai);
+    }
+
+  LogPortText = (char *) port;
+
+  if (!LogPortText)
+    {
+      LogPortText = LogForwardPort;
+      return;
+    }
+
+  /* Is the port specified on command line really usable?  */
+  memset (&hints, 0, sizeof (hints));
+  hints.ai_family = AF_UNSPEC;
+  hints.ai_socktype = SOCK_DGRAM;
+  hints.ai_flags = AI_PASSIVE;
+
+  err = getaddrinfo (NULL, LogPortText, &hints, &ai);
+  if (err != 0)
+    {
+      /* Not usable, disable listener.
+       * It is too early to report failure at this time.  */
+      LogPortText = NULL;
+    }
+  else
+    freeaddrinfo (ai);
+
+  return;
+}
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index ab4cb0b..f4cd71b 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -32,6 +32,8 @@
 #
 #  * Accessed by launched Inetd:
 #      /etc/nsswitch.conf, /etc/passwd, /etc/protocols.
+#
+#    OpenBSD uses /etc/services directly, not via /etc/nsswitch.conf.
 
 # FIXME: Better test coverage!
 #
@@ -93,6 +95,9 @@ NSSWITCH=/etc/nsswitch.conf
 PASSWD=/etc/passwd
 PROTOCOLS=/etc/protocols
 
+# Overrides based on systems.
+test `uname -s` = OpenBSD && NSSWITCH=/etc/services
+
 if test ! -r $NSSWITCH || test ! -r $PASSWD \
       || test ! -r $PROTOCOLS; then
     cat <<-EOT >&2
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index 89b487b..bb4457d 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -176,7 +176,19 @@ trap clean_testdir EXIT HUP INT QUIT TERM
 # Test at this port.
 # Standard is syslog at 514/udp.
 PROTO=udp
-PORT=514
+PORT=${PORT:-514}
+
+# locate_port proto port
+#
+locate_port () {
+    if [ "`uname -s`" = "SunOS" ]; then
+	netstat -na -finet -finet6 -P$1 |
+	grep "\.$2[^0-9]" >/dev/null 2>&1
+    else
+	netstat -na |
+	grep "^$1\(4\|6\|46\)\{0,1\}.*[^0-9]$2[^0-9]" >/dev/null 2>&1
+    fi
+}
 
 # Receivers for INET sockets.
 : ${TARGET:=127.0.0.1}
@@ -253,31 +265,31 @@ TAG="syslogd-test"
 # Remove old files in use by daemon.
 rm -f "$OUT" "$PID" "$CONF"
 
-# Full testing needs a superuser.  Report this.
-if [ `id -u` -ne 0 ]; then
+# Full testing at the standard port needs a superuser.
+# Randomise if necessary.
+if test `id -u` -ne 0 && test $PORT -le 1023; then
     cat <<-EOT >&2
-	WARNING!!  Disabling INET server tests since you seem
-	to be underprivileged.
+	WARNING!!  The preset port $PORT/$PROTO is not usable,
+	since you are underprivileged.  Now attempting
+	a randomised higher port.
 	EOT
-    do_inet_socket=false
-else
-    # Is the INET port already in use? If so,
-    # skip the test in its entirety.
-    if [ "`uname -s`" = "SunOS" ]; then
-	netstat -na -finet -finet6 -P$PROTO |
-	grep "\.$PORT[^0-9]" >/dev/null 2>&1
-    else
-	netstat -na |
-	grep "^$PROTO\(4\|6\|46\)\{0,1\}.*[^0-9]$PORT[^0-9]" \
-	    >/dev/null 2>&1
-    fi
-    if [ $? -eq 0 ]; then
-	cat <<-EOT >&2
-		The INET port $PORT/$PROTO is already in use.
-		No reliable test of INET socket is possible.
+    PORT=`expr $PORT + 3917 + ${RANDOM:-$$} % 2711`
+fi
+
+# Is the INET port already in use? If so,
+# randomise somewhat.
+if locate_port $PROTO $PORT; then
+    echo "Port $PORT/$PROTO is in use. Randomising port somewhat." >&2
+    PORT=`expr $PORT + 2711 + ${RANDOM:-$$} % 917`
+fi
+
+# Test a final time.
+if locate_port $PROTO $PORT; then
+    cat <<-EOT >&2
+	The INET port $PORT/$PROTO is already in use.
+	Skipping test of INET socket this time.
 	EOT
-	do_inet_socket=false
-    fi
+    do_inet_socket=false
 fi
 
 # A minimal, catch-all configuration.
@@ -319,7 +331,7 @@ fi
 
 ## Enable INET service when possible.
 if $do_inet_socket; then
-    IU_OPTIONS="$IU_OPTIONS --ipany --inet --hop"
+    IU_OPTIONS="$IU_OPTIONS --ipany --inet -B$PORT --hop"
 fi
 ## Bring in additional options from command line.
 ## Disable kernel messages otherwise.
@@ -381,9 +393,9 @@ fi
 
 if $do_inet_socket; then
     TESTCASES=`expr $TESTCASES + 2`
-    $LOGGER -4 -h "$TARGET" -p user.info -t "$TAG" \
+    $LOGGER -4 -h "$TARGET:$PORT" -p user.info -t "$TAG" \
 	"Sending IPv4 message. (pid $$)"
-    $LOGGER -6 -h "$TARGET6" -p user.info -t "$TAG" \
+    $LOGGER -6 -h "$TARGET6:$PORT" -p user.info -t "$TAG" \
 	"Sending IPv6 message. (pid $$)"
 fi
 
diff --git a/tests/tftp.sh b/tests/tftp.sh
index add33c3..d084e52 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -30,6 +30,8 @@
 #
 #  * Accessed by launched Inetd:
 #      /etc/nsswitch.conf, /etc/passwd, /etc/protocols.
+#
+#    OpenBSD uses /etc/services directly, not via /etc/nsswitch.conf.
 
 # Need job control when spawning Inetd.
 set -m
@@ -82,6 +84,9 @@ NSSWITCH=/etc/nsswitch.conf
 PASSWD=/etc/passwd
 PROTOCOLS=/etc/protocols
 
+# Overrides based on systems.
+test `uname -s` = OpenBSD && NSSWITCH=/etc/services
+
 if test ! -r $NSSWITCH || test ! -r $PASSWD \
       || test ! -r $PROTOCOLS; then
     cat <<-EOT >&2

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

Summary of changes:
 ChangeLog              |   36 ++++++++++++++++
 src/syslogd.c          |   94 ++++++++++++++++++++++++++++++++++++++++---
 tests/ftp-localhost.sh |    5 ++
 tests/syslogd.sh       |  104 +++++++++++++++++++++++++++++++++++-------------
 tests/tftp.sh          |    5 ++
 5 files changed, 209 insertions(+), 35 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed Feb 08 19:29:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RvHsp-0005mN-DP
	for mharc-commit-inetutils@gnu.org; Wed, 08 Feb 2012 19:29:07 -0500
Received: from eggs.gnu.org ([140.186.70.92]:37951)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RvHsm-0005lr-FG
	for commit-inetutils@gnu.org; Wed, 08 Feb 2012 19:29:05 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RvHsk-0004Xi-Rr
	for commit-inetutils@gnu.org; Wed, 08 Feb 2012 19:29:04 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:53775)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RvHsk-0004Xc-Ox
	for commit-inetutils@gnu.org; Wed, 08 Feb 2012 19:29:02 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RvHsj-0002x3-Bu
	for commit-inetutils@gnu.org; Thu, 09 Feb 2012 00:29:02 +0000
Date: Thu, 09 Feb 2012 00:29:01 +0000
Message-Id: <E1RvHsj-0002x3-Bu@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-31-g7c54064
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 92acd8bcfee7731bd558e8c7d89b93c5a5c668d1
X-Git-Newrev: 7c540649edf6f99b3f4017e86f1c342618b428ab
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Feb 2012 00:29: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  7c540649edf6f99b3f4017e86f1c342618b428ab (commit)
      from  92acd8bcfee7731bd558e8c7d89b93c5a5c668d1 (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=7c540649edf6f99b3f4017e86f1c342618b428ab


commit 7c540649edf6f99b3f4017e86f1c342618b428ab
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Thu Feb 9 01:14:10 2012 +0100

    Update sensing of Kerberos5 implementation.

diff --git a/ChangeLog b/ChangeLog
index baa6ff4..33beee7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-02-09  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* am/krb5.m4: When examining `libkrb5', replace AC_CHECK_LIB
+	by AC_TRY_LINK in order to avoid cached results, since identical
+	library and function names are tested for.
+	<OpenBSD Heimdal>: New test case.
+
 2012-02-08  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* tests/syslogd.sh: Reimplement a subtest using standard INET port.
diff --git a/am/krb5.m4 b/am/krb5.m4
index 267e86c..9ef53b9 100644
--- a/am/krb5.m4
+++ b/am/krb5.m4
@@ -59,27 +59,42 @@ AC_DEFUN([IU_CHECK_KRB5],
     KRB4_LIBS="-lkrb4 -ldes425"
 
     ## Check for new MIT kerberos V support
-    AC_CHECK_LIB(krb5, krb5_init_context,
+    LIBS="$saved_LIBS -lkrb5 -lk5crypto -lcom_err"
+    AC_TRY_LINK([], [return krb5_init_context((void *) 0); ],
       [KRB5_IMPL="MIT"
-       KRB5_LIBS="$KRB5_LDFLAGS $KRB4_LIBS -lkrb5 -lk5crypto -lcom_err"]
-       ,, -lk5crypto -lcom_err)
+       KRB5_LIBS="$KRB5_LDFLAGS $KRB4_LIBS -lkrb5 -lk5crypto -lcom_err"], )
 
     ## Heimdal kerberos V support
     if test "$KRB5_IMPL" = "none"; then
-      AC_CHECK_LIB(krb5, krb5_init_context,
+      LIBS="$saved_LIBS -lkrb5 -ldes -lasn1 -lroken -lcrypt -lcom_err"
+      AC_TRY_LINK([], [return krb5_init_context((void *) 0); ],
         [KRB5_IMPL="Heimdal"
          KRB5_LIBS="$KRB5_LDFLAGS $KRB4_LIBS -lkrb5 -ldes -lasn1 -lroken -lcrypt -lcom_err"]
-         ,, -ldes -lasn1 -lroken -lcrypt -lcom_err)
+         , )
+    fi
+
+    ### FIXME: Implement a robust distinction between
+    ### Heimdal a la OpenBSD and Old MIT Kerberos V.
+    ### Presently the first will catch all, since it
+    ### is readily available on contemporary systems.
+
+    ## OpenBSD variant of Heimdal
+    if test "$KRB5_IMPL" = "none"; then
+      LIBS="$saved_LIBS -lkrb5 -lcrypto"
+      AC_TRY_LINK([], [return krb5_init_context((void *) 0); ],
+        [KRB5_IMPL="OpenBSD-Heimdal"
+	 KRB5_CFLAGS="-I/usr/include/kerberosV"
+         KRB5_LIBS="$KRB5_LDFLAGS -lkrb5 -lcrypto -lasn1 -ldes"], )
     fi
 
     ## Old MIT Kerberos V
     ## Note: older krb5 distributions use -lcrypto instead of
     ## -lk5crypto. This may conflict with OpenSSL.
     if test "$KRB5_IMPL" = "none"; then
-      AC_CHECK_LIB(krb5, krb5_init_context,
-        [KRB5_IMPL="OldMIT",
-         KRB5_LIBS="$KRB5_LDFLAGS $KRB4_LIBS -lkrb5 -lkrb5 -lcrypto -lcom_err"]
-        ,, -lcrypto -lcom_err)
+      LIBS="$saved_LIBS -lkrb5 -lcrypto -lcom_err"
+      AC_TRY_LINK([], [return krb5_init_context((void *) 0); ],
+        [KRB5_IMPL="OldMIT"
+         KRB5_LIBS="$KRB5_LDFLAGS $KRB4_LIBS -lkrb5 -lcrypto -lcom_err"], )
     fi
 
     LDFLAGS="$saved_LDFLAGS"

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

Summary of changes:
 ChangeLog  |    7 +++++++
 am/krb5.m4 |   33 ++++++++++++++++++++++++---------
 2 files changed, 31 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Mon Feb 13 05:59:12 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rwtcm-0005cA-92
	for mharc-commit-inetutils@gnu.org; Mon, 13 Feb 2012 05:59:12 -0500
Received: from eggs.gnu.org ([140.186.70.92]:60969)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1Rwtch-0005bb-GE
	for commit-inetutils@gnu.org; Mon, 13 Feb 2012 05:59:09 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1Rwtcb-00079d-N2
	for commit-inetutils@gnu.org; Mon, 13 Feb 2012 05:59:07 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:40012)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1Rwtcb-00079Z-KG
	for commit-inetutils@gnu.org; Mon, 13 Feb 2012 05:59:01 -0500
Received: from jas by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <simon@josefsson.org>) id 1Rwtcb-00051E-2R
	for commit-inetutils@gnu.org; Mon, 13 Feb 2012 10:59:01 +0000
Date: Mon, 13 Feb 2012 10:59:01 +0000
Message-Id: <E1Rwtcb-00051E-2R@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-32-g336c4a3
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 7c540649edf6f99b3f4017e86f1c342618b428ab
X-Git-Newrev: 336c4a3056e4ea06496d26f7b328052bed690e19
From: Simon Josefsson <simon@josefsson.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Feb 2012 10:59:09 -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  336c4a3056e4ea06496d26f7b328052bed690e19 (commit)
      from  7c540649edf6f99b3f4017e86f1c342618b428ab (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=336c4a3056e4ea06496d26f7b328052bed690e19


commit 336c4a3056e4ea06496d26f7b328052bed690e19
Author: Simon Josefsson <simon@josefsson.org>
Date:   Mon Feb 13 11:58:55 2012 +0100

    README (Notes): Doc fix.

diff --git a/ChangeLog b/ChangeLog
index 33beee7..b1fd1e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-02-13  Simon Josefsson  <simon@josefsson.org>
+
+	* README (Notes): Doc fix.
+
 2012-02-09  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* am/krb5.m4: When examining `libkrb5', replace AC_CHECK_LIB
diff --git a/README b/README
index 1af2f26..8be3c52 100644
--- a/README
+++ b/README
@@ -39,6 +39,9 @@ Some known deficiencies:
 
  - Non-Shishi Kerberos support does not build.  Patches welcome.
 
+ - Not all utilities are Kerberized even when built with Kerberos
+   libraries, including 'rcp'.
+
  - InetUtils does not build on HP-UX 11.00, Cygwin, Minix, MinGW,
    MSCV, BeOS, Haiki (and probably other systems as well).  Patches
    welcome.

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

Summary of changes:
 ChangeLog |    4 ++++
 README    |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Fri Feb 17 18:56:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RyXfU-0003NH-Et
	for mharc-commit-inetutils@gnu.org; Fri, 17 Feb 2012 18:56:48 -0500
Received: from eggs.gnu.org ([140.186.70.92]:52099)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RyXfS-0003MP-0C
	for commit-inetutils@gnu.org; Fri, 17 Feb 2012 18:56:46 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RyXfQ-0006uQ-M2
	for commit-inetutils@gnu.org; Fri, 17 Feb 2012 18:56:45 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:35973)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RyXfQ-0006uM-If
	for commit-inetutils@gnu.org; Fri, 17 Feb 2012 18:56:44 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RyXfQ-0006IS-HN
	for commit-inetutils@gnu.org; Fri, 17 Feb 2012 23:56:44 +0000
Date: Fri, 17 Feb 2012 23:56:44 +0000
Message-Id: <E1RyXfQ-0006IS-HN@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-33-gc7d1ce3
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 336c4a3056e4ea06496d26f7b328052bed690e19
X-Git-Newrev: c7d1ce3563946228f9c6d8a18fa4252a199f1bab
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 17 Feb 2012 23:56:47 -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  c7d1ce3563946228f9c6d8a18fa4252a199f1bab (commit)
      from  336c4a3056e4ea06496d26f7b328052bed690e19 (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=c7d1ce3563946228f9c6d8a18fa4252a199f1bab


commit c7d1ce3563946228f9c6d8a18fa4252a199f1bab
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sat Feb 18 00:54:11 2012 +0100

    ftpd: Portability fix.
    
    Recent FreeBSD releases use non-standard getaddrinfo.

diff --git a/ChangeLog b/ChangeLog
index b1fd1e2..9527247 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-02-18  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* README (Notes): Explicitly name extent of Shishi support.
+
+	Portability issue caused by FreeBSD.
+	* ftpd/ftpcmd.y (cmd) <EPRT>: Remove precompiler conditionals
+	using AI_V4MAPPED, keeping code, but do not set AI_V4MAPPED in
+	`hints.ai_flags'.
+
 2012-02-13  Simon Josefsson  <simon@josefsson.org>
 
 	* README (Notes): Doc fix.
diff --git a/README b/README
index 8be3c52..f5c2588 100644
--- a/README
+++ b/README
@@ -39,6 +39,9 @@ Some known deficiencies:
 
  - Non-Shishi Kerberos support does not build.  Patches welcome.
 
+ - Shishi Kerberos support is only implemented for 'rlogin', 'rlogind',
+   'rsh', 'rshd', 'telnet', and 'telnetd'.
+
  - Not all utilities are Kerberized even when built with Kerberos
    libraries, including 'rcp'.
 
diff --git a/ftpd/ftpcmd.y b/ftpd/ftpcmd.y
index e637ac8..dc88350 100644
--- a/ftpd/ftpcmd.y
+++ b/ftpd/ftpcmd.y
@@ -599,10 +599,8 @@ cmd
 				 * currently in use, unless we
 				 * detect IPv4-mapped-to-IPv6.  */
 				if (his_addr.ss_family == $5
-#ifdef AI_V4MAPPED
 				    || ($5 == AF_INET6 && his_addr.ss_family == AF_INET)
 				    || ($5 == AF_INET && his_addr.ss_family == AF_INET6)
-#endif
 				    ) {
 					int err;
 					char p[8];
@@ -614,11 +612,6 @@ cmd
 					hints.ai_socktype = SOCK_STREAM;
 					hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV;
 
-#ifdef AI_V4MAPPED
-					if (his_addr.ss_family != $5)
-						hints.ai_flags |= AI_V4MAPPED;
-#endif
-
 					err = getaddrinfo ($7, p, &hints, &res);
 					if (err)
 						reply (500, "Illegal EPRT Command");
@@ -636,7 +629,6 @@ cmd
 							     sizeof (struct in6_addr)) == 0
 						  && ntohs (((struct sockaddr_in6 *) res->ai_addr)->sin6_port) > IPPORT_RESERVED
 						 )
-#ifdef AI_V4MAPPED
 						 ||
 						 (his_addr.ss_family == AF_INET && res->ai_family == AF_INET6
 						  && IN6_IS_ADDR_V4MAPPED (&((struct sockaddr_in6 *) res->ai_addr)->sin6_addr)
@@ -653,7 +645,6 @@ cmd
 							     sizeof (struct in_addr)) == 0
 						  && ntohs (((struct sockaddr_in *) res->ai_addr)->sin_port) > IPPORT_RESERVED
 						 )
-#endif /* AI_V4MAPPED */
 						)
 					{
 						/* In the case of IPv4 mapped as IPv6,

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

Summary of changes:
 ChangeLog     |    9 +++++++++
 README        |    3 +++
 ftpd/ftpcmd.y |    9 ---------
 3 files changed, 12 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Sun Feb 19 11:30:13 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rz9eP-0007dV-7Y
	for mharc-commit-inetutils@gnu.org; Sun, 19 Feb 2012 11:30:13 -0500
Received: from eggs.gnu.org ([140.186.70.92]:36422)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rz9eL-0007cd-8w
	for commit-inetutils@gnu.org; Sun, 19 Feb 2012 11:30:11 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rz9eJ-0005xv-Sk
	for commit-inetutils@gnu.org; Sun, 19 Feb 2012 11:30:09 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:42640)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rz9eJ-0005xn-OC
	for commit-inetutils@gnu.org; Sun, 19 Feb 2012 11:30:07 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1Rz9eI-0007V0-O0
	for commit-inetutils@gnu.org; Sun, 19 Feb 2012 16:30:07 +0000
Date: Sun, 19 Feb 2012 16:30:07 +0000
Message-Id: <E1Rz9eI-0007V0-O0@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-34-g6332b5f
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: c7d1ce3563946228f9c6d8a18fa4252a199f1bab
X-Git-Newrev: 6332b5f813bfe72855f5f476699053e22d13b512
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 19 Feb 2012 16:30:11 -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  6332b5f813bfe72855f5f476699053e22d13b512 (commit)
      from  c7d1ce3563946228f9c6d8a18fa4252a199f1bab (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=6332b5f813bfe72855f5f476699053e22d13b512


commit 6332b5f813bfe72855f5f476699053e22d13b512
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sun Feb 19 16:40:25 2012 +0100

    Use gnulib module sethostname.

diff --git a/ChangeLog b/ChangeLog
index 9527247..bdec92f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-19  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* bootstrap.conf (gnulib_modules): Add sethostname to list.
+
+	* tests/syslogd.sh: Sleep slightly before evaluating outcome.
+
 2012-02-18  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* README (Notes): Explicitly name extent of Shishi support.
diff --git a/bootstrap.conf b/bootstrap.conf
index d91b654..7a9fe5e 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -77,6 +77,7 @@ readutmp
 realloc-gnu
 regex
 setenv
+sethostname
 signal
 size_max
 snprintf
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index a362dd7..107b0f1 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -431,6 +431,9 @@ if $do_standard_port; then
 	"IPv6 to standard port. (pid $$)"
 fi
 
+# Delay detection due to observed race condition.
+sleep 1
+
 # Detection of registered messages.
 #
 COUNT=`grep "$TAG" "$OUT" | wc -l`

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

Summary of changes:
 ChangeLog        |    6 ++++++
 bootstrap.conf   |    1 +
 tests/syslogd.sh |    3 +++
 3 files changed, 10 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Mon Feb 20 15:39:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rza0j-000120-BH
	for mharc-commit-inetutils@gnu.org; Mon, 20 Feb 2012 15:39:01 -0500
Received: from eggs.gnu.org ([140.186.70.92]:47504)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rza0g-000105-7P
	for commit-inetutils@gnu.org; Mon, 20 Feb 2012 15:38:59 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rza0e-0006Qp-I2
	for commit-inetutils@gnu.org; Mon, 20 Feb 2012 15:38:58 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:53403)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rza0e-0006Qi-Dr
	for commit-inetutils@gnu.org; Mon, 20 Feb 2012 15:38:56 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1Rza0d-0004mk-Ip
	for commit-inetutils@gnu.org; Mon, 20 Feb 2012 20:38:55 +0000
Date: Mon, 20 Feb 2012 20:38:55 +0000
Message-Id: <E1Rza0d-0004mk-Ip@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-35-g1bf84e8
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6332b5f813bfe72855f5f476699053e22d13b512
X-Git-Newrev: 1bf84e836b2283d1fd783a4e6e5df77a9fe3b4e9
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 20 Feb 2012 20:38:59 -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  1bf84e836b2283d1fd783a4e6e5df77a9fe3b4e9 (commit)
      from  6332b5f813bfe72855f5f476699053e22d13b512 (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=1bf84e836b2283d1fd783a4e6e5df77a9fe3b4e9


commit 1bf84e836b2283d1fd783a4e6e5df77a9fe3b4e9
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Mon Feb 20 21:38:29 2012 +0100

    Address resolution and reduced linking.

diff --git a/ChangeLog b/ChangeLog
index bdec92f..f9ebb1a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-02-20  Mats Erik Andersson <gnu@gisladisker.se>
+
+	Improve behaviour of single stacked clients.
+	* ftp/ftp.c (hookup): Do not add AI_ADDRCONFIG to HINTS.ai_flags.
+	* src/logger.c (open_socket): Likewise.
+	* telnet/commands.c (tn): Likewise.
+
+	* telnet/Makefile.am, telnetd/Makefile.am (LDADD): Remove the
+	addition of `$(LIBREADLINE)': not needed.
+
 2012-02-19  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* bootstrap.conf (gnulib_modules): Add sethostname to list.
diff --git a/ftp/ftp.c b/ftp/ftp.c
index ee756fb..4f19563 100644
--- a/ftp/ftp.c
+++ b/ftp/ftp.c
@@ -136,10 +136,6 @@ hookup (char *host, int port)
   hints.ai_family = usefamily;
   hints.ai_socktype = SOCK_STREAM;
   hints.ai_flags = AI_CANONNAME;
-#ifdef AI_ADDRCONFIG
-  if (hints.ai_family == AF_UNSPEC)
-    hints.ai_flags |= AI_ADDRCONFIG;
-#endif /* AI_ADDRCONFIG */
 
   status = getaddrinfo (host, portstr, &hints, &res);
   if (status)
diff --git a/src/logger.c b/src/logger.c
index 2d3185f..7271f4b 100644
--- a/src/logger.c
+++ b/src/logger.c
@@ -206,10 +206,6 @@ open_socket (void)
        * was made with !HAVE_IPV6.  */
       hints.ai_family = host_family;
 
-# ifdef AI_ADDRCONFIG
-      hints.ai_flags = AI_ADDRCONFIG;
-# endif
-
       /* The complete handshake is attempted within
        * a single while-loop, since the answers from
        * getaddrinfo() need to be checked in detail.  */
diff --git a/telnet/Makefile.am b/telnet/Makefile.am
index 764f8cd..382f265 100644
--- a/telnet/Makefile.am
+++ b/telnet/Makefile.am
@@ -30,4 +30,4 @@ noinst_HEADERS = defines.h externs.h general.h ring.h types.h
 INCLUDES = $(iu_INCLUDES) $(NCURSES_INCLUDE)
 AM_CPPFLAGS = -DTERMCAP -DLINEMODE -DKLUDGELINEMODE -DENV_HACK
 
-LDADD = $(iu_LIBRARIES) $(top_builddir)/libtelnet/libtelnet.a $(LIBTERMCAP) $(LIBCRYPT) $(LIBAUTH) $(LIBREADLINE)
+LDADD = $(iu_LIBRARIES) $(top_builddir)/libtelnet/libtelnet.a $(LIBTERMCAP) $(LIBCRYPT) $(LIBAUTH)
diff --git a/telnet/commands.c b/telnet/commands.c
index aca45ca..e6dec38 100644
--- a/telnet/commands.c
+++ b/telnet/commands.c
@@ -2555,9 +2555,6 @@ tn (int argc, char *argv[])
     }
 
 #ifdef IPV6
-# ifdef AI_ADDRCONFIG
-  hints.ai_flags = AI_ADDRCONFIG;
-# endif
   hints.ai_socktype = SOCK_STREAM;
 
   err = getaddrinfo (hostp, portp, &hints, &result);
diff --git a/telnetd/Makefile.am b/telnetd/Makefile.am
index cbbf640..7fce7ba 100644
--- a/telnetd/Makefile.am
+++ b/telnetd/Makefile.am
@@ -32,4 +32,4 @@ noinst_HEADERS = telnetd.h
 AM_CPPFLAGS = $(PATHDEF_DEV) $(PATHDEF_TTY) $(PATHDEF_LOGIN)
 INCLUDES = $(iu_INCLUDES) -I$(top_srcdir) $(INCAUTH) $(NCURSES_INCLUDE)
 
-LDADD = $(iu_LIBRARIES) $(top_builddir)/libtelnet/libtelnet.a $(LIBTERMCAP) $(LIBUTIL) $(LIBCRYPT) $(LIBAUTH) $(LIBREADLINE)
+LDADD = $(iu_LIBRARIES) $(top_builddir)/libtelnet/libtelnet.a $(LIBTERMCAP) $(LIBUTIL) $(LIBCRYPT) $(LIBAUTH)

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

Summary of changes:
 ChangeLog           |   10 ++++++++++
 ftp/ftp.c           |    4 ----
 src/logger.c        |    4 ----
 telnet/Makefile.am  |    2 +-
 telnet/commands.c   |    3 ---
 telnetd/Makefile.am |    2 +-
 6 files changed, 12 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Tue Feb 21 06:34:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RznzW-0003qq-CS
	for mharc-commit-inetutils@gnu.org; Tue, 21 Feb 2012 06:34:42 -0500
Received: from eggs.gnu.org ([140.186.70.92]:44139)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RznzO-0003qA-Af
	for commit-inetutils@gnu.org; Tue, 21 Feb 2012 06:34:40 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RznzC-0007Aq-Bt
	for commit-inetutils@gnu.org; Tue, 21 Feb 2012 06:34:34 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:41192)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RznzC-0007Ag-9k
	for commit-inetutils@gnu.org; Tue, 21 Feb 2012 06:34:22 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1Rznz2-0006Dj-VK
	for commit-inetutils@gnu.org; Tue, 21 Feb 2012 11:34:21 +0000
Date: Tue, 21 Feb 2012 11:34:13 +0000
Message-Id: <E1Rznz2-0006Dj-VK@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-36-gb4a938f
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 1bf84e836b2283d1fd783a4e6e5df77a9fe3b4e9
X-Git-Newrev: b4a938fe77fd0a59e9f0a37eb704856d00be3d35
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 21 Feb 2012 11:34: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  b4a938fe77fd0a59e9f0a37eb704856d00be3d35 (commit)
      from  1bf84e836b2283d1fd783a4e6e5df77a9fe3b4e9 (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=b4a938fe77fd0a59e9f0a37eb704856d00be3d35


commit b4a938fe77fd0a59e9f0a37eb704856d00be3d35
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Tue Feb 21 12:31:25 2012 +0100

    Basic telnet test.

diff --git a/ChangeLog b/ChangeLog
index f9ebb1a..b554f65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2012-02-21  Mats Erik Andersson <gnu@gisladisker.se>
+
+	Basic test case for `telnet'.
+	* tests/Makefile.am (dist_check_SCRIPTS) [ENABLE_inetd && ENABLE_telnet]:
+	Added telnet-localhost.sh.
+	* tests/telnet-localhost.sh: New file.
+
+	* tests/ftp-localhost.sh (posttesting): Use SIGTERM first, then SIGKILL.
+	(locate_port): Adapt regex alternate pattern for legacy `grep'.
+	* tests/syslogd.sh (clean_testdir, locate_port): Likewise.
+	* tests/tftp.sh (posttesting, locate_port): Likewise.
+
 2012-02-20  Mats Erik Andersson <gnu@gisladisker.se>
 
 	Improve behaviour of single stacked clients.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 38a0c04..043e790 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -54,6 +54,12 @@ endif
 endif
 endif
 
+if ENABLE_inetd
+if ENABLE_telnet
+dist_check_SCRIPTS += telnet-localhost.sh
+endif
+endif
+
 if ENABLE_hostname
 dist_check_SCRIPTS += hostname.sh
 endif
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index f4cd71b..6d22d35 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -160,7 +160,8 @@ TMPDIR=`mktemp -d $PWD/tmp.XXXXXXXXXX` ||
 posttesting () {
     test -n "$TMPDIR" && test -f "$TMPDIR/inetd.pid" \
 	&& test -r "$TMPDIR/inetd.pid" \
-	&& kill -9 "`cat $TMPDIR/inetd.pid`"
+	&& { kill "`cat $TMPDIR/inetd.pid`" \
+	     || kill -9 "`cat $TMPDIR/inetd.pid`"; }
     test -n "$TMPDIR" && test -d "$TMPDIR" && rm -rf "$TMPDIR"
 }
 
@@ -175,7 +176,7 @@ locate_port () {
 	grep "\.$1[^0-9]" >/dev/null 2>&1
     else
 	netstat -na |
-	grep "^$2\(4\|6\|46\)\{0,1\}.*[^0-9]$1[^0-9]" >/dev/null 2>&1
+	grep "^$2[46]\{0,2\}.*[^0-9]$1[^0-9]" >/dev/null 2>&1
     fi
 }
 
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index 107b0f1..ba96b18 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -160,7 +160,7 @@ fi
 #
 clean_testdir () {
     if test -f "$PID" && ps "`cat "$PID"`" >/dev/null 2>&1; then
-	kill -9 "`cat "$PID"`"
+	kill "`cat "$PID"`" || kill -9 "`cat "$PID"`"
     fi
     if test -z "${NOCLEAN+no}" && $do_cleandir; then
 	rm -r -f "$IU_TESTDIR"
@@ -187,7 +187,7 @@ locate_port () {
 	grep "\.$2[^0-9]" >/dev/null 2>&1
     else
 	netstat -na |
-	grep "^$1\(4\|6\|46\)\{0,1\}.*[^0-9]$2[^0-9]" >/dev/null 2>&1
+	grep "^$1[46]\{0,2\}.*[^0-9]$2[^0-9]" >/dev/null 2>&1
     fi
 }
 
diff --git a/tests/telnet-localhost.sh b/tests/telnet-localhost.sh
new file mode 100755
index 0000000..fb5559d
--- /dev/null
+++ b/tests/telnet-localhost.sh
@@ -0,0 +1,185 @@
+#!/bin/sh
+
+# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+#
+# This file is part of GNU Inetutils.
+#
+# GNU Inetutils is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or (at
+# your option) any later version.
+#
+# GNU Inetutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see `http://www.gnu.org/licenses/'.
+
+# Test the TELNET client as connection vehicle!
+#
+# Written by Mats Erik Andersson.
+
+# Prerequisites:
+#
+#  * Shell: SVR4 Bourne shell, or newer.
+#
+#  * cat(1), expr(1), head(1), kill(1), pwd(1), rm(1).
+#
+#  * id(1), grep(1), mktemp(1), ps(1).
+
+# Is usage explanation in demand?
+#
+if test "$1" = "-h" || test "$1" = "--help" || test "$1" = "--usage"; then
+    cat <<HERE
+Minimal test for TELNET client.
+
+The following environment variables are used:
+
+VERBOSE		Be verbose, if set.
+TARGET4		Receiving IPv4 address.
+TARGET6		Receiving IPv6 address.
+
+HERE
+    exit 0
+fi
+
+# The executables under test.
+#
+INETD=../src/inetd$EXEEXT
+TELNET=../telnet/telnet$EXEEXT
+ADDRPEEK=./addrpeek$EXEEXT
+
+# Selected targets.
+TARGET4=${TARGET4:-127.0.0.1}
+TARGET6=${TARGET6:-::1}
+TARGET46="::ffff:$TARGET4"
+
+# Step into `tests/', should the invokation
+# have been made outside of it.
+#
+test -d src && test -f tests/telnet-localhost.sh && cd tests/
+
+if test -n "$VERBOSE"; then
+    set -x
+    $INETD --version | head -1
+    $TELNET --version | head -1
+fi
+
+if test ! -x $INETD; then
+    echo "Missing executable '$INETD'.  Skipping." >&2
+    exit 77
+fi
+
+if test ! -x $TELNET; then
+    echo "Missing executable '$TELNET'.  Skipping." >&2
+    exit 77
+fi
+
+if test ! -x $ADDRPEEK; then
+    echo "Missing executable '$ADDRPEEK'.  Skipping." >&2
+    exit 77
+fi
+
+# Portability fix for SVR4
+PWD="${PWD:-`pwd`}"
+
+# For file creation below IU_TESTDIR.
+umask 0077
+
+USER=`id -u -n`
+
+# Random base directory at testing time.
+TMPDIR=`mktemp -d $PWD/tmp.XXXXXXXXXX` ||
+    {
+	echo 'Failed at creating test directory.  Aborting.' >&2
+	exit 1
+    }
+
+INETD_CONF="$TMPDIR/inetd.conf"
+INETD_PID="$TMPDIR/inetd.pid.$$"
+
+posttesting () {
+    if test -n "$TMPDIR" && test -f "$INETD_PID" \
+	&& test -r "$INETD_PID" \
+	&& ps "`cat $INETD_PID`" >/dev/null 2>&1
+    then
+	kill "`cat $INETD_PID`" >/dev/null 2>&1 ||
+	kill -9 "`cat $INETD_PID`" >/dev/null 2>&1
+    fi
+    test -n "$TMPDIR" && test -d "$TMPDIR" \
+	&& rm -rf "$TMPDIR" $FILELIST
+}
+
+trap posttesting EXIT HUP INT QUIT TERM
+
+PORT=`expr 4973 + ${RANDOM:-$$} % 973`
+
+cat > "$INETD_CONF" <<-EOF ||
+	$PORT stream tcp4 nowait $USER $ADDRPEEK addrpeek addr
+	$PORT stream tcp6 nowait $USER $ADDRPEEK addrpeek addr
+EOF
+    {
+	echo 'Could not create configuration file for Inetd.  Aborting.' >&2
+	exit 1
+    }
+
+# Must use '-d' consistently to prevent daemonizing, but we
+# would like to suppress the verbose output.
+#
+# In non-verbose mode the variables `display' and `display_err'
+# redirect output streams to `/dev/null'.
+
+test -n "${VERBOSE+yes}" || display='>/dev/null'
+test -n "${VERBOSE+yes}" || display_err='2>/dev/null'
+
+
+eval "$INETD -d -p'$INETD_PID' '$INETD_CONF' $display_err &"
+
+# Debug mode allows the shell to recover PID of Inetd.
+spawned_pid=$!
+
+# Wait somewhat for the service to settle.
+sleep 2
+
+inetd_pid="`cat $INETD_PID 2>/dev/null`" ||
+    {
+	cat <<-EOT >&2
+		Inetd did not create a PID-file.  Aborting test,
+		but loosing control whether an Inetd process is
+		still around.
+	EOT
+	exit 1
+    }
+
+test -z "$VERBOSE" || echo "Launched Inetd as process $inetd_pid." >&2
+
+telnet_opts="--no-rc --no-escape --no-login"
+
+errno=0
+
+test -z "$TARGET4" || {
+    $TELNET $telnet_opts $TARGET4 $PORT 2>/dev/null |
+    eval "grep 'Your address is $TARGET4.' $display"  || {
+	errno=1
+	echo "Failed at '$TARGET4'." >&2
+    }
+}
+
+test -z "$TARGET6" || {
+    $TELNET $telnet_opts $TARGET6 $PORT 2>/dev/null |
+    eval "grep 'Your address is $TARGET6.' $display"  || {
+	errno=1
+	echo "Failed at '$TARGET6'." >&2
+    }
+}
+
+test -z "$TARGET46" || {
+    $TELNET $telnet_opts $TARGET46 $PORT 2>/dev/null |
+    eval "grep 'Your address is .*$TARGET4.' $display" || {
+	echo "Informational: Unsuccessful with mapped address '$TARGET46'." >&2
+    }
+}
+
+exit $errno
diff --git a/tests/tftp.sh b/tests/tftp.sh
index d084e52..2c2f4ee 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -117,6 +117,7 @@ posttesting () {
 	&& test -r "$INETD_PID" \
 	&& ps "`cat $INETD_PID`" >/dev/null 2>&1
     then
+	kill "`cat $INETD_PID`" 2>/dev/null ||
 	kill -9 "`cat $INETD_PID`" 2>/dev/null
     fi
     test -n "$TMPDIR" && test -d "$TMPDIR" \
@@ -148,7 +149,7 @@ locate_port () {
 	grep "\.$2[^0-9]" >/dev/null 2>&1
     else
 	netstat -na |
-	grep "^$1\(4\|6\|46\)\{0,1\}.*[^0-9]$2[^0-9]" >/dev/null 2>&1
+	grep "^$1[46]\{0,2\}.*[^0-9]$2[^0-9]" >/dev/null 2>&1
     fi
 }
 

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

Summary of changes:
 ChangeLog                 |   12 +++
 tests/Makefile.am         |    6 ++
 tests/ftp-localhost.sh    |    5 +-
 tests/syslogd.sh          |    4 +-
 tests/telnet-localhost.sh |  185 +++++++++++++++++++++++++++++++++++++++++++++
 tests/tftp.sh             |    3 +-
 6 files changed, 210 insertions(+), 5 deletions(-)
 create mode 100755 tests/telnet-localhost.sh


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Tue Feb 21 16:19:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rzx7l-0004cH-DU
	for mharc-commit-inetutils@gnu.org; Tue, 21 Feb 2012 16:19:49 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45826)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rzx7d-0004bw-Af
	for commit-inetutils@gnu.org; Tue, 21 Feb 2012 16:19:47 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rzx7X-0001vl-Bb
	for commit-inetutils@gnu.org; Tue, 21 Feb 2012 16:19:41 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:47794)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rzx7X-0001vf-9y
	for commit-inetutils@gnu.org; Tue, 21 Feb 2012 16:19:35 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1Rzx7W-00082F-9j
	for commit-inetutils@gnu.org; Tue, 21 Feb 2012 21:19:34 +0000
Date: Tue, 21 Feb 2012 21:19:34 +0000
Message-Id: <E1Rzx7W-00082F-9j@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-37-g3458bc5
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b4a938fe77fd0a59e9f0a37eb704856d00be3d35
X-Git-Newrev: 3458bc5b5f1b244920001fb253011c33c32f4113
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 21 Feb 2012 21:19:47 -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  3458bc5b5f1b244920001fb253011c33c32f4113 (commit)
      from  b4a938fe77fd0a59e9f0a37eb704856d00be3d35 (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=3458bc5b5f1b244920001fb253011c33c32f4113


commit 3458bc5b5f1b244920001fb253011c33c32f4113
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Tue Feb 21 22:18:24 2012 +0100

    tests/telnet-localhost.sh: Assure active TTY.

diff --git a/ChangeLog b/ChangeLog
index b554f65..24c4d78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-02-21  Mats Erik Andersson <gnu@gisladisker.se>
 
+	* tests/telnet-localhost.sh: Skip test in absence of assigned TTY.
+	Rewrite case evaluation without nested pipelines and OR connectives.
+
+2012-02-21  Mats Erik Andersson <gnu@gisladisker.se>
+
 	Basic test case for `telnet'.
 	* tests/Makefile.am (dist_check_SCRIPTS) [ENABLE_inetd && ENABLE_telnet]:
 	Added telnet-localhost.sh.
diff --git a/tests/telnet-localhost.sh b/tests/telnet-localhost.sh
index fb5559d..ca4f1db 100755
--- a/tests/telnet-localhost.sh
+++ b/tests/telnet-localhost.sh
@@ -27,7 +27,7 @@
 #
 #  * cat(1), expr(1), head(1), kill(1), pwd(1), rm(1).
 #
-#  * id(1), grep(1), mktemp(1), ps(1).
+#  * id(1), grep(1), mktemp(1), ps(1), tty(1).
 
 # Is usage explanation in demand?
 #
@@ -67,18 +67,26 @@ if test -n "$VERBOSE"; then
     $TELNET --version | head -1
 fi
 
+# The use of telnet is portable only with a connected TTY.
+if tty >/dev/null; then
+    :
+else
+    echo 'No TTY assigned to this process.  Skipping test.' >&2
+    exit 77
+fi
+
 if test ! -x $INETD; then
-    echo "Missing executable '$INETD'.  Skipping." >&2
+    echo "Missing executable '$INETD'.  Skipping test." >&2
     exit 77
 fi
 
 if test ! -x $TELNET; then
-    echo "Missing executable '$TELNET'.  Skipping." >&2
+    echo "Missing executable '$TELNET'.  Skipping test." >&2
     exit 77
 fi
 
 if test ! -x $ADDRPEEK; then
-    echo "Missing executable '$ADDRPEEK'.  Skipping." >&2
+    echo "Missing executable '$ADDRPEEK'.  Skipping test." >&2
     exit 77
 fi
 
@@ -159,27 +167,30 @@ telnet_opts="--no-rc --no-escape --no-login"
 
 errno=0
 
-test -z "$TARGET4" || {
-    $TELNET $telnet_opts $TARGET4 $PORT 2>/dev/null |
-    eval "grep 'Your address is $TARGET4.' $display"  || {
+if test -n "$TARGET4"; then
+    output=`$TELNET $telnet_opts $TARGET4 $PORT 2>/dev/null`
+    echo "$output" | eval "grep 'Your address is $TARGET4.' $display"
+    if test $? -ne 0; then
 	errno=1
 	echo "Failed at '$TARGET4'." >&2
-    }
-}
+    fi
+fi
 
-test -z "$TARGET6" || {
-    $TELNET $telnet_opts $TARGET6 $PORT 2>/dev/null |
-    eval "grep 'Your address is $TARGET6.' $display"  || {
+if test -n "$TARGET6"; then
+    output=`$TELNET $telnet_opts $TARGET6 $PORT 2>/dev/null`
+    echo "$output" | eval "grep 'Your address is $TARGET6.' $display"
+    if test $? -ne 0; then
 	errno=1
 	echo "Failed at '$TARGET6'." >&2
-    }
-}
+    fi
+fi
 
-test -z "$TARGET46" || {
-    $TELNET $telnet_opts $TARGET46 $PORT 2>/dev/null |
-    eval "grep 'Your address is .*$TARGET4.' $display" || {
+if test -n "$TARGET46"; then
+    output=`$TELNET $telnet_opts $TARGET46 $PORT 2>/dev/null`
+    echo "$output" | eval "grep 'Your address is .*$TARGET4.' $display"
+    if test $? -ne 0; then
 	echo "Informational: Unsuccessful with mapped address '$TARGET46'." >&2
-    }
-}
+    fi
+fi
 
 exit $errno

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

Summary of changes:
 ChangeLog                 |    5 ++++
 tests/telnet-localhost.sh |   49 +++++++++++++++++++++++++++-----------------
 2 files changed, 35 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed Feb 22 15:07:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0ITV-0006bf-QX
	for mharc-commit-inetutils@gnu.org; Wed, 22 Feb 2012 15:07:41 -0500
Received: from eggs.gnu.org ([140.186.70.92]:51205)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1S0ITS-0006az-Ev
	for commit-inetutils@gnu.org; Wed, 22 Feb 2012 15:07:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1S0ITQ-0008QZ-LO
	for commit-inetutils@gnu.org; Wed, 22 Feb 2012 15:07:38 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:53985)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1S0ITQ-0008QV-Jf
	for commit-inetutils@gnu.org; Wed, 22 Feb 2012 15:07:36 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1S0ITQ-0005gw-2P
	for commit-inetutils@gnu.org; Wed, 22 Feb 2012 20:07:36 +0000
Date: Wed, 22 Feb 2012 20:07:36 +0000
Message-Id: <E1S0ITQ-0005gw-2P@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-38-g11d3a32
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 3458bc5b5f1b244920001fb253011c33c32f4113
X-Git-Newrev: 11d3a32f9832bbd09d4a25a9d8bfc18fdfbea2a9
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Feb 2012 20:07: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  11d3a32f9832bbd09d4a25a9d8bfc18fdfbea2a9 (commit)
      from  3458bc5b5f1b244920001fb253011c33c32f4113 (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=11d3a32f9832bbd09d4a25a9d8bfc18fdfbea2a9


commit 11d3a32f9832bbd09d4a25a9d8bfc18fdfbea2a9
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed Feb 22 19:30:13 2012 +0100

    inetd: Allow runtime group identity.

diff --git a/ChangeLog b/ChangeLog
index 24c4d78..5497fba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2012-02-22  Mats Erik Andersson <gnu@gisladisker.se>
+
+	Implement group assignment for services.
+	* src/inetd.c (struct servtab): New component `char *se_group'.
+	(run_service): New variable GRP.  Check existence of `sep->se_group'.
+	If valid, then apply setgid() to `grp->gr_gid' instead of `pwd->pw_gid'.
+	[HAVE_INITGROUPS] <initgroups>: Use `grp->gr_id' if an explicit group
+	was stated, otherwise use `pwd->pw_gid'.
+	(print_service): Display also group membership.
+	(enter, freeconfig): Add string handling for groups.
+	(getconfigent): Parse user string for an optional group component.
+	(nextconfig): Assure that an assigned group really exists.
+	(fix_tcpmux): Add empty group string.
+	* doc/inetutils.texi (inetd configuration file): Add setting of group.
+
 2012-02-21  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* tests/telnet-localhost.sh: Skip test in absence of assigned TTY.
diff --git a/doc/inetutils.texi b/doc/inetutils.texi
index 2fb2e0b..0c44e0c 100644
--- a/doc/inetutils.texi
+++ b/doc/inetutils.texi
@@ -2230,13 +2230,15 @@ e.g.: @samp{nowait.15}.
 Stream-based servers that use @samp{wait} are started with the
 listening service socket, and must accept at least one connection
 request before exiting.  Such a server would normally accept and
-process incoming connection requests until a timeout.  services must
-use @samp{nowait}.
+process incoming connection requests until a timeout.
+Other services must use @samp{nowait}.
 
 @item user
 The user entry should contain the user name of the user as whom the
 server should run.  This allows for servers to be given less
-permission than root.
+permission than root.  An optional form includes also a group name
+as a suffix, separated from the user name by colon or a period, i.e.,
+@samp{user:group} or @samp{user.group}.
 
 @item server program
 The server-program entry should contain the pathname of the program
diff --git a/src/inetd.c b/src/inetd.c
index 315fa1b..fe221da 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -76,7 +76,7 @@
  *	protocol			must be in /etc/protocols
  *	wait/nowait[.max]		single-threaded/multi-threaded
  *                                      [with an optional fork limit]
- *	user				user to run daemon as
+ *	user[:group] or user[.group]	user (and group) to run daemon as
  *	server program			full path name
  *	server program arguments	arguments starting with argv[0]
  *
@@ -258,6 +258,7 @@ struct servtab
   unsigned se_max;              /* Maximum number of instances per CNT_INTVL */
   short se_checked;		/* looked at during merge */
   char *se_user;		/* user name to run as */
+  char *se_group;		/* group name to run as */
   struct biltin *se_bi;		/* if built-in, description */
   char *se_server;		/* server program */
   char **se_argv;		/* program arguments */
@@ -413,6 +414,7 @@ void
 run_service (int ctrl, struct servtab *sep)
 {
   struct passwd *pwd;
+  struct group *grp = NULL;
   char buf[50];
 
   if (sep->se_bi)
@@ -435,16 +437,37 @@ run_service (int ctrl, struct servtab *sep)
 	    recv (0, buf, sizeof buf, 0);
 	  _exit (1);
 	}
+      if (sep->se_group && *sep->se_group)
+	{
+	  if ((grp = getgrnam (sep->se_group)) == NULL)
+	    {
+	      syslog (LOG_ERR, "%s/%s: %s: No such group",
+		      sep->se_service, sep->se_proto, sep->se_group);
+	      if (sep->se_socktype != SOCK_STREAM)
+		recv (0, buf, sizeof buf, 0);
+	      _exit (1);
+	    }
+	}
       if (pwd->pw_uid)
 	{
-	  if (setgid (pwd->pw_gid) < 0)
+	  if (grp && grp->gr_gid)
+	    {
+	      if (setgid (grp->gr_gid) < 0)
+		{
+		  syslog (LOG_ERR, "%s: can't set gid %d: %m",
+			  sep->se_service, grp->gr_gid);
+		  _exit (1);
+		}
+	    }
+	  else if (setgid (pwd->pw_gid) < 0)
 	    {
 	      syslog (LOG_ERR, "%s: can't set gid %d: %m",
 		      sep->se_service, pwd->pw_gid);
 	      _exit (1);
 	    }
 #ifdef HAVE_INITGROUPS
-	  initgroups (pwd->pw_name, pwd->pw_gid);
+	  initgroups (pwd->pw_name,
+		      (grp && grp->gr_gid) ? grp->gr_gid : pwd->pw_gid);
 #endif
 	  if (setuid (pwd->pw_uid) < 0)
 	    {
@@ -536,13 +559,13 @@ void
 print_service (const char *action, struct servtab *sep)
 {
   fprintf (stderr,
-	   "%s:%d: %s: %s:%s proto=%s, wait=%d, max=%u, user=%s builtin=%s server=%s\n",
+	   "%s:%d: %s: %s:%s proto=%s, wait=%d, max=%u, user=%s group=%s builtin=%s server=%s\n",
 	   sep->se_file, sep->se_line,
 	   action,
 	   ISMUX (sep) ? (ISMUXPLUS (sep) ? "tcpmuxplus" : "tcpmux")
 		      : (sep->se_node ? sep->se_node : "*"),
 	   sep->se_service, sep->se_proto,
-	   sep->se_wait, sep->se_max, sep->se_user,
+	   sep->se_wait, sep->se_max, sep->se_user, sep->se_group,
 	   sep->se_bi ? sep->se_bi->bi_service : "no",
 	   sep->se_server);
 }
@@ -709,6 +732,8 @@ enter (struct servtab *cp)
 #define SWAP(a, b) { char *c = a; a = b; b = c; }
       if (cp->se_user)
 	SWAP (sep->se_user, cp->se_user);
+      if (cp->se_group)
+	SWAP (sep->se_group, cp->se_group);
       if (cp->se_server)
 	SWAP (sep->se_server, cp->se_server);
       argcv_free (sep->se_argc, sep->se_argv);
@@ -737,6 +762,7 @@ enter (struct servtab *cp)
   dupstr (&sep->se_service);
   dupstr (&sep->se_proto);
   dupstr (&sep->se_user);
+  dupstr (&sep->se_group);
   dupstr (&sep->se_server);
   dupmem ((void**)&sep->se_argv, sep->se_argc * sizeof (sep->se_argv[0]));
   for (i = 0; i < sep->se_argc; i++)
@@ -885,6 +911,7 @@ freeconfig (struct servtab *cp)
   free (cp->se_service);
   free (cp->se_proto);
   free (cp->se_user);
+  free (cp->se_group);
   free (cp->se_server);
   argcv_free (cp->se_argc, cp->se_argv);
 }
@@ -1126,7 +1153,27 @@ getconfigent (FILE *fconfig, const char *file, size_t *line)
 	    }
 	}
 
-      sep->se_user = newstr (argv[INETD_USER]);
+      /* Establish optional group identity:
+       *   user:group, user.group
+       */
+      {
+	char *p;
+
+	sep->se_user = newstr (argv[INETD_USER]);
+
+	p = strchr (sep->se_user, ':');
+	if (!p)
+	  p = strchr (sep->se_user, '.');
+
+	if (p)
+	  {
+	    *p = '\0';
+	    sep->se_group = newstr (++p);
+	  }
+	else
+	  sep->se_group = newstr (NULL);
+      }
+
       sep->se_server = newstr (argv[INETD_SERVER_PATH]);
       if (strcmp (sep->se_server, "internal") == 0)
 	{
@@ -1183,6 +1230,7 @@ nextconfig (const char *file)
 #endif
   struct servtab *sep, **sepp;
   struct passwd *pwd;
+  struct group *grp;
   FILE *fconfig;
   SIGSTATUS sigstatus;
 
@@ -1202,6 +1250,15 @@ nextconfig (const char *file)
 		  sep->se_service, sep->se_proto, sep->se_user);
 	  continue;
 	}
+      if (sep->se_group && *sep->se_group)
+	{
+	  if ((grp = getgrnam (sep->se_group)) == NULL)
+	    {
+	      syslog (LOG_ERR, "%s/%s: No such group '%s', service ignored",
+		      sep->se_service, sep->se_proto, sep->se_group);
+	      continue;
+	    }
+	}
       if (ISMUX (sep))
 	{
 	  sep->se_fd = -1;
@@ -1275,6 +1332,7 @@ fix_tcpmux (void)
       serv.se_socktype = SOCK_STREAM;
       serv.se_checked = 1;
       serv.se_user = newstr ("root");
+      serv.se_group = newstr (NULL);	/* Group name for root is not portable.  */
       serv.se_bi = bi_lookup (&serv);
       if (!serv.se_bi)
 	{

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

Summary of changes:
 ChangeLog          |   15 +++++++++++
 doc/inetutils.texi |    8 +++--
 src/inetd.c        |   70 +++++++++++++++++++++++++++++++++++++++++++++++----
 3 files changed, 84 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed Feb 22 16:06:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S0JNx-0003nM-LH
	for mharc-commit-inetutils@gnu.org; Wed, 22 Feb 2012 16:06:01 -0500
Received: from eggs.gnu.org ([140.186.70.92]:34235)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1S0JNt-0003mh-Ol
	for commit-inetutils@gnu.org; Wed, 22 Feb 2012 16:05:58 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1S0JNr-00068R-4n
	for commit-inetutils@gnu.org; Wed, 22 Feb 2012 16:05:57 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:35192)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1S0JNr-00068N-3C
	for commit-inetutils@gnu.org; Wed, 22 Feb 2012 16:05:55 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1S0JNr-00050c-4s
	for commit-inetutils@gnu.org; Wed, 22 Feb 2012 21:05:55 +0000
Date: Wed, 22 Feb 2012 21:05:55 +0000
Message-Id: <E1S0JNr-00050c-4s@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-39-g75ba6bd
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 11d3a32f9832bbd09d4a25a9d8bfc18fdfbea2a9
X-Git-Newrev: 75ba6bd5ed59473ddebe595cb056c9fd262bcac8
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Feb 2012 21:05:59 -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  75ba6bd5ed59473ddebe595cb056c9fd262bcac8 (commit)
      from  11d3a32f9832bbd09d4a25a9d8bfc18fdfbea2a9 (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=75ba6bd5ed59473ddebe595cb056c9fd262bcac8


commit 75ba6bd5ed59473ddebe595cb056c9fd262bcac8
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed Feb 22 21:54:03 2012 +0100

    Test script review.

diff --git a/ChangeLog b/ChangeLog
index 5497fba..10d1fce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2012-02-22  Mats Erik Andersson <gnu@gisladisker.se>
 
+	* tests/ping-localhost.sh, tests/traceroute-localhost.sh: Mend string
+	quotation for expected variable expansion.
+	* tests/syslogd.sh (SYSLOGD, LOGGER): Allow value overriding.
+	* tests/telnet-localhost.sh (INETD, TELNET, ADDRPEEK): Likewise.
+	(TARGET): New variable, replacing previous TARGET4.
+
+2012-02-22  Mats Erik Andersson <gnu@gisladisker.se>
+
 	Implement group assignment for services.
 	* src/inetd.c (struct servtab): New component `char *se_group'.
 	(run_service): New variable GRP.  Check existence of `sep->se_group'.
diff --git a/tests/ping-localhost.sh b/tests/ping-localhost.sh
index 75c7839..c78fa0f 100755
--- a/tests/ping-localhost.sh
+++ b/tests/ping-localhost.sh
@@ -30,7 +30,7 @@ PING6=${PING6:-../ping/ping6$EXEEXT}
 TARGET6=${TARGET6:-::1}
 
 if [ ! -x $PING ]; then
-    echo 'No executable "$PING" available.  Skipping test.' >&2
+    echo 'No executable "'$PING'" available.  Skipping test.' >&2
     exit 77
 fi
 
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index ba96b18..add498c 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -83,8 +83,8 @@ fi
 
 # The executables under test.
 #
-SYSLOGD=../src/syslogd$EXEEXT
-LOGGER=../src/logger$EXEEXT
+SYSLOGD=${SYSLOGD:-../src/syslogd$EXEEXT}
+LOGGER=${LOGGER:-../src/logger$EXEEXT}
 
 # Step into `tests/', should the invokation
 # have been made outside of it.
diff --git a/tests/telnet-localhost.sh b/tests/telnet-localhost.sh
index ca4f1db..01cac1e 100755
--- a/tests/telnet-localhost.sh
+++ b/tests/telnet-localhost.sh
@@ -38,7 +38,7 @@ Minimal test for TELNET client.
 The following environment variables are used:
 
 VERBOSE		Be verbose, if set.
-TARGET4		Receiving IPv4 address.
+TARGET		Receiving IPv4 address.
 TARGET6		Receiving IPv6 address.
 
 HERE
@@ -47,14 +47,14 @@ fi
 
 # The executables under test.
 #
-INETD=../src/inetd$EXEEXT
-TELNET=../telnet/telnet$EXEEXT
-ADDRPEEK=./addrpeek$EXEEXT
+INETD=${INETD:-../src/inetd$EXEEXT}
+TELNET=${TELNET:-../telnet/telnet$EXEEXT}
+ADDRPEEK=${ADDRPEEK:-./addrpeek$EXEEXT}
 
 # Selected targets.
-TARGET4=${TARGET4:-127.0.0.1}
+TARGET=${TARGET:-127.0.0.1}
 TARGET6=${TARGET6:-::1}
-TARGET46="::ffff:$TARGET4"
+TARGET46="::ffff:$TARGET"
 
 # Step into `tests/', should the invokation
 # have been made outside of it.
@@ -167,12 +167,12 @@ telnet_opts="--no-rc --no-escape --no-login"
 
 errno=0
 
-if test -n "$TARGET4"; then
-    output=`$TELNET $telnet_opts $TARGET4 $PORT 2>/dev/null`
-    echo "$output" | eval "grep 'Your address is $TARGET4.' $display"
+if test -n "$TARGET"; then
+    output=`$TELNET $telnet_opts $TARGET $PORT 2>/dev/null`
+    echo "$output" | eval "grep 'Your address is $TARGET.' $display"
     if test $? -ne 0; then
 	errno=1
-	echo "Failed at '$TARGET4'." >&2
+	echo "Failed at '$TARGET'." >&2
     fi
 fi
 
@@ -187,7 +187,7 @@ fi
 
 if test -n "$TARGET46"; then
     output=`$TELNET $telnet_opts $TARGET46 $PORT 2>/dev/null`
-    echo "$output" | eval "grep 'Your address is .*$TARGET4.' $display"
+    echo "$output" | eval "grep 'Your address is .*$TARGET.' $display"
     if test $? -ne 0; then
 	echo "Informational: Unsuccessful with mapped address '$TARGET46'." >&2
     fi
diff --git a/tests/traceroute-localhost.sh b/tests/traceroute-localhost.sh
index 6b254f9..1379251 100755
--- a/tests/traceroute-localhost.sh
+++ b/tests/traceroute-localhost.sh
@@ -27,7 +27,7 @@ TRACEROUTE=${TRACEROUTE:-../src/traceroute$EXEEXT}
 TARGET=${TARGET:-127.0.0.1}
 
 if [ ! -x $TRACEROUTE ]; then
-    echo 'No executable "$TRACEROUTE" available.  Skipping test.' >&2
+    echo 'No executable "'$TRACEROUTE'" available.  Skipping test.' >&2
     exit 77
 fi
 

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

Summary of changes:
 ChangeLog                     |    8 ++++++++
 tests/ping-localhost.sh       |    2 +-
 tests/syslogd.sh              |    4 ++--
 tests/telnet-localhost.sh     |   22 +++++++++++-----------
 tests/traceroute-localhost.sh |    2 +-
 5 files changed, 23 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Sun Feb 26 14:49:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S1k5c-0001ir-Ln
	for mharc-commit-inetutils@gnu.org; Sun, 26 Feb 2012 14:49:00 -0500
Received: from eggs.gnu.org ([208.118.235.92]:35745)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1S1k5Y-0001ih-Lk
	for commit-inetutils@gnu.org; Sun, 26 Feb 2012 14:48:59 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ams@gnu.org>) id 1S1k5V-000718-7j
	for commit-inetutils@gnu.org; Sun, 26 Feb 2012 14:48:56 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:36131)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1S1k5V-0006zx-1B
	for commit-inetutils@gnu.org; Sun, 26 Feb 2012 14:48:53 -0500
Received: from ams by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <ams@gnu.org>) id 1S1k5U-0006Xw-0j
	for commit-inetutils@gnu.org; Sun, 26 Feb 2012 19:48:52 +0000
Date: Sun, 26 Feb 2012 19:48:52 +0000
Message-Id: <E1S1k5U-0006Xw-0j@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-44-gd7be6fb
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 75ba6bd5ed59473ddebe595cb056c9fd262bcac8
X-Git-Newrev: d7be6fbb79bc1ed57d07f42b6c67d66d59b2bfc9
From: "Alfred M. Szmidt" <ams@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 26 Feb 2012 19:48:59 -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  d7be6fbb79bc1ed57d07f42b6c67d66d59b2bfc9 (commit)
       via  53c5e95452878e60fece474df91d4d213681546d (commit)
       via  91d887ae7264ab5d2c998dcd7ae8a7e717d569a1 (commit)
       via  2d136f7b735b0012f968697246c78ed5fd5131e0 (commit)
       via  7ab4fa2996a9b9fc7d0ee0ec9c855efb9d1bc1e1 (commit)
      from  75ba6bd5ed59473ddebe595cb056c9fd262bcac8 (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=d7be6fbb79bc1ed57d07f42b6c67d66d59b2bfc9


commit d7be6fbb79bc1ed57d07f42b6c67d66d59b2bfc9
Author: Alfred M. Szmidt <ams@gnu.org>
Date:   Sat Feb 25 12:31:23 2012 +0100

    bootstrap.conf (gnulib_modules): Sort lexically.

diff --git a/ChangeLog b/ChangeLog
index ff913d1..c9525b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2012-02-25  Alfred M. Szmidt  <ams@gnu.org>
 
+	* bootstrap.conf (gnulib_modules): Sort lexically.
+
+2012-02-25  Alfred M. Szmidt  <ams@gnu.org>
+
 	Silence sc_makefile_at_at_check.
 
 	* whois/Makefile.am (bin_PROGRAMS): Use $(...) type of variable
diff --git a/bootstrap.conf b/bootstrap.conf
index 7a9fe5e..98a8637 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -80,6 +80,7 @@ setenv
 sethostname
 signal
 size_max
+snippet/unused-parameter
 snprintf
 stdbool
 stdint
@@ -90,7 +91,6 @@ strnlen
 sysexits
 termios
 unistd-safer
-snippet/unused-parameter
 update-copyright
 vasnprintf
 version-etc-fsf
diff --git a/telnetd/state.c b/telnetd/state.c
index 6c8a59a..c52d232 100644
--- a/telnetd/state.c
+++ b/telnetd/state.c
@@ -54,10 +54,10 @@
 
 #if defined HAVE_STREAMSPTY && defined TIOCSIGNAL \
 	&& defined HAVE_STROPTS_H
-# include <stropts.h>	/* I_FLUSH, FLUSHR */
+# include <stropts.h>		/* I_FLUSH, FLUSHR */
 #endif
 
-#ifndef NTELOPTS	/* OpenSolaris */
+#ifndef NTELOPTS		/* OpenSolaris */
 # define NTELOPTS	(1+TELOPT_NEW_ENVIRON)
 #endif
 
@@ -66,6 +66,7 @@ char doopt[] = { IAC, DO, '%', 'c', 0 };
 char dont[] = { IAC, DONT, '%', 'c', 0 };
 char will[] = { IAC, WILL, '%', 'c', 0 };
 char wont[] = { IAC, WONT, '%', 'c', 0 };
+
 int not42 = 1;
 
 /*
diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c
index d844d37..f19a72a 100644
--- a/telnetd/telnetd.c
+++ b/telnetd/telnetd.c
@@ -92,29 +92,29 @@ char *terminaltype;
 
 int SYNCHing;			/* we are in TELNET SYNCH mode */
 struct telnetd_clocks clocks;
-
 
+
 static struct argp_option argp_options[] = {
-  { "authmode", 'a', "MODE", 0,
-    "specify what mode to use for authentication" },
-  { "debug", 'D', "LEVEL", OPTION_ARG_OPTIONAL,
-    "set debugging level" },
-  { "exec-login", 'E', "STRING", 0,
-    "set program to be executed instead of " PATH_LOGIN },
-  { "no-hostinfo", 'h', NULL, 0,
-    "do not print host information before login has been completed" },
-  { "linemode", 'l', "MODE", OPTION_ARG_OPTIONAL,
-    "set line mode" },
-  { "no-keepalive", 'n', NULL, 0,
-    "disable TCP keep-alives" },
-  { "reverse-lookup", 'U', NULL, 0,
-    "refuse connections from addresses that "
-    "cannot be mapped back into a symbolic name" },
+  {"authmode", 'a', "MODE", 0,
+   "specify what mode to use for authentication"},
+  {"debug", 'D', "LEVEL", OPTION_ARG_OPTIONAL,
+   "set debugging level"},
+  {"exec-login", 'E', "STRING", 0,
+   "set program to be executed instead of " PATH_LOGIN},
+  {"no-hostinfo", 'h', NULL, 0,
+   "do not print host information before login has been completed"},
+  {"linemode", 'l', "MODE", OPTION_ARG_OPTIONAL,
+   "set line mode"},
+  {"no-keepalive", 'n', NULL, 0,
+   "disable TCP keep-alives"},
+  {"reverse-lookup", 'U', NULL, 0,
+   "refuse connections from addresses that "
+   "cannot be mapped back into a symbolic name"},
 #ifdef  AUTHENTICATION
-  { "disable-auth-type", 'X', "TYPE", 0,
-    "disable the use of given authentication option" },
+  {"disable-auth-type", 'X', "TYPE", 0,
+   "disable the use of given authentication option"},
 #endif
-  { NULL }
+  {NULL}
 };
 
 static error_t
@@ -163,16 +163,15 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp =
-  {
-    argp_options,
-    parse_opt,
-    NULL,
-    "DARPA telnet protocol server"
-  };
-
+static struct argp argp = {
+  argp_options,
+  parse_opt,
+  NULL,
+  "DARPA telnet protocol server"
+};
 
 
+
 int
 main (int argc, char **argv)
 {
@@ -224,11 +223,16 @@ static struct
   int modnum;
 } debug_mode[debug_max_mode] =
 {
-  {"options", debug_options},
-  {"report", debug_report},
-  {"netdata", debug_net_data},
-  {"ptydata", debug_pty_data},
-  {"auth", debug_auth},};
+  {
+  "options", debug_options},
+  {
+  "report", debug_report},
+  {
+  "netdata", debug_net_data},
+  {
+  "ptydata", debug_pty_data},
+  {
+"auth", debug_auth},};
 
 void
 parse_debug_level (char *str)
diff --git a/telnetd/term.c b/telnetd/term.c
index 6ee845e..68e6e4e 100644
--- a/telnetd/term.c
+++ b/telnetd/term.c
@@ -656,47 +656,70 @@ struct termspeeds
   int speed;
   int value;
 } termspeeds[] =
+{
+  {
+  0, B0},
+  {
+  50, B50},
+  {
+  75, B75},
+  {
+  110, B110},
+  {
+  134, B134},
+  {
+  150, B150},
+  {
+  200, B200},
+  {
+  300, B300},
+  {
+  600, B600},
+  {
+  1200, B1200},
+  {
+  1800, B1800},
   {
-    {0, B0},
-    {50, B50},
-    {75, B75},
-    {110, B110},
-    {134, B134},
-    {150, B150},
-    {200, B200},
-    {300, B300},
-    {600, B600},
-    {1200, B1200},
-    {1800, B1800},
-    {2400, B2400},
-    {4800, B4800},
+  2400, B2400},
+  {
+  4800, B4800},
 # ifdef	B7200
-    {7200, B7200},
+  {
+  7200, B7200},
 # endif
-    {9600, B9600},
+  {
+  9600, B9600},
 # ifdef	B14400
-    {14400, B14400},
+  {
+  14400, B14400},
 # endif
 # ifdef	B19200
-    {19200, B19200},
+  {
+  19200, B19200},
 # endif
 # ifdef	B28800
-    {28800, B28800},
+  {
+  28800, B28800},
 # endif
 # ifdef	B38400
-    {38400, B38400},
+  {
+  38400, B38400},
 # endif
 # ifdef	B57600
-    {57600, B57600},
+  {
+  57600, B57600},
 # endif
 # ifdef	B115200
-    {115200, B115200},
+  {
+  115200, B115200},
 # endif
 # ifdef	B230400
-    {230400, B230400},
+  {
+  230400, B230400},
 # endif
-    {-1, 0}
-  };
+  {
+  -1, 0}
+};
 #endif /* DECODE_BAUD */
 
 void
diff --git a/telnetd/utility.c b/telnetd/utility.c
index cdd1d9a..ba1d440 100644
--- a/telnetd/utility.c
+++ b/telnetd/utility.c
@@ -1347,12 +1347,12 @@ printsub (int direction, unsigned char *pointer, int length)
 		  default:
 		    if (isprint (pointer[i]) && pointer[i] != '"')
 		      {
-                        if (noquote)
+			if (noquote)
 			  {
 			    debug_output_data ("\"");
 			    noquote = 0;
 			  }
-			debug_output_datalen ((char*) &pointer[i], 1);
+			debug_output_datalen ((char *) &pointer[i], 1);
 		      }
 		    else
 		      {
diff --git a/tests/addrpeek.c b/tests/addrpeek.c
index dbac011..e2405ef 100644
--- a/tests/addrpeek.c
+++ b/tests/addrpeek.c
@@ -84,14 +84,14 @@ write_address (int fd)
     {
       sslen = sizeof (ss);
       recvfrom (fd, answer, sizeof (answer), 0,
-                  (struct sockaddr *) &ss, &sslen);
+		(struct sockaddr *) &ss, &sslen);
       shutdown (fd, SHUT_RD);
     }
   else
-      return;
+    return;
 
   getnameinfo ((struct sockaddr *) &ss, sslen, addr, sizeof (addr),
-                NULL, 0, NI_NUMERICHOST);
+	       NULL, 0, NI_NUMERICHOST);
 
   len = snprintf (answer, sizeof (answer),
                   "Your address is %s." SEPARATOR, addr);

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=53c5e95452878e60fece474df91d4d213681546d


commit 53c5e95452878e60fece474df91d4d213681546d
Author: Alfred M. Szmidt <ams@gnu.org>
Date:   Sat Feb 25 12:23:16 2012 +0100

    Silence sc_makefile_at_at_check.

diff --git a/ChangeLog b/ChangeLog
index c60d057..ff913d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2012-02-25  Alfred M. Szmidt  <ams@gnu.org>
 
+	Silence sc_makefile_at_at_check.
+
+	* whois/Makefile.am (bin_PROGRAMS): Use $(...) type of variable
+	reference instead of @...@.
+	* telnetd/Makefile.am: Likewise.
+	* telnet/Makefile.am (bin_PROGRAMS): Likewise.
+	* talkd/Makefile.am (inetdaemon_PROGRAMS): Likewise.
+	* talk/Makefile.am (bin_PROGRAMS): Likewise.
+	* src/Makefile.am (bin_PROGRAMS, inetdaemon_PROGRAMS)
+	(install-exec-hook): Likewise.
+	* ping/Makefile.am (bin_PROGRAMS, install-exec-hook): Likewise.
+	* libls/Makefile.am (noinst_LIBRARIES): Likewise.
+	* ifconfig/Makefile.am (bin_PROGRAMS): Likewise.
+	* ftpd/Makefile.am (inetdaemon_PROGRAMS): Likewise.
+	* ftp/Makefile.am (bin_PROGRAMS): Likewise.
+
+2012-02-25  Alfred M. Szmidt  <ams@gnu.org>
+
 	* cfg.mk (local-checks-to-skip): Added sc_assignment_in_if to list.
 	(sc_assignment_in_if): New target.
 
diff --git a/ftp/Makefile.am b/ftp/Makefile.am
index 9f3cb26..0d5ec3f 100644
--- a/ftp/Makefile.am
+++ b/ftp/Makefile.am
@@ -18,7 +18,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see `http://www.gnu.org/licenses/'.
 
-bin_PROGRAMS = @ftp_BUILD@
+bin_PROGRAMS = $(ftp_BUILD)
 
 EXTRA_PROGRAMS = ftp
 
diff --git a/ftpd/Makefile.am b/ftpd/Makefile.am
index 7e07673..7f4c284 100644
--- a/ftpd/Makefile.am
+++ b/ftpd/Makefile.am
@@ -20,7 +20,7 @@
 
 inetdaemondir = @inetdaemondir@
 
-inetdaemon_PROGRAMS = @ftpd_BUILD@
+inetdaemon_PROGRAMS = $(ftpd_BUILD)
 
 EXTRA_PROGRAMS = ftpd
 
diff --git a/ifconfig/Makefile.am b/ifconfig/Makefile.am
index 7268cda..f01bf62 100644
--- a/ifconfig/Makefile.am
+++ b/ifconfig/Makefile.am
@@ -19,7 +19,7 @@
 
 SUBDIRS = system
 
-bin_PROGRAMS = @ifconfig_BUILD@
+bin_PROGRAMS = $(ifconfig_BUILD)
 
 EXTRA_PROGRAMS = ifconfig
 
diff --git a/libls/Makefile.am b/libls/Makefile.am
index 7d40b2e..6dedddb 100644
--- a/libls/Makefile.am
+++ b/libls/Makefile.am
@@ -17,7 +17,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see `http://www.gnu.org/licenses/'.
 
-noinst_LIBRARIES = @libls_BUILD@
+noinst_LIBRARIES = $(libls_BUILD)
 
 EXTRA_LIBRARIES = libls.a
 
diff --git a/ping/Makefile.am b/ping/Makefile.am
index 5da4782..8314662 100644
--- a/ping/Makefile.am
+++ b/ping/Makefile.am
@@ -18,7 +18,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see `http://www.gnu.org/licenses/'.
 
-bin_PROGRAMS = @ping_BUILD@ @ping6_BUILD@
+bin_PROGRAMS = $(ping_BUILD) $(ping6_BUILD)
 
 EXTRA_PROGRAMS = ping ping6
 
@@ -41,4 +41,4 @@ install-ping-hook:
 	fi \
 	done
 
-install-exec-hook: @ping_INSTALL_HOOK@
+install-exec-hook: $(ping_INSTALL_HOOK)
diff --git a/src/Makefile.am b/src/Makefile.am
index 726e7c6..e05ffd4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -28,70 +28,70 @@ bin_PROGRAMS =
 EXTRA_PROGRAMS =
 
 
-bin_PROGRAMS += @hostname_BUILD@
+bin_PROGRAMS += $(hostname_BUILD)
 hostname_SOURCES = hostname.c
 EXTRA_PROGRAMS += hostname
 
-bin_PROGRAMS += @logger_BUILD@
+bin_PROGRAMS += $(logger_BUILD)
 logger_SOURCES = logger.c logprio.h
 EXTRA_PROGRAMS += logger
 
-bin_PROGRAMS += @rcp_BUILD@
+bin_PROGRAMS += $(rcp_BUILD)
 rcp_SOURCES = rcp.c
 rcp_LDADD = $(LDADD) $(LIBAUTH)
 EXTRA_PROGRAMS += rcp
 
-bin_PROGRAMS += @rexec_BUILD@
+bin_PROGRAMS += $(rexec_BUILD)
 rexec_SOURCES = rexec.c
 EXTRA_PROGRAMS += rexec
 
-bin_PROGRAMS += @rlogin_BUILD@
+bin_PROGRAMS += $(rlogin_BUILD)
 rlogin_SOURCES = rlogin.c
 rlogin_LDADD = $(LDADD) $(LIBAUTH)
 EXTRA_PROGRAMS += rlogin
 
-bin_PROGRAMS += @rsh_BUILD@
+bin_PROGRAMS += $(rsh_BUILD)
 rsh_SOURCES = rsh.c
 rsh_LDADD = $(LDADD) $(LIBAUTH)
 EXTRA_PROGRAMS += rsh
 
-bin_PROGRAMS += @tftp_BUILD@
+bin_PROGRAMS += $(tftp_BUILD)
 tftp_SOURCES = tftp.c
 EXTRA_PROGRAMS += tftp
 
-bin_PROGRAMS += @traceroute_BUILD@
+bin_PROGRAMS += $(traceroute_BUILD)
 traceroute_SOURCES = traceroute.c
 traceroute_LDADD = $(top_builddir)/libicmp/libicmp.a $(LDADD)
 EXTRA_PROGRAMS += traceroute
 
-inetdaemon_PROGRAMS += @inetd_BUILD@
+inetdaemon_PROGRAMS += $(inetd_BUILD)
 inetd_SOURCES = inetd.c
 EXTRA_PROGRAMS += inetd
 
-inetdaemon_PROGRAMS += @rexecd_BUILD@
+inetdaemon_PROGRAMS += $(rexecd_BUILD)
 rexecd_SOURCES = rexecd.c
 rexecd_LDADD = $(LDADD) $(LIBCRYPT)
 EXTRA_PROGRAMS += rexecd
 
-inetdaemon_PROGRAMS += @rlogind_BUILD@
+inetdaemon_PROGRAMS += $(rlogind_BUILD)
 rlogind_SOURCES = rlogind.c
 rlogind_LDADD = $(LDADD) $(LIBAUTH)
 EXTRA_PROGRAMS += rlogind
 
-inetdaemon_PROGRAMS += @rshd_BUILD@
+inetdaemon_PROGRAMS += $(rshd_BUILD)
 rshd_SOURCES = rshd.c
 rshd_LDADD = $(LDADD) $(LIBAUTH)
 EXTRA_PROGRAMS += rshd
 
-inetdaemon_PROGRAMS += @syslogd_BUILD@
+inetdaemon_PROGRAMS += $(syslogd_BUILD)
 syslogd_SOURCES = syslogd.c
 EXTRA_PROGRAMS += syslogd
 
-inetdaemon_PROGRAMS += @tftpd_BUILD@
+inetdaemon_PROGRAMS += $(tftpd_BUILD)
 tftpd_SOURCES = tftpd.c
 EXTRA_PROGRAMS += tftpd
 
-inetdaemon_PROGRAMS += @uucpd_BUILD@
+inetdaemon_PROGRAMS += $(uucpd_BUILD)
 uucpd_SOURCES = uucpd.c
 uucpd_LDADD = $(LDADD) $(LIBCRYPT)
 EXTRA_PROGRAMS += uucpd
@@ -102,7 +102,7 @@ AM_CPPFLAGS = $(PATHDEF_BSHELL) $(PATHDEF_CONSOLE) $(PATHDEF_CP) $(PATHDEF_DEFPA
 
 SUIDMODE = -o root -m 4775
 
-install-exec-hook: @traceroute_INSTALL_HOOK@ @rsh_INSTALL_HOOK@ @rlogin_INSTALL_HOOK@ @rcp_INSTALL_HOOK@
+install-exec-hook: $(traceroute_INSTALL_HOOK) $(rsh_INSTALL_HOOK) $(rlogin_INSTALL_HOOK) $(rcp_INSTALL_HOOK)
 
 install-traceroute-hook:
 	-@$(INSTALL_PROGRAM) traceroute $(SUIDMODE) $(AM_INSTALL_PROGRAM_FLAGS) $(DESTDIR)$(bindir)/`echo traceroute|sed '$(transform)'` ; \
diff --git a/talk/Makefile.am b/talk/Makefile.am
index 488ff8a..77e25e6 100644
--- a/talk/Makefile.am
+++ b/talk/Makefile.am
@@ -18,7 +18,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see `http://www.gnu.org/licenses/'.
 
-bin_PROGRAMS = @talk_BUILD@
+bin_PROGRAMS = $(talk_BUILD)
 
 EXTRA_PROGRAMS = talk
 
diff --git a/talkd/Makefile.am b/talkd/Makefile.am
index a3e81b7..33372ec 100644
--- a/talkd/Makefile.am
+++ b/talkd/Makefile.am
@@ -20,7 +20,7 @@
 
 inetdaemondir = @inetdaemondir@
 
-inetdaemon_PROGRAMS = @talkd_BUILD@
+inetdaemon_PROGRAMS = $(talkd_BUILD)
 
 EXTRA_PROGRAMS = talkd
 
diff --git a/telnet/Makefile.am b/telnet/Makefile.am
index 382f265..b37ed35 100644
--- a/telnet/Makefile.am
+++ b/telnet/Makefile.am
@@ -18,7 +18,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see `http://www.gnu.org/licenses/'.
 
-bin_PROGRAMS = @telnet_BUILD@
+bin_PROGRAMS = $(telnet_BUILD)
 
 EXTRA_PROGRAMS = telnet
 
diff --git a/telnetd/Makefile.am b/telnetd/Makefile.am
index 7fce7ba..1f8d961 100644
--- a/telnetd/Makefile.am
+++ b/telnetd/Makefile.am
@@ -20,7 +20,7 @@
 
 inetdaemondir = @inetdaemondir@
 
-inetdaemon_PROGRAMS = @telnetd_BUILD@
+inetdaemon_PROGRAMS = $(telnetd_BUILD)
 
 EXTRA_PROGRAMS = telnetd
 
diff --git a/whois/Makefile.am b/whois/Makefile.am
index 3a5a233..f1363c0 100644
--- a/whois/Makefile.am
+++ b/whois/Makefile.am
@@ -17,7 +17,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see `http://www.gnu.org/licenses/'.
 
-bin_PROGRAMS = @whois_BUILD@
+bin_PROGRAMS = $(whois_BUILD)
 
 EXTRA_PROGRAMS = whois
 

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=91d887ae7264ab5d2c998dcd7ae8a7e717d569a1


commit 91d887ae7264ab5d2c998dcd7ae8a7e717d569a1
Author: Alfred M. Szmidt <ams@gnu.org>
Date:   Sat Feb 25 12:20:44 2012 +0100

    New syntax rule to checks for assignments inside if statements: sc_assignment_in_if.

diff --git a/ChangeLog b/ChangeLog
index 832b03d..c60d057 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-02-25  Alfred M. Szmidt  <ams@gnu.org>
 
+	* cfg.mk (local-checks-to-skip): Added sc_assignment_in_if to list.
+	(sc_assignment_in_if): New target.
+
 	* bootstrap: Updated from gnulib.
 
 	* src/inetd.c (main, tcpmux, chargen_dg, chargen_stream)
diff --git a/cfg.mk b/cfg.mk
index 102148a..bb95788 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -31,7 +31,8 @@ local-checks-to-skip = \
 	sc_prohibit_stat_st_blocks \
 	sc_prohibit_strcmp \
 	sc_unmarked_diagnostics \
-	sc_bindtextdomain
+	sc_bindtextdomain \
+	sc_assignment_in_if
 
 exclude_file_name_regexp--sc_prohibit_have_config_h = \
 	^libinetutils/libinetutils.h$$
@@ -64,3 +65,7 @@ sc_unsigned_short:
 	@prohibit=u''_short \
 	halt='don'\''t use u''_char; instead use unsigned short' \
 	  $(_sc_search_regexp)
+
+sc_assignment_in_if:
+	prohibit='\<if *\(.* = ' halt="don't use assignments in if statements"	\
+	  $(_sc_search_regexp)

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=2d136f7b735b0012f968697246c78ed5fd5131e0


commit 2d136f7b735b0012f968697246c78ed5fd5131e0
Author: Alfred M. Szmidt <ams@gnu.org>
Date:   Sat Feb 25 11:57:52 2012 +0100

    bootstrap: Updated from gnulib.

diff --git a/ChangeLog b/ChangeLog
index e671769..832b03d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2012-02-25  Alfred M. Szmidt  <ams@gnu.org>
 
+	* bootstrap: Updated from gnulib.
+
 	* src/inetd.c (main, tcpmux, chargen_dg, chargen_stream)
 	(nextconfig, newstr, run_service): Fix indentation.
 
diff --git a/bootstrap b/bootstrap
index 66da981..31eb651 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2012-01-06.07; # UTC
+scriptversion=2012-02-11.09; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -87,9 +87,9 @@ gnulib_files=
 : ${AUTOPOINT=autopoint}
 : ${AUTORECONF=autoreconf}
 
-# A function to be called to edit gnulib.mk right after it's created.
+# A function to be called right after gnulib-tool is run.
 # Override it via your own definition in bootstrap.conf.
-gnulib_mk_hook() { :; }
+bootstrap_post_import_hook() { :; }
 
 # A function to be called after everything else in this script.
 # Override it via your own definition in bootstrap.conf.
@@ -423,7 +423,7 @@ check_versions() {
       $use_git || continue
     fi
     # Honor $APP variables ($TAR, $AUTOCONF, etc.)
-    appvar=`echo $app | tr '[a-z]-' '[A-Z]_'`
+    appvar=`echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_'`
     test "$appvar" = TAR && appvar=AMTAR
     case $appvar in
         GZIP) ;; # Do not use $GZIP:  it contains gzip options.
@@ -604,7 +604,7 @@ if $bootstrap_sync; then
 fi
 
 gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
-<$gnulib_tool || exit
+<$gnulib_tool || exit $?
 
 # Get translations.
 
@@ -758,7 +758,7 @@ fi
 # Autoreconf runs aclocal before libtoolize, which causes spurious
 # warnings if the initial aclocal is confused by the libtoolized
 # (or worse out-of-date) macro directory.
-if grep '^[    ]*LT_INIT' configure.ac >/dev/null; then
+if test $use_libtool = 1; then
   echo "running: $LIBTOOLIZE --copy --install"
   $LIBTOOLIZE --copy --install
 fi
@@ -807,6 +807,9 @@ for file in $gnulib_files; do
   symlink_to_dir "$GNULIB_SRCDIR" $file || exit
 done
 
+bootstrap_post_import_hook \
+  || { echo >&2 "$me: bootstrap_post_import_hook failed"; exit 1; }
+
 # Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
 # gnulib-populated directories.  Such .m4 files would cause aclocal to fail.
 # The following requires GNU find 4.2.3 or newer.  Considering the usual
@@ -819,11 +822,20 @@ find "$m4_base" "$source_base" \
   -depth \( -name '*.m4' -o -name '*.[ch]' \) \
   -type l -xtype l -delete > /dev/null 2>&1
 
+# Some systems (RHEL 5) are using ancient autotools, for which the
+# --no-recursive option had not been invented.  Detect that lack and
+# omit the option when it's not supported.  FIXME in 2017: remove this
+# hack when RHEL 5 autotools are updated, or when they become irrelevant.
+no_recursive=
+case $($AUTORECONF --help) in
+  *--no-recursive*) no_recursive=--no-recursive;;
+esac
+
 # Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
 echo "running: AUTOPOINT=true LIBTOOLIZE=true " \
-    "$AUTORECONF --verbose --install --no-recursive -I $m4_base $ACLOCAL_FLAGS"
+    "$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS"
 AUTOPOINT=true LIBTOOLIZE=true \
-    $AUTORECONF --verbose --install --no-recursive -I $m4_base $ACLOCAL_FLAGS \
+    $AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS \
   || exit 1
 
 # Get some extra files from gnulib, overriding existing files.

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=7ab4fa2996a9b9fc7d0ee0ec9c855efb9d1bc1e1


commit 7ab4fa2996a9b9fc7d0ee0ec9c855efb9d1bc1e1
Author: Alfred M. Szmidt <ams@gnu.org>
Date:   Sat Feb 25 11:57:29 2012 +0100

    src/inetd.c (main, tcpmux, chargen_dg, chargen_stream, nextconfig,
    newstr, run_service): Fix indentation.

diff --git a/ChangeLog b/ChangeLog
index 10d1fce..e671769 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-25  Alfred M. Szmidt  <ams@gnu.org>
+
+	* src/inetd.c (main, tcpmux, chargen_dg, chargen_stream)
+	(nextconfig, newstr, run_service): Fix indentation.
+
 2012-02-22  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* tests/ping-localhost.sh, tests/traceroute-localhost.sh: Mend string
diff --git a/src/inetd.c b/src/inetd.c
index fe221da..1554ddd 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -429,7 +429,8 @@ run_service (int ctrl, struct servtab *sep)
       close (ctrl);
       dup2 (0, 1);
       dup2 (0, 2);
-      if ((pwd = getpwnam (sep->se_user)) == NULL)
+      pwd = getpwnam (sep->se_user);
+      if (pwd == NULL)
 	{
 	  syslog (LOG_ERR, "%s/%s: %s: No such user",
 		  sep->se_service, sep->se_proto, sep->se_user);
@@ -439,7 +440,8 @@ run_service (int ctrl, struct servtab *sep)
 	}
       if (sep->se_group && *sep->se_group)
 	{
-	  if ((grp = getgrnam (sep->se_group)) == NULL)
+	  grp = getgrnam (sep->se_group);
+	  if (grp == NULL)
 	    {
 	      syslog (LOG_ERR, "%s/%s: %s: No such group",
 		      sep->se_service, sep->se_proto, sep->se_group);
@@ -524,7 +526,8 @@ char *
 newstr (const char *cp)
 {
   char *s;
-  if ((s = strdup (cp ? cp : "")))
+  s = strdup (cp ? cp : "");
+  if (s != NULL)
     return s;
   syslog (LOG_ERR, "strdup: %m");
   exit (-1);
@@ -1244,7 +1247,8 @@ nextconfig (const char *file)
     }
   while ((sep = getconfigent (fconfig, file, &line)))
     {
-      if ((pwd = getpwnam (sep->se_user)) == NULL)
+      pwd = getpwnam (sep->se_user);
+      if (pwd == NULL)
 	{
 	  syslog (LOG_ERR, "%s/%s: No such user '%s', service ignored",
 		  sep->se_service, sep->se_proto, sep->se_user);
@@ -1252,7 +1256,8 @@ nextconfig (const char *file)
 	}
       if (sep->se_group && *sep->se_group)
 	{
-	  if ((grp = getgrnam (sep->se_group)) == NULL)
+	  grp = getgrnam (sep->se_group);
+	  if (grp == NULL)
 	    {
 	      syslog (LOG_ERR, "%s/%s: No such group '%s', service ignored",
 		      sep->se_service, sep->se_proto, sep->se_group);
@@ -1569,7 +1574,8 @@ chargen_stream (int s, struct servtab *sep)
   text[LINESIZ + 1] = '\n';
   for (rs = ring;;)
     {
-      if ((len = endring - rs) >= LINESIZ)
+      len = endring - rs;
+      if (len >= LINESIZ)
 	memmove (text, rs, LINESIZ);
       else
 	{
@@ -1608,7 +1614,8 @@ chargen_dg (int s, struct servtab *sep)
   if (recvfrom (s, text, sizeof text, 0, (struct sockaddr *) &sa, &size) < 0)
     return;
 
-  if ((len = endring - rs) >= LINESIZ)
+  len = endring - rs;
+  if (len >= LINESIZ)
     memmove (text, rs, LINESIZ);
   else
     {
@@ -1753,7 +1760,8 @@ tcpmux (int s, struct servtab *sep)
   int len;
 
   /* Get requested service name */
-  if ((len = fd_getline (s, service, MAX_SERV_LEN)) < 0)
+  len = fd_getline (s, service, MAX_SERV_LEN);
+  if (len < 0)
     {
       strwrite (s, "-Error reading service name\r\n");
       _exit (1);
@@ -1977,7 +1985,8 @@ main (int argc, char *argv[], char *envp[])
 	  signal_unblock (NULL);
 	}
       readable = allsock;
-      if ((n = select (maxsock + 1, &readable, NULL, NULL, NULL)) <= 0)
+      n = select (maxsock + 1, &readable, NULL, NULL, NULL);
+      if (n <= 0)
 	{
 	  if (n < 0 && errno != EINTR)
 	    syslog (LOG_WARNING, "select: %m");

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

Summary of changes:
 ChangeLog            |   32 ++++++++++++++++++++++
 bootstrap            |   28 ++++++++++++++-----
 bootstrap.conf       |    2 +-
 cfg.mk               |    7 ++++-
 ftp/Makefile.am      |    2 +-
 ftpd/Makefile.am     |    2 +-
 ifconfig/Makefile.am |    2 +-
 libls/Makefile.am    |    2 +-
 ping/Makefile.am     |    4 +-
 src/Makefile.am      |   32 +++++++++++-----------
 src/inetd.c          |   27 ++++++++++++------
 talk/Makefile.am     |    2 +-
 talkd/Makefile.am    |    2 +-
 telnet/Makefile.am   |    2 +-
 telnetd/Makefile.am  |    2 +-
 telnetd/state.c      |    5 ++-
 telnetd/telnetd.c    |   68 +++++++++++++++++++++++++----------------------
 telnetd/term.c       |   71 +++++++++++++++++++++++++++++++++-----------------
 telnetd/utility.c    |    4 +-
 tests/addrpeek.c     |    6 ++--
 whois/Makefile.am    |    2 +-
 21 files changed, 195 insertions(+), 109 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Sun Feb 26 15:02:53 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S1kJ3-0004xW-UW
	for mharc-commit-inetutils@gnu.org; Sun, 26 Feb 2012 15:02:53 -0500
Received: from eggs.gnu.org ([208.118.235.92]:50079)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1S1kJ0-0004xP-ON
	for commit-inetutils@gnu.org; Sun, 26 Feb 2012 15:02:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ams@gnu.org>) id 1S1kIy-0000p6-Is
	for commit-inetutils@gnu.org; Sun, 26 Feb 2012 15:02:50 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:52691)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1S1kIy-0000oz-EP
	for commit-inetutils@gnu.org; Sun, 26 Feb 2012 15:02:48 -0500
Received: from ams by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <ams@gnu.org>) id 1S1kIa-0000Xy-E6
	for commit-inetutils@gnu.org; Sun, 26 Feb 2012 20:02:39 +0000
Date: Sun, 26 Feb 2012 20:02:35 +0000
Message-Id: <E1S1kIa-0000Xy-E6@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-45-g8173030
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: d7be6fbb79bc1ed57d07f42b6c67d66d59b2bfc9
X-Git-Newrev: 8173030af23ddb67c3834c79226c17a5f8175c6e
From: "Alfred M. Szmidt" <ams@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 26 Feb 2012 20:02:52 -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  8173030af23ddb67c3834c79226c17a5f8175c6e (commit)
      from  d7be6fbb79bc1ed57d07f42b6c67d66d59b2bfc9 (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=8173030af23ddb67c3834c79226c17a5f8175c6e


commit 8173030af23ddb67c3834c79226c17a5f8175c6e
Author: Alfred M. Szmidt <ams@gnu.org>
Date:   Sun Feb 26 21:01:56 2012 +0100

    Revert to commit 99c71142f24033c2027a846df7c68be60f0625ef.  (silent
    change)

diff --git a/telnetd/state.c b/telnetd/state.c
index c52d232..6c8a59a 100644
--- a/telnetd/state.c
+++ b/telnetd/state.c
@@ -54,10 +54,10 @@
 
 #if defined HAVE_STREAMSPTY && defined TIOCSIGNAL \
 	&& defined HAVE_STROPTS_H
-# include <stropts.h>		/* I_FLUSH, FLUSHR */
+# include <stropts.h>	/* I_FLUSH, FLUSHR */
 #endif
 
-#ifndef NTELOPTS		/* OpenSolaris */
+#ifndef NTELOPTS	/* OpenSolaris */
 # define NTELOPTS	(1+TELOPT_NEW_ENVIRON)
 #endif
 
@@ -66,7 +66,6 @@ char doopt[] = { IAC, DO, '%', 'c', 0 };
 char dont[] = { IAC, DONT, '%', 'c', 0 };
 char will[] = { IAC, WILL, '%', 'c', 0 };
 char wont[] = { IAC, WONT, '%', 'c', 0 };
-
 int not42 = 1;
 
 /*
diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c
index f19a72a..22f1a96 100644
--- a/telnetd/telnetd.c
+++ b/telnetd/telnetd.c
@@ -28,10 +28,6 @@
 #include <error.h>
 #include <libinetutils.h>
 
-#if defined AUTHENTICATION || defined ENCRYPTION
-# include <libtelnet/misc.h>
-#endif
-
 static void parse_authmode (char *str);
 static void parse_linemode (char *str);
 static void parse_debug_level (char *str);
@@ -92,29 +88,29 @@ char *terminaltype;
 
 int SYNCHing;			/* we are in TELNET SYNCH mode */
 struct telnetd_clocks clocks;
-
 
+
 static struct argp_option argp_options[] = {
-  {"authmode", 'a', "MODE", 0,
-   "specify what mode to use for authentication"},
-  {"debug", 'D', "LEVEL", OPTION_ARG_OPTIONAL,
-   "set debugging level"},
-  {"exec-login", 'E', "STRING", 0,
-   "set program to be executed instead of " PATH_LOGIN},
-  {"no-hostinfo", 'h', NULL, 0,
-   "do not print host information before login has been completed"},
-  {"linemode", 'l', "MODE", OPTION_ARG_OPTIONAL,
-   "set line mode"},
-  {"no-keepalive", 'n', NULL, 0,
-   "disable TCP keep-alives"},
-  {"reverse-lookup", 'U', NULL, 0,
-   "refuse connections from addresses that "
-   "cannot be mapped back into a symbolic name"},
+  { "authmode", 'a', "MODE", 0,
+    "specify what mode to use for authentication" },
+  { "debug", 'D', "LEVEL", OPTION_ARG_OPTIONAL,
+    "set debugging level" },
+  { "exec-login", 'E', "STRING", 0,
+    "set program to be executed instead of " PATH_LOGIN },
+  { "no-hostinfo", 'h', NULL, 0,
+    "do not print host information before login has been completed" },
+  { "linemode", 'l', "MODE", OPTION_ARG_OPTIONAL,
+    "set line mode" },
+  { "no-keepalive", 'n', NULL, 0,
+    "disable TCP keep-alives" },
+  { "reverse-lookup", 'U', NULL, 0,
+    "refuse connections from addresses that "
+    "cannot be mapped back into a symbolic name" },
 #ifdef  AUTHENTICATION
-  {"disable-auth-type", 'X', "TYPE", 0,
-   "disable the use of given authentication option"},
+  { "disable-auth-type", 'X', "TYPE", 0,
+    "disable the use of given authentication option" },
 #endif
-  {NULL}
+  { NULL }
 };
 
 static error_t
@@ -163,14 +159,15 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp = {
-  argp_options,
-  parse_opt,
-  NULL,
-  "DARPA telnet protocol server"
-};
-
+static struct argp argp =
+  {
+    argp_options,
+    parse_opt,
+    NULL,
+    "DARPA telnet protocol server"
+  };
 
+
 
 int
 main (int argc, char **argv)
@@ -223,16 +220,11 @@ static struct
   int modnum;
 } debug_mode[debug_max_mode] =
 {
-  {
-  "options", debug_options},
-  {
-  "report", debug_report},
-  {
-  "netdata", debug_net_data},
-  {
-  "ptydata", debug_pty_data},
-  {
-"auth", debug_auth},};
+  {"options", debug_options},
+  {"report", debug_report},
+  {"netdata", debug_net_data},
+  {"ptydata", debug_pty_data},
+  {"auth", debug_auth},};
 
 void
 parse_debug_level (char *str)
diff --git a/telnetd/term.c b/telnetd/term.c
index 68e6e4e..6ee845e 100644
--- a/telnetd/term.c
+++ b/telnetd/term.c
@@ -656,70 +656,47 @@ struct termspeeds
   int speed;
   int value;
 } termspeeds[] =
-{
-  {
-  0, B0},
-  {
-  50, B50},
-  {
-  75, B75},
-  {
-  110, B110},
-  {
-  134, B134},
-  {
-  150, B150},
-  {
-  200, B200},
-  {
-  300, B300},
-  {
-  600, B600},
-  {
-  1200, B1200},
-  {
-  1800, B1800},
   {
-  2400, B2400},
-  {
-  4800, B4800},
+    {0, B0},
+    {50, B50},
+    {75, B75},
+    {110, B110},
+    {134, B134},
+    {150, B150},
+    {200, B200},
+    {300, B300},
+    {600, B600},
+    {1200, B1200},
+    {1800, B1800},
+    {2400, B2400},
+    {4800, B4800},
 # ifdef	B7200
-  {
-  7200, B7200},
+    {7200, B7200},
 # endif
-  {
-  9600, B9600},
+    {9600, B9600},
 # ifdef	B14400
-  {
-  14400, B14400},
+    {14400, B14400},
 # endif
 # ifdef	B19200
-  {
-  19200, B19200},
+    {19200, B19200},
 # endif
 # ifdef	B28800
-  {
-  28800, B28800},
+    {28800, B28800},
 # endif
 # ifdef	B38400
-  {
-  38400, B38400},
+    {38400, B38400},
 # endif
 # ifdef	B57600
-  {
-  57600, B57600},
+    {57600, B57600},
 # endif
 # ifdef	B115200
-  {
-  115200, B115200},
+    {115200, B115200},
 # endif
 # ifdef	B230400
-  {
-  230400, B230400},
+    {230400, B230400},
 # endif
-  {
-  -1, 0}
-};
+    {-1, 0}
+  };
 #endif /* DECODE_BAUD */
 
 void
diff --git a/telnetd/utility.c b/telnetd/utility.c
index ba1d440..cdd1d9a 100644
--- a/telnetd/utility.c
+++ b/telnetd/utility.c
@@ -1347,12 +1347,12 @@ printsub (int direction, unsigned char *pointer, int length)
 		  default:
 		    if (isprint (pointer[i]) && pointer[i] != '"')
 		      {
-			if (noquote)
+                        if (noquote)
 			  {
 			    debug_output_data ("\"");
 			    noquote = 0;
 			  }
-			debug_output_datalen ((char *) &pointer[i], 1);
+			debug_output_datalen ((char*) &pointer[i], 1);
 		      }
 		    else
 		      {
diff --git a/tests/addrpeek.c b/tests/addrpeek.c
index e2405ef..dbac011 100644
--- a/tests/addrpeek.c
+++ b/tests/addrpeek.c
@@ -84,14 +84,14 @@ write_address (int fd)
     {
       sslen = sizeof (ss);
       recvfrom (fd, answer, sizeof (answer), 0,
-		(struct sockaddr *) &ss, &sslen);
+                  (struct sockaddr *) &ss, &sslen);
       shutdown (fd, SHUT_RD);
     }
   else
-    return;
+      return;
 
   getnameinfo ((struct sockaddr *) &ss, sslen, addr, sizeof (addr),
-	       NULL, 0, NI_NUMERICHOST);
+                NULL, 0, NI_NUMERICHOST);
 
   len = snprintf (answer, sizeof (answer),
                   "Your address is %s." SEPARATOR, addr);

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

Summary of changes:
 telnetd/state.c   |    5 +--
 telnetd/telnetd.c |   72 +++++++++++++++++++++++-----------------------------
 telnetd/term.c    |   71 +++++++++++++++++----------------------------------
 telnetd/utility.c |    4 +-
 tests/addrpeek.c  |    6 ++--
 5 files changed, 63 insertions(+), 95 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


