From MAILER-DAEMON Thu Apr 04 20:31:25 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1UNuYv-0008TB-SF
	for mharc-commit-inetutils@gnu.org; Thu, 04 Apr 2013 20:31:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42845)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UNuYo-0008T4-0t
	for commit-inetutils@gnu.org; Thu, 04 Apr 2013 20:31:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UNuYb-0007DO-MW
	for commit-inetutils@gnu.org; Thu, 04 Apr 2013 20:31:17 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:53717)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UNuYb-0007DD-C4
	for commit-inetutils@gnu.org; Thu, 04 Apr 2013 20:31:05 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1UNuYa-0006Iu-I6
	for commit-inetutils@gnu.org; Fri, 05 Apr 2013 00:31:04 +0000
Date: Fri, 05 Apr 2013 00:31:04 +0000
Message-Id: <E1UNuYa-0006Iu-I6@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-267-g58d5337
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: c2c33de07f6497883d4d5200f62a7798f3371db4
X-Git-Newrev: 58d533764dd4e50bd48c835db80d35693e5dabca
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
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, 05 Apr 2013 00:31:24 -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  58d533764dd4e50bd48c835db80d35693e5dabca (commit)
       via  c39250371e0e2f8a89ded6463e93c980b3e42f4d (commit)
      from  c2c33de07f6497883d4d5200f62a7798f3371db4 (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=58d533764dd4e50bd48c835db80d35693e5dabca


commit 58d533764dd4e50bd48c835db80d35693e5dabca
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Apr 5 02:11:25 2013 +0200

    talk: Address resolution.

diff --git a/ChangeLog b/ChangeLog
index ef743d4..912d03f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2013-04-05  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	talk: Address resolution.
+
+	* talk/get_addrs.c (get_addrs): Implement resolver
+	using getaddrinfo().  This is now the preferred method.
+	[HAVE_DECL_GETADDRINFO || defined HAVE_IDN]:
+	Declare ERR with larger scope.
+	[HAVE_DECL_GETADDRINFO]: New variables HINTS, RES, AI.
+	Call getaddrinfo() for LHOST and RHOST.
+	[HAVE_DECL_GETADDRINFO && AI_IDN]: Add AI_IDN to
+	`hints.ai_flags'.
+
 2013-04-04  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	More IDN support for clients.
diff --git a/NEWS b/NEWS
index 8e8bcfb..6a60b90 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,15 @@ See the end of this file for license conditions.
 
 Please send inetutils bug reports to <bug-inetutils@gnu.org>.
 
+* IDN -- International Domain Names
+
+The clients `ftp', `ping', `ping6', `talk', `telnet', `tftp',
+and `traceroute' are now capable of using libidn in resolving
+domain names with character sets richer than ASCII.
+
+Systems using Glibc achieve this ability by other means in the
+present code, so they do not need to link against libidn at all.
+
 * New tool 'dnsdomainname'.
 
 * ftp
diff --git a/talk/get_addrs.c b/talk/get_addrs.c
index d91a788..ed4d174 100644
--- a/talk/get_addrs.c
+++ b/talk/get_addrs.c
@@ -68,13 +68,18 @@
 int
 get_addrs (char *my_machine_name, char *his_machine_name)
 {
+#if HAVE_DECL_GETADDRINFO || defined HAVE_IDN
+  int err;
+#endif
   char *lhost, *rhost;
+#if HAVE_DECL_GETADDRINFO
+  struct addrinfo hints, *res, *ai;
+#else /* !HAVE_DECL_GETADDRINFO */
   struct hostent *hp;
+#endif
   struct servent *sp;
 
 #ifdef HAVE_IDN
-  int err;
-
   err = idna_to_ascii_lz (my_machine_name, &lhost, 0);
   if (err)
     {
@@ -96,7 +101,66 @@ get_addrs (char *my_machine_name, char *his_machine_name)
 #endif
 
   msg.pid = htonl (getpid ());
-  /* look up the address of the local host */
+
+  /* Look up the address of the local host.  */
+
+#if HAVE_DECL_GETADDRINFO
+  memset (&hints, 0, sizeof (hints));
+
+  /* The talk-protocol is IPv4 only!  */
+  hints.ai_family = AF_INET;
+  hints.ai_socktype = SOCK_DGRAM;
+# ifdef AI_IDN
+  hints.ai_flags |= AI_IDN;
+# endif
+
+  err = getaddrinfo (lhost, NULL, &hints, &res);
+  if (err)
+    {
+      fprintf (stderr, "talk: %s: %s\n", lhost, gai_strerror (err));
+      exit (-1);
+    }
+
+  /* Perform all sanity checks available.
+   * Reduction of tests?
+   */
+  for (ai = res; ai; ai = ai->ai_next)
+    {
+      int f;
+
+      if (ai->ai_family != AF_INET)
+	continue;
+
+      f = socket (ai->ai_family, ai->ai_socktype, ai->ai_protocol);
+      if (f < 0)
+	continue;
+
+      /* Attempt binding to this local address.  */
+      if (bind (f, ai->ai_addr, ai->ai_addrlen))
+        {
+	  close (f);
+	  f = -1;
+	  continue;
+	}
+
+      /* We have a usable address.  */
+      close (f);
+      break;
+    }
+
+  if (ai)
+    memcpy (&my_machine_addr,
+	    &((struct sockaddr_in *) ai->ai_addr)->sin_addr,
+	    sizeof (my_machine_addr));
+
+  freeaddrinfo (res);
+  if (!ai)
+    {
+      fprintf (stderr, "talk: %s: %s\n", lhost, "address not found");
+      exit (-1);
+    }
+
+#else /* !HAVE_DECL_GETADDRINFO */
   hp = gethostbyname (lhost);
   if (hp == NULL)
     {
@@ -105,12 +169,52 @@ get_addrs (char *my_machine_name, char *his_machine_name)
       exit (-1);
     }
   memmove (&my_machine_addr, hp->h_addr, hp->h_length);
+#endif /* !HAVE_DECL_GETADDRINFO */
+
   /*
    * If the callee is on-machine, just copy the
    * network address, otherwise do a lookup...
    */
   if (strcmp (rhost, lhost))
     {
+#if HAVE_DECL_GETADDRINFO
+      err = getaddrinfo (rhost, NULL, &hints, &res);
+      if (err)
+	{
+	  fprintf (stderr, "talk: %s: %s\n", rhost, gai_strerror (err));
+	  exit (-1);
+	}
+
+      /* Perform all sanity checks available.  */
+      for (ai = res; ai; ai = ai->ai_next)
+	{
+	  int f;
+
+	  if (ai->ai_family != AF_INET)
+	    continue;
+
+	  f = socket (ai->ai_family, ai->ai_socktype, ai->ai_protocol);
+	  if (f < 0)
+	    continue;
+
+	  /* We have a usable address family!  */
+	  close (f);
+	  break;
+	}
+
+      if (ai)
+	memcpy (&his_machine_addr,
+		&((struct sockaddr_in *) ai->ai_addr)->sin_addr,
+		sizeof (his_machine_addr));
+
+      freeaddrinfo (res);
+      if (!ai)
+	{
+	  fprintf (stderr, "talk: %s: %s\n", rhost, "address not found");
+	  exit (-1);
+	}
+
+#else /* !HAVE_DECL_GETADDRINFO */
       hp = gethostbyname (rhost);
       if (hp == NULL)
 	{
@@ -119,10 +223,12 @@ get_addrs (char *my_machine_name, char *his_machine_name)
 	  exit (-1);
 	}
       memmove (&his_machine_addr, hp->h_addr, hp->h_length);
+#endif /* !HAVE_DECL_GETADDRINFO */
     }
   else
     his_machine_addr = my_machine_addr;
-  /* find the server's port */
+
+  /* Find the server's port.  */
   sp = getservbyname ("ntalk", "udp");
   if (sp == 0)
     {

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


commit c39250371e0e2f8a89ded6463e93c980b3e42f4d
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Thu Apr 4 00:51:05 2013 +0200

    More IDN support for clients.

diff --git a/ChangeLog b/ChangeLog
index 39bcba7..ef743d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,58 @@
+2013-04-04  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	More IDN support for clients.
+
+	* configure.ac <summary>: Uppdate ftp_PROPS,
+	talk_PROPS, telnet_PROPS, and tftp_PROPS using
+	LIBIDN.
+	* ftp/Makefile.am (AM_CPPFLAGS): Add $(INCIDN).
+	(LDADD): Add $(LIBIDN).
+	* talk/Makefile.am, telnet/Makefile.am
+	(AM_CPPFLAGS, LDADD): Likewise.
+	* src/Makefile.am (tftp_LDADD): Add $(LIBIDN).
+
+	* ftp/ftp.c [HAVE_IDNA_H]: Include <idna.h>.
+	(hookup): New variable RHOST.  Use RHOST in
+	getaddrinfo().
+	[HAVE_IDN]: Call idna_to_ascii_lz().
+	[!HAVE_IDN]: Strdup `host' as RHOST.
+	[AI_IDN]: Add to `hints.ai_flags'.
+	[AI_CANONIDN]: Likewise.
+	* ftp/main.c [HAVE_LOCALE_H]: Include <locale.h>.
+	(main) [HAVE_SETLOCALE]: Call setlocale().
+
+	* ping/libping.c (ping_set_dest) [AI_CANONIDN]:
+	Add to `hints.ai_flags' independently if AI_IDN.
+	* ping/ping6.c (ping_set_dest): Set AI_CANONNAME
+	on `hints.ai_flags'.  Strdup `result->ai_canonname'
+	to `ping->ping_hostname'.
+	[AI_CANONIDN]: Add to `hints.ai_flags'.
+
+	* src/tftp.c [HAVE_LOCALE_H]: Include <locale.h>.
+	[HAVE_IDNA_H]: Include <idna.h>.
+	(main) [HAVE_SETLOCALE): Call setlocale().
+	(resolve_name): New variable RNAME.  Use RNAME
+	with getaddrinfo().
+	[HAVE_IDN]: Call idna_to_ascii_lz().
+	[AI_IDN]: Add to `hints.ai_flags'.
+	[AI_CANONIDN]: Add to `hints.ai_flags'.
+
+	* talk/get_addrs.c [HAVE_IDNA_H]: Include <idna.h>.
+	(get_addrs): New variables LHOST, RHOST.  Use these
+	for address resolution with gethostbyname().
+	[HAVE_IDN]: Call idna_to_ascii_lz() twice.
+	* talk/talk.c [HAVE_LOCALE_H]: Include <locale.h>.
+	(main) [HAVE_SETLOCALE]: Call setlocale().
+
+	* telnet/commands.c [HAVE_IDNA_H]: Include <idna.h>.
+	(tn): New variable HOSTTMP.
+	[HAVE_IDN]: Call idna_to_ascii_lz() and let HOSTP
+	be identical to HOSTTMP if the call was successful.
+	Free HOSTTMP after use.
+	[IPV6 && AI_IDN]: Set `hints.ai_flags' to AI_IDN.
+	* telnet/main.c [HAVE_LOCALE_H]: Include <locale.h>.
+	(main) [HAVE_SETLOCALE]: Call setlocale().
+
 2013-03-30  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	* configure.ac <summary>: New variables `*_PROPS'
diff --git a/configure.ac b/configure.ac
index 6b5fd39..6c6de9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1040,7 +1040,11 @@ rlogind_PROPS="${rlogind_PROPS:+$rlogind_PROPS }$LIBWRAP"
 
 # Support for libidn.
 
+ftp_PROPS="${ftp_PROPS:+$ftp_PROPS }${LIBIDN:+-libidn}"
 ping_PROPS="${ping_PROPS:+$ping_PROPS }${LIBIDN:+-libidn}"
+talk_PROPS="${talk_PROPS:+$talk_PROPS }${LIBIDN:+-libidn}"
+telnet_PROPS="${telnet_PROPS:+$telnet_PROPS }${LIBIDN:+-libidn}"
+tftp_PROPS="${tftp_PROPS:+$tftp_PROPS }${LIBIDN:+-libidn}"
 traceroute_PROPS="${traceroute_PROPS:+$traceroute_PROPS }${LIBIDN:+-libidn}"
 
 # Termcap variants.
diff --git a/ftp/Makefile.am b/ftp/Makefile.am
index 3d134c7..cedfa70 100644
--- a/ftp/Makefile.am
+++ b/ftp/Makefile.am
@@ -22,11 +22,13 @@
 
 AM_CPPFLAGS = \
 	$(iu_INCLUDES) \
+	$(INCIDN) \
 	$(PATHDEF_TMP) $(PATHDEF_BSHELL)
 
 LDADD = \
 	$(iu_LIBRARIES) \
-	$(LIBGLOB) $(LIBREADLINE) $(LIBTERMCAP) $(LIBHISTORY)
+	$(LIBGLOB) $(LIBREADLINE) $(LIBTERMCAP) $(LIBHISTORY) \
+	$(LIBIDN)
 
 bin_PROGRAMS = $(ftp_BUILD)
 
diff --git a/ftp/ftp.c b/ftp/ftp.c
index 5c4eba2..34ef42d 100644
--- a/ftp/ftp.c
+++ b/ftp/ftp.c
@@ -83,6 +83,10 @@
 #include <stdarg.h>
 #include <sys/select.h>
 
+#ifdef HAVE_IDNA_H
+# include <idna.h>
+#endif
+
 #include "ftp_var.h"
 #include "unused-parameter.h"
 
@@ -129,6 +133,19 @@ hookup (char *host, int port)
   int s, tos;
   socklen_t len;
   static char hostnamebuf[80];
+  char *rhost;
+
+#ifdef HAVE_IDN
+  status = idna_to_ascii_lz (host, &rhost, 0);
+  if (status)
+    {
+      error (0, 0, "%s: %s", host, idna_strerror (status));
+      code = -1;
+      return ((char *) 0);
+    }
+#else /* !HAVE_IDN */
+  rhost = strdup (host);
+#endif
 
   snprintf (portstr, sizeof (portstr) - 1, "%u", port);
   memset (&hisctladdr, 0, sizeof (hisctladdr));
@@ -137,14 +154,22 @@ hookup (char *host, int port)
   hints.ai_family = usefamily;
   hints.ai_socktype = SOCK_STREAM;
   hints.ai_flags = AI_CANONNAME;
+#ifdef AI_IDN
+  hints.ai_flags |= AI_IDN;
+#endif
+#ifdef AI_CANONIDN
+  hints.ai_flags |= AI_CANONIDN;
+#endif
 
-  status = getaddrinfo (host, portstr, &hints, &res);
+  status = getaddrinfo (rhost, portstr, &hints, &res);
   if (status)
     {
-      error (0, 0, "%s: %s", host, gai_strerror (status));
+      error (0, 0, "%s: %s", rhost, gai_strerror (status));
       code = -1;
+      free (rhost);
       return ((char *) 0);
     }
+  free (rhost);
   strncpy (hostnamebuf, res->ai_canonname, sizeof (hostnamebuf));
   hostname = hostnamebuf;
 
diff --git a/ftp/main.c b/ftp/main.c
index 7ccb967..c01ba82 100644
--- a/ftp/main.c
+++ b/ftp/main.c
@@ -69,6 +69,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
 
 /* Define macro to nothing so declarations in ftp_var.h become definitions. */
 #define FTP_EXTERN
@@ -198,6 +201,10 @@ main (int argc, char *argv[])
 
   set_program_name (argv[0]);
 
+#ifdef HAVE_SETLOCALE
+  setlocale (LC_ALL, "");
+#endif
+
   doglob = 1;
   interactive = 1;
   autologin = 1;
diff --git a/ping/libping.c b/ping/libping.c
index 4339458..6bcbe8e 100644
--- a/ping/libping.c
+++ b/ping/libping.c
@@ -285,9 +285,9 @@ ping_set_dest (PING * ping, char *host)
   hints.ai_flags = AI_CANONNAME;
 # ifdef AI_IDN
   hints.ai_flags |= AI_IDN;
-#  ifdef AI_CANONIDN
+# endif
+# ifdef AI_CANONIDN
   hints.ai_flags |= AI_CANONIDN;
-#  endif
 # endif
 
   rc = getaddrinfo (p, NULL, &hints, &res);
diff --git a/ping/ping6.c b/ping/ping6.c
index 203790c..cb37f3f 100644
--- a/ping/ping6.c
+++ b/ping/ping6.c
@@ -1011,8 +1011,12 @@ ping_set_dest (PING * ping, char *host)
 
   memset (&hints, 0, sizeof (hints));
   hints.ai_family = AF_INET6;
+  hints.ai_flags = AI_CANONNAME;
 #ifdef AI_IDN
-  hints.ai_flags = AI_IDN;
+  hints.ai_flags |= AI_IDN;
+#endif
+#ifdef AI_CANONIDN
+  hints.ai_flags |= AI_CANONIDN;
 #endif
 
   err = getaddrinfo (rhost, NULL, &hints, &result);
@@ -1024,9 +1028,9 @@ ping_set_dest (PING * ping, char *host)
 
   memcpy (&ping->ping_dest.ping_sockaddr6, result->ai_addr, result->ai_addrlen);
 
+  ping->ping_hostname = strdup (result->ai_canonname);
   freeaddrinfo (result);
 
-  ping->ping_hostname = strdup (host);
   if (!ping->ping_hostname)
     return 1;
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 7cbcf98..189df7e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -75,6 +75,7 @@ EXTRA_PROGRAMS += rsh
 
 bin_PROGRAMS += $(tftp_BUILD)
 tftp_SOURCES = tftp.c
+tftp_LDADD = $(LDADD) $(LIBIDN)
 EXTRA_PROGRAMS += tftp
 
 bin_PROGRAMS += $(traceroute_BUILD)
diff --git a/src/tftp.c b/src/tftp.c
index c2ed52c..c6d0424 100644
--- a/src/tftp.c
+++ b/src/tftp.c
@@ -72,6 +72,13 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+#ifdef HAVE_IDNA_H
+# include <idna.h>
+#endif
+
 #include <argp.h>
 #include <unused-parameter.h>
 
@@ -263,6 +270,9 @@ main (int argc, char *argv[])
   struct servent *sp;
 
   set_program_name (argv[0]);
+#ifdef HAVE_SETLOCALE
+  setlocale (LC_ALL, "");
+#endif
   iu_argp_init ("tftp", default_program_authors);
   argp_parse (&argp, argc, argv, 0, NULL, NULL);
 
@@ -301,21 +311,43 @@ static int
 resolve_name (char *name)
 {
   int err;
+  char *rname;
   struct sockaddr_storage ss;
   struct addrinfo hints, *ai, *aiptr;
 
+#ifdef HAVE_IDN
+  err = idna_to_ascii_lz (name, &rname, 0);
+  if (err)
+    {
+      fprintf (stderr, "tftp: %s: %s\n", name, idna_strerror (err));
+      return RESOLVE_FAIL;
+    }
+#else /* !HAVE_IDN */
+  rname = name;
+#endif
+
   memset (&hints, 0, sizeof (hints));
   hints.ai_family = AF_UNSPEC;
   hints.ai_socktype = SOCK_DGRAM;
   hints.ai_flags = AI_CANONNAME;
+#ifdef AI_IDN
+  hints.ai_flags |= AI_IDN;
+#endif
+#ifdef AI_CANONIDN
+  hints.ai_flags |= AI_CANONIDN;
+#endif
 
-  err = getaddrinfo (name, "tftp", &hints, &aiptr);
+  err = getaddrinfo (rname, "tftp", &hints, &aiptr);
   if (err)
     {
-      fprintf (stderr, "tftp: %s: %s\n", name, gai_strerror (err));
+      fprintf (stderr, "tftp: %s: %s\n", rname, gai_strerror (err));
       return RESOLVE_FAIL;
     }
 
+#ifdef HAVE_IDN
+  free (rname);
+#endif
+
   if (f >= 0)
     {
       close (f);
diff --git a/talk/Makefile.am b/talk/Makefile.am
index ce0f99b..e42a274 100644
--- a/talk/Makefile.am
+++ b/talk/Makefile.am
@@ -20,11 +20,11 @@
 
 AM_CPPFLAGS = \
 	$(iu_INCLUDES) \
-	$(NCURSES_INCLUDE)
+	$(NCURSES_INCLUDE) $(INCIDN)
 
 LDADD = \
 	$(iu_LIBRARIES) \
-	$(LIBCURSES)
+	$(LIBCURSES) $(LIBIDN)
 
 bin_PROGRAMS = $(talk_BUILD)
 
diff --git a/talk/get_addrs.c b/talk/get_addrs.c
index b5e9a0e..d91a788 100644
--- a/talk/get_addrs.c
+++ b/talk/get_addrs.c
@@ -59,20 +59,48 @@
 #include <netdb.h>
 #include <stdio.h>
 #include <unistd.h>
+#ifdef HAVE_IDNA_H
+# include <idna.h>
+#endif
+
 #include "talk_ctl.h"
 
 int
 get_addrs (char *my_machine_name, char *his_machine_name)
 {
+  char *lhost, *rhost;
   struct hostent *hp;
   struct servent *sp;
 
+#ifdef HAVE_IDN
+  int err;
+
+  err = idna_to_ascii_lz (my_machine_name, &lhost, 0);
+  if (err)
+    {
+      fprintf (stderr, "talk: %s: %s\n",
+	       my_machine_name, idna_strerror (err));
+      exit (-1);
+    }
+
+  err = idna_to_ascii_lz (his_machine_name, &rhost, 0);
+  if (err)
+    {
+      fprintf (stderr, "talk: %s: %s\n",
+	       his_machine_name, idna_strerror (err));
+      exit (-1);
+    }
+#else /* !HAVE_IDN */
+  lhost = my_machine_name;
+  rhost = his_machine_name;
+#endif
+
   msg.pid = htonl (getpid ());
   /* look up the address of the local host */
-  hp = gethostbyname (my_machine_name);
+  hp = gethostbyname (lhost);
   if (hp == NULL)
     {
-      fprintf (stderr, "talk: %s: ", my_machine_name);
+      fprintf (stderr, "talk: %s(%s): ", lhost, my_machine_name);
       herror ((char *) NULL);
       exit (-1);
     }
@@ -81,12 +109,12 @@ get_addrs (char *my_machine_name, char *his_machine_name)
    * If the callee is on-machine, just copy the
    * network address, otherwise do a lookup...
    */
-  if (strcmp (his_machine_name, my_machine_name))
+  if (strcmp (rhost, lhost))
     {
-      hp = gethostbyname (his_machine_name);
+      hp = gethostbyname (rhost);
       if (hp == NULL)
 	{
-	  fprintf (stderr, "talk: %s: ", his_machine_name);
+	  fprintf (stderr, "talk: %s(%s): ", rhost, his_machine_name);
 	  herror ((char *) NULL);
 	  exit (-1);
 	}
@@ -104,5 +132,10 @@ get_addrs (char *my_machine_name, char *his_machine_name)
     }
   daemon_port = ntohs (sp->s_port);
 
+#ifdef HAVE_IDN
+  free (lhost);
+  free (rhost);
+#endif
+
   return 0;
 }
diff --git a/talk/talk.c b/talk/talk.c
index cd6379b..7cead32 100644
--- a/talk/talk.c
+++ b/talk/talk.c
@@ -49,10 +49,13 @@
 
 #include <config.h>
 #include <stdlib.h>
+#include <unistd.h>
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
 
 #include "talk.h"
 #include <argp.h>
-#include <unistd.h>
 #include <libinetutils.h>
 
 void usage (void);
@@ -89,6 +92,9 @@ main (int argc, char *argv[])
   int index;
 
   set_program_name (argv[0]);
+#ifdef HAVE_SETLOCALE
+  setlocale (LC_ALL, "");
+#endif
   iu_argp_init ("talk", program_authors);
   argp_parse (&argp, argc, argv, 0, &index, NULL);
 
diff --git a/telnet/Makefile.am b/telnet/Makefile.am
index 29b3bcb..b9e771b 100644
--- a/telnet/Makefile.am
+++ b/telnet/Makefile.am
@@ -22,12 +22,12 @@ AM_CPPFLAGS = \
 	-DTERMCAP -DLINEMODE -DKLUDGELINEMODE -DENV_HACK \
 	$(iu_INCLUDES) \
 	-I$(top_srcdir) \
-	$(NCURSES_INCLUDE)
+	$(NCURSES_INCLUDE) $(INCIDN)
 
 LDADD = \
 	$(top_builddir)/libtelnet/libtelnet.a \
 	$(iu_LIBRARIES) \
-	$(LIBTERMCAP) $(LIBCRYPT) $(LIBAUTH)
+	$(LIBTERMCAP) $(LIBCRYPT) $(LIBAUTH) $(LIBIDN)
 
 bin_PROGRAMS = $(telnet_BUILD)
 
diff --git a/telnet/commands.c b/telnet/commands.c
index 7c409a9..8553771 100644
--- a/telnet/commands.c
+++ b/telnet/commands.c
@@ -74,6 +74,10 @@
 #include <arpa/inet.h>
 #include <arpa/telnet.h>
 
+#ifdef HAVE_IDNA_H
+# include <idna.h>
+#endif
+
 #include <unused-parameter.h>
 #include <libinetutils.h>
 
@@ -2446,7 +2450,7 @@ tn (int argc, char *argv[])
 #endif
   const int on = 1;
   int err;
-  char *cmd, *hostp = 0, *portp = 0, *user = 0;
+  char *cmd, *hostp = 0, *hosttmp = 0, *portp = 0, *user = 0;
 
 #ifdef IPV6
   memset (&hints, 0, sizeof (hints));
@@ -2589,8 +2593,22 @@ tn (int argc, char *argv[])
   }
 #endif /* AUTHENTICATION || ENCRYPTION */
 
+#ifdef HAVE_IDN
+  err = idna_to_ascii_lz (hostp, &hosttmp, 0);
+  if (err)
+    {
+      printf ("Server lookup failure:  %s:%s, %s\n",
+	      hostp, portp, idna_strerror (err));
+      return 0;
+    }
+  hostp = hosttmp;
+#endif /* !HAVE_IDN */
+
 #ifdef IPV6
   hints.ai_socktype = SOCK_STREAM;
+# ifdef AI_IDN
+  hints.ai_flags = AI_IDN;
+# endif
 
   err = getaddrinfo (hostp, portp, &hints, &result);
   if (err)
@@ -2757,7 +2775,13 @@ tn (int argc, char *argv[])
     }
   while (connected == 0);
 #endif /* !IPV6 */
+
   cmdrc (hostp, hostname);
+#ifdef HAVE_IDN
+  /* Last use of HOSTP, alias HOSTTMP.  */
+  free (hosttmp);
+#endif
+
   if (autologin && user == NULL)
     {
       struct passwd *pw;
diff --git a/telnet/main.c b/telnet/main.c
index cda8edc..15b0c10 100644
--- a/telnet/main.c
+++ b/telnet/main.c
@@ -52,6 +52,9 @@
 #include <sys/types.h>
 
 #include <stdlib.h>
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
 
 #include "ring.h"
 #include "defines.h"
@@ -335,6 +338,10 @@ main (int argc, char *argv[])
 
   set_program_name (argv[0]);
 
+#ifdef HAVE_SETLOCALE
+  setlocale (LC_ALL, "");
+#endif
+
   tninit ();			/* Clear out things */
 #if defined CRAY && !defined __STDC__
   _setlist_init ();		/* Work around compiler bug */

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

Summary of changes:
 ChangeLog          |   68 +++++++++++++++++++++++
 NEWS               |    9 +++
 configure.ac       |    4 ++
 ftp/Makefile.am    |    4 +-
 ftp/ftp.c          |   29 +++++++++-
 ftp/main.c         |    7 +++
 ping/libping.c     |    4 +-
 ping/ping6.c       |    8 ++-
 src/Makefile.am    |    1 +
 src/tftp.c         |   36 ++++++++++++-
 talk/Makefile.am   |    4 +-
 talk/get_addrs.c   |  153 +++++++++++++++++++++++++++++++++++++++++++++++++---
 talk/talk.c        |    8 +++-
 telnet/Makefile.am |    4 +-
 telnet/commands.c  |   26 +++++++++-
 telnet/main.c      |    7 +++
 16 files changed, 350 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Fri Apr 05 05:34:10 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1UO32A-0004Vi-MB
	for mharc-commit-inetutils@gnu.org; Fri, 05 Apr 2013 05:34:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33759)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UO324-0004JE-Qd
	for commit-inetutils@gnu.org; Fri, 05 Apr 2013 05:34:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UO31x-0007rz-Io
	for commit-inetutils@gnu.org; Fri, 05 Apr 2013 05:34:04 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:37606)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UO31x-0007ru-Gk
	for commit-inetutils@gnu.org; Fri, 05 Apr 2013 05:33:57 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1UO31x-0002st-2H
	for commit-inetutils@gnu.org; Fri, 05 Apr 2013 09:33:57 +0000
Date: Fri, 05 Apr 2013 09:33:57 +0000
Message-Id: <E1UO31x-0002st-2H@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-268-g4850ad6
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 58d533764dd4e50bd48c835db80d35693e5dabca
X-Git-Newrev: 4850ad628e9fb0e85d305bb44ef17ba7f56bf8e4
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
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, 05 Apr 2013 09:34: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  4850ad628e9fb0e85d305bb44ef17ba7f56bf8e4 (commit)
      from  58d533764dd4e50bd48c835db80d35693e5dabca (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=4850ad628e9fb0e85d305bb44ef17ba7f56bf8e4


commit 4850ad628e9fb0e85d305bb44ef17ba7f56bf8e4
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Apr 5 11:09:50 2013 +0200

    talk: Non-ASCII characters.

diff --git a/ChangeLog b/ChangeLog
index 912d03f..02541c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2013-04-05  Mats Erik Andersson  <gnu@gisladisker.se>
 
+	talk: Non-ASCII characters.
+
+	* talk/display.c: Include <ctype.h>.
+	(display): Check printability with isprint().
+	Prevent sign extension of char as integer.
+
+2013-04-05  Mats Erik Andersson  <gnu@gisladisker.se>
+
 	talk: Address resolution.
 
 	* talk/get_addrs.c (get_addrs): Implement resolver
diff --git a/talk/display.c b/talk/display.c
index 6df1ada..64b77f3 100644
--- a/talk/display.c
+++ b/talk/display.c
@@ -54,6 +54,7 @@
 
 #include <config.h>
 
+#include <ctype.h>
 #include "talk.h"
 
 xwin_t my_win;
@@ -202,7 +203,18 @@ display (register xwin_t * win, register char *text, int size)
 	  /* check for wraparound */
 	  xscroll (win, 0);
 	}
-      if (*text < ' ' && *text != '\t')
+
+      /*
+       * Printable characters, SP, and TAB are printed
+       * verbatim.  Characters beyond the ASCII table
+       * must be handled.  Beware of sign extension!
+       *
+       * The locale setting is in effect when testing
+       * printability of any input character.
+       */
+      if (isprint (*text & 0xff) || *text == '\t')
+	waddch (win->x_win, *text & 0xff);
+      else
 	{
 	  waddch (win->x_win, '^');
 	  getyx (win->x_win, win->x_line, win->x_col);
@@ -211,8 +223,7 @@ display (register xwin_t * win, register char *text, int size)
 	  cch = (*text & 63) + 64;
 	  waddch (win->x_win, cch);
 	}
-      else
-	waddch (win->x_win, *text);
+
       getyx (win->x_win, win->x_line, win->x_col);
       text++;
     }

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

Summary of changes:
 ChangeLog      |    8 ++++++++
 talk/display.c |   17 ++++++++++++++---
 2 files changed, 22 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed Apr 10 11:07:55 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1UPwct-0007E8-Aj
	for mharc-commit-inetutils@gnu.org; Wed, 10 Apr 2013 11:07:55 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59769)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UPwcj-0007B8-QA
	for commit-inetutils@gnu.org; Wed, 10 Apr 2013 11:07:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UPwcf-0007sp-3A
	for commit-inetutils@gnu.org; Wed, 10 Apr 2013 11:07:45 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:41393)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UPwce-0007sf-Rs
	for commit-inetutils@gnu.org; Wed, 10 Apr 2013 11:07:40 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1UPwce-0003gp-8H
	for commit-inetutils@gnu.org; Wed, 10 Apr 2013 15:07:40 +0000
Date: Wed, 10 Apr 2013 15:07:40 +0000
Message-Id: <E1UPwce-0003gp-8H@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-269-g6e85957
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4850ad628e9fb0e85d305bb44ef17ba7f56bf8e4
X-Git-Newrev: 6e8595711a161a4be05ff091796d6ddc901246e5
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
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, 10 Apr 2013 15:07:54 -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  6e8595711a161a4be05ff091796d6ddc901246e5 (commit)
      from  4850ad628e9fb0e85d305bb44ef17ba7f56bf8e4 (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=6e8595711a161a4be05ff091796d6ddc901246e5


commit 6e8595711a161a4be05ff091796d6ddc901246e5
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed Apr 10 16:17:38 2013 +0200

    telnet, telnetd: Buffer security.

diff --git a/ChangeLog b/ChangeLog
index 02541c8..07caf91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,47 @@
+2013-04-09  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	telnet, telnetd: Termcap buffer length recommendation.
+
+	* telnet/telnet.c (termbuf): Increase length to 2048,
+	and initialize to zero.
+	(init_term) [HAVE_TGETENT]: Handle case `err == 1',
+	since it can only happen here.
+	* telnetd/utility.c (terminaltypeok) [HAVE_TGETENT]:
+	Declare BUF.  Call tgetent() to decide return status.
+	[!HAVE_GETENT]: Always return 1, lacking the knowledge
+	to make any other decision relvant for return status.
+
+	telnetd, libtelnet: Buffer overflow prevention.
+
+	* telnetd/telnetd.h (getterminaltype): New signature.
+	* telnetd/telnetd.c (telnetd_setup): Add buffer
+	length in call getterminaltype().
+	* telnetd/utility.c (getterminaltype): New second
+	argument `size_t len'.  Pass `len' to auth_wait().
+	* libtelnet/auth-proto.h (auth_wait): New signature.
+	(kerberos4_status) [KRB4]: Likewise.
+	(kerberos5_status) [KRB5]: Likewise.
+	(krb5shishi_status) [SHISHI]: Likewise.
+	* libtelnet/auth.h (typedef TN_Authenticator):
+	New signature of member `*status'.
+	* libtelnet/auth.c (auth_wait): New parameter `len'.
+	Pass `len' in the call *authenticated->status().
+	* libtelnet/kerberos.c (kerberos4_status): New third
+	argument `size_t len'.  Call strncpy().
+	* libtelnet/kerberos5.c (kerberos5_status): Likewise.
+	* libtelnet/shishi.c (krb5shishi_status): Likewise.
+	(krb5shishi_is_auth): Type CNAMEREALMLEN as size_t.
+
+	libtelnet: Minor warnings for casts.
+
+	* libtelnet/encrypt.h (typedef Session_Key)
+	[!HAVE_ARPA_TELNET_H_SESSION_KEY]: Make `data' a
+	const char pointer.
+	* libtelnet/encrypt.c (EncryptDisable): Cast second
+	argument in genget() as `char **'.  Cast argument
+	to Ambiguous() as `char *'.
+	(EncryptType): Likewise.
+
 2013-04-05  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	talk: Non-ASCII characters.
diff --git a/libtelnet/auth-proto.h b/libtelnet/auth-proto.h
index 7d21375..975a395 100644
--- a/libtelnet/auth-proto.h
+++ b/libtelnet/auth-proto.h
@@ -78,7 +78,7 @@ void auth_send_retry (void);
 void auth_is (unsigned char *, int);
 void auth_reply (unsigned char *, int);
 void auth_finished (TN_Authenticator *, int);
-int auth_wait (char *);
+int auth_wait (char *, size_t);
 void auth_name (unsigned char *, int);
 void auth_disable_name (char *);
 void auth_printsub (unsigned char *, int, unsigned char *, int);
@@ -89,7 +89,7 @@ int kerberos4_init (TN_Authenticator *, int);
 int kerberos4_send (TN_Authenticator *);
 void kerberos4_is (TN_Authenticator *, unsigned char *, int);
 void kerberos4_reply (TN_Authenticator *, unsigned char *, int);
-int kerberos4_status (TN_Authenticator *, char *, int);
+int kerberos4_status (TN_Authenticator *, char *, size_t, int);
 void kerberos4_printsub (unsigned char *, int, unsigned char *, int);
 # endif
 
@@ -98,7 +98,7 @@ int kerberos5_init (TN_Authenticator *, int);
 int kerberos5_send (TN_Authenticator *);
 void kerberos5_is (TN_Authenticator *, unsigned char *, int);
 void kerberos5_reply (TN_Authenticator *, unsigned char *, int);
-int kerberos5_status (TN_Authenticator *, char *, int);
+int kerberos5_status (TN_Authenticator *, char *, size_t, int);
 void kerberos5_printsub (unsigned char *, int, unsigned char *, int);
 # endif
 
@@ -107,7 +107,7 @@ int krb5shishi_init (TN_Authenticator *, int);
 int krb5shishi_send (TN_Authenticator *);
 void krb5shishi_is (TN_Authenticator *, unsigned char *, int);
 void krb5shishi_reply (TN_Authenticator *, unsigned char *, int);
-int krb5shishi_status (TN_Authenticator *, char *, int);
+int krb5shishi_status (TN_Authenticator *, char *, size_t, int);
 void krb5shishi_printsub (unsigned char *, int, unsigned char *, int);
 void krb5shishi_cleanup (TN_Authenticator *);
 # endif
diff --git a/libtelnet/auth.c b/libtelnet/auth.c
index 753377d..9e5a61b 100644
--- a/libtelnet/auth.c
+++ b/libtelnet/auth.c
@@ -664,7 +664,7 @@ auth_intr (int sig _GL_UNUSED_PARAMETER)
 }
 
 int
-auth_wait (char *name)
+auth_wait (char *name, size_t len)
 {
   if (auth_debug_mode)
     printf (">>>%s: in auth_wait.\r\n", Name);
@@ -690,7 +690,8 @@ auth_wait (char *name)
     validuser = AUTH_USER;
 
   if (authenticated->status)
-    validuser = (*authenticated->status) (authenticated, name, validuser);
+    validuser = (*authenticated->status) (authenticated, name, len,
+					  validuser);
   return (validuser);
 }
 
diff --git a/libtelnet/auth.h b/libtelnet/auth.h
index 4c8474a..340acb5 100644
--- a/libtelnet/auth.h
+++ b/libtelnet/auth.h
@@ -95,7 +95,7 @@ typedef struct XauthP
   int (*send) (struct XauthP *);
   void (*is) (struct XauthP *, unsigned char *, int);
   void (*reply) (struct XauthP *, unsigned char *, int);
-  int (*status) (struct XauthP *, char *, int);
+  int (*status) (struct XauthP *, char *, size_t, int);
   void (*printsub) (unsigned char *, int, unsigned char *, int);
   void (*cleanup) (struct XauthP *);
 } TN_Authenticator;
diff --git a/libtelnet/encrypt.c b/libtelnet/encrypt.c
index f28c2dd..b55aa9b 100644
--- a/libtelnet/encrypt.c
+++ b/libtelnet/encrypt.c
@@ -265,10 +265,10 @@ EncryptDisable (char *type, char *mode)
       printf ("Usage: encrypt disable <type> [input|output]\n");
       encrypt_list_types ();
     }
-  else if ((ep = (Encryptions *) genget (type, encryptions,
+  else if ((ep = (Encryptions *) genget (type, (char **) encryptions,
 					 sizeof (Encryptions))) == 0)
     printf ("%s: invalid encryption type\n", type);
-  else if (Ambiguous (ep))
+  else if (Ambiguous ((char *) ep))
     printf ("Ambiguous type '%s'\n", type);
   else
     {
@@ -303,10 +303,10 @@ EncryptType (char *type, char *mode)
       printf ("Usage: encrypt type <type> [input|output]\n");
       encrypt_list_types ();
     }
-  else if ((ep = (Encryptions *) genget (type, encryptions,
+  else if ((ep = (Encryptions *) genget (type, (char **) encryptions,
 					 sizeof (Encryptions))) == 0)
     printf ("%s: invalid encryption type\n", type);
-  else if (Ambiguous (ep))
+  else if (Ambiguous ((char *) ep))
     printf ("Ambiguous type '%s'\n", type);
   else
     {
diff --git a/libtelnet/encrypt.h b/libtelnet/encrypt.h
index 2dcdb0a..444826f 100644
--- a/libtelnet/encrypt.h
+++ b/libtelnet/encrypt.h
@@ -96,7 +96,7 @@ typedef struct
 {
   Block _;
 } Schedule[16];
-#  endif /* HAVE_ARPA_TELNET_H_SCHEDULE */
+#  endif /* !HAVE_ARPA_TELNET_H_SCHEDULE */
 
 #  ifndef VALIDKEY
 #   define VALIDKEY(key)	( key[0] | key[1] | key[2] | key[3] | \
@@ -110,9 +110,9 @@ typedef struct
 {
   short type;
   int length;
-  unsigned char *data;
+  const unsigned char *data;
 } Session_Key;
-#  endif /* HAVE_ARPA_TELNET_H_SESSION_KEY */
+#  endif /* !HAVE_ARPA_TELNET_H_SESSION_KEY */
 
 typedef struct
 {
diff --git a/libtelnet/kerberos.c b/libtelnet/kerberos.c
index 8d80c5f..74179c1 100644
--- a/libtelnet/kerberos.c
+++ b/libtelnet/kerberos.c
@@ -475,9 +475,10 @@ kerberos4_reply (ap, data, cnt)
 }
 
 int
-kerberos4_status (ap, name, level)
+kerberos4_status (ap, name, len, level)
      TN_Authenticator *ap;
      char *name;
+     size_t len;
      int level;
 {
   if (level < AUTH_USER)
@@ -485,7 +486,7 @@ kerberos4_status (ap, name, level)
 
   if (UserNameRequested && !kuserok (&adat, UserNameRequested))
     {
-      strcpy (name, UserNameRequested);
+      strncpy (name, UserNameRequested, len);
       return (AUTH_VALID);
     }
   else
diff --git a/libtelnet/kerberos5.c b/libtelnet/kerberos5.c
index 7b41ae5..521def6 100644
--- a/libtelnet/kerberos5.c
+++ b/libtelnet/kerberos5.c
@@ -426,7 +426,8 @@ kerberos5_reply (TN_Authenticator * ap, unsigned char *data, int cnt)
 }
 
 int
-kerberos5_status (TN_Authenticator * ap, char *name, int level)
+kerberos5_status (TN_Authenticator * ap, char *name, size_t len,
+		  int level)
 {
   if (level < AUTH_USER)
     return level;
@@ -436,7 +437,7 @@ kerberos5_status (TN_Authenticator * ap, char *name, int level)
 		       UserNameRequested))
     {
       /* FIXME: Check buffer length */
-      strcpy (name, UserNameRequested);
+      strncpy (name, UserNameRequested, len);
       return AUTH_VALID;
     }
   return AUTH_USER;
diff --git a/libtelnet/shishi.c b/libtelnet/shishi.c
index 9edd4e5..d51ec41 100644
--- a/libtelnet/shishi.c
+++ b/libtelnet/shishi.c
@@ -392,7 +392,8 @@ krb5shishi_reply (TN_Authenticator * ap, unsigned char *data, int cnt)
 }
 
 int
-krb5shishi_status (TN_Authenticator * ap, char *name, int level)
+krb5shishi_status (TN_Authenticator * ap, char *name, size_t len,
+		   int level)
 {
   int rc;
   int status;
@@ -406,7 +407,7 @@ krb5shishi_status (TN_Authenticator * ap, char *name, int level)
 			      UserNameRequested))
     {
       /* FIXME: Check buffer length */
-      strcpy (name, UserNameRequested);
+      strncpy (name, UserNameRequested, len);
       status = AUTH_VALID;
     }
   else
@@ -422,7 +423,7 @@ krb5shishi_is_auth (TN_Authenticator * a, unsigned char *data, int cnt,
   Shishi_key *key, *key2;
   int rc;
   char *cnamerealm, *server = NULL, *realm = NULL;
-  int cnamerealmlen;
+  size_t cnamerealmlen;
 # ifdef ENCRYPTION
   Session_Key skey;
 # endif
diff --git a/telnet/telnet.c b/telnet/telnet.c
index ab1cb99..8055fc7 100644
--- a/telnet/telnet.c
+++ b/telnet/telnet.c
@@ -604,7 +604,7 @@ is_unique (register char *name, register char **as, register char **ae)
 
 /*
  * Given a buffer returned by tgetent(), this routine will turn
- * the pipe seperated list of names in the buffer into an array
+ * the pipe separated list of names in the buffer into an array
  * of pointers to null terminated names.  We toss out any bad,
  * duplicate, or verbose names (names with spaces).
  */
@@ -642,7 +642,7 @@ mklist (char *buf, char *name)
 	n++;
     }
   /*
-   * Allocate an array to put the name pointers into
+   * Allocate an array to put the name pointers into.
    */
   argv = (char **) malloc ((n + 3) * sizeof (char *));
   if (argv == 0)
@@ -733,16 +733,20 @@ mklist (char *buf, char *name)
     return (unknown);
 }
 
-
-char termbuf[1024];
+/* Mostly ignored by contemorary implementations,
+ * but still used by NetBSD.
+ * mklist will examine this buffer, so erase it
+ * to cover corner cases.
+ */
+char termbuf[2048] = { 0 };
 
 static int
 init_term (char *tname, int *errp)
 {
   int err = -1;
+
 #ifdef HAVE_TGETENT
   err = tgetent (termbuf, tname);
-#endif
   if (err == 1)
     {
       termbuf[sizeof (termbuf) - 1] = '\0';
@@ -750,6 +754,7 @@ init_term (char *tname, int *errp)
 	*errp = 1;
       return (0);
     }
+#endif /* HAVE_TGETENT */
   if (errp)
     *errp = 0;
   return (-1);
diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c
index 82243c5..3dfec8d 100644
--- a/telnetd/telnetd.c
+++ b/telnetd/telnetd.c
@@ -474,7 +474,7 @@ telnetd_setup (int fd)
 
   /* get terminal type. */
   uname[0] = 0;
-  level = getterminaltype (uname);
+  level = getterminaltype (uname, sizeof (uname));
   setenv ("TERM", terminaltype ? terminaltype : "network", 1);
   if (uname[0])
     user_name = xstrdup (uname);
diff --git a/telnetd/telnetd.h b/telnetd/telnetd.h
index b0baa0a..6443195 100644
--- a/telnetd/telnetd.h
+++ b/telnetd/telnetd.h
@@ -369,7 +369,7 @@ extern int (*decrypt_input) (int);
 #endif /* ENCRYPTION */
 
 extern int startslave (char *host, int autologin, char *autoname);
-extern int getterminaltype (char *user_name);
+extern int getterminaltype (char *user_name, size_t len);
 extern int net_input_level (void);
 extern int net_output_level (void);
 extern int net_read (void);
diff --git a/telnetd/utility.c b/telnetd/utility.c
index 3ef7962..4e669b7 100644
--- a/telnetd/utility.c
+++ b/telnetd/utility.c
@@ -688,11 +688,11 @@ _gettermname (void)
   ttloop (sequenceIs (ttypesubopt, baseline));
 }
 
-/* FIXME: should be getterminaltype (char *user_name, size_t size)
-   Changes terminaltype.
+/*
+ * Changes terminaltype.
  */
 int
-getterminaltype (char *user_name)
+getterminaltype (char *user_name, size_t len)
 {
   int retval = -1;
 
@@ -718,7 +718,7 @@ getterminaltype (char *user_name)
       ttloop (his_will_wont_is_changing (TELOPT_AUTHENTICATION));
 
       if (his_state_is_will (TELOPT_AUTHENTICATION))
-	retval = auth_wait (user_name);
+	retval = auth_wait (user_name, len);
     }
 #else /* !AUTHENTICATION */
   (void) user_name;	/* Silence warning.  */
@@ -844,18 +844,24 @@ getterminaltype (char *user_name)
   return retval;
 }
 
+/*
+ * Exit status:
+ *
+ *  1   Accepted terminal type, or inconclusive,
+ *  0   Explicitly unsupported type.
+ */
 int
 terminaltypeok (char *s)
 {
+#ifdef HAVE_TGETENT
   char buf[2048];
 
   if (terminaltype == NULL)
     return 1;
 
-#ifdef HAVE_TGETENT
   if (tgetent (buf, s) == 0)
-#endif
     return 0;
+#endif /* HAVE_TGETENT */
 
   return 1;
 }

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

Summary of changes:
 ChangeLog              |   44 ++++++++++++++++++++++++++++++++++++++++++++
 libtelnet/auth-proto.h |    8 ++++----
 libtelnet/auth.c       |    5 +++--
 libtelnet/auth.h       |    2 +-
 libtelnet/encrypt.c    |    8 ++++----
 libtelnet/encrypt.h    |    6 +++---
 libtelnet/kerberos.c   |    5 +++--
 libtelnet/kerberos5.c  |    5 +++--
 libtelnet/shishi.c     |    7 ++++---
 telnet/telnet.c        |   15 ++++++++++-----
 telnetd/telnetd.c      |    2 +-
 telnetd/telnetd.h      |    2 +-
 telnetd/utility.c      |   18 ++++++++++++------
 13 files changed, 93 insertions(+), 34 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed Apr 10 15:30:52 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1UQ0jL-0005qF-VU
	for mharc-commit-inetutils@gnu.org; Wed, 10 Apr 2013 15:30:51 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44798)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UQ0jE-0005oE-Hd
	for commit-inetutils@gnu.org; Wed, 10 Apr 2013 15:30:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UQ0jC-0006En-D8
	for commit-inetutils@gnu.org; Wed, 10 Apr 2013 15:30:44 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:45804)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UQ0jC-0006Ej-9A
	for commit-inetutils@gnu.org; Wed, 10 Apr 2013 15:30:42 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1UQ0jB-0007sq-U4
	for commit-inetutils@gnu.org; Wed, 10 Apr 2013 19:30:42 +0000
Date: Wed, 10 Apr 2013 19:30:41 +0000
Message-Id: <E1UQ0jB-0007sq-U4@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-270-gef002d9
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6e8595711a161a4be05ff091796d6ddc901246e5
X-Git-Newrev: ef002d90516083a93d34d341f383153eadd1c409
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
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, 10 Apr 2013 19:30:50 -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  ef002d90516083a93d34d341f383153eadd1c409 (commit)
      from  6e8595711a161a4be05ff091796d6ddc901246e5 (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=ef002d90516083a93d34d341f383153eadd1c409


commit ef002d90516083a93d34d341f383153eadd1c409
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed Apr 10 21:27:06 2013 +0200

    Documentation

diff --git a/ChangeLog b/ChangeLog
index 07caf91..3a5ad04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-04-10  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	* doc/inetutils.texi <main menu>: Order invocation
+	nodes in lexicographical order.
+	<ping6 invocation>: New node.
+
 2013-04-09  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	telnet, telnetd: Termcap buffer length recommendation.
diff --git a/doc/inetutils.texi b/doc/inetutils.texi
index 33b779d..ad7870a 100644
--- a/doc/inetutils.texi
+++ b/doc/inetutils.texi
@@ -36,6 +36,7 @@
 * inetd: (inetutils)inetd invocation.             Internet super-server.
 * logger: (inetutils)logger invocation.           Send messages to the system log.
 * ping: (inetutils)ping invocation.               Packets to network hosts.
+* ping6: (inetutils)ping6 invocation.             Packets to IPv6 network hosts.
 * rcp: (inetutils)rcp invocation.                 Remote copy
 * rexec: (inetutils)rexec invocation.             Remote execution client.
 * rexecd: (inetutils)rexecd invocation.           Remote execution server.
@@ -99,35 +100,36 @@ Documentation License''.
 
 Diagnostic programs
 
-* hostname invocation::                Show or set system host name.
 * dnsdomainname invocation::           Show DNS domain name.
+* hostname invocation::                Show or set system host name.
 * logger invocation::                  Send messages to system log.
 * ping invocation::                    Packets to network hosts.
+* ping6 invocation::                   Packets to IPv6 network hosts.
 * traceroute invocation::              Trace the route to a host.
 * whois invocation::                   Whois user interface.
 
 Clients
 
 * ftp invocation::                     FTP client.
-* tftp invocation::                    TFTP client.
-* rsh invocation::                     Remote shell.
-* rlogin invocation::                  Remote login.
 * rcp invocation::                     Remote copy
 * rexec invocation::                   Remote execution client.
+* rlogin invocation::                  Remote login.
+* rsh invocation::                     Remote shell.
 * talk invocation::                    Talk client.
 * telnet invocation::                  User interface to TELNET.
+* tftp invocation::                    TFTP client.
 
 Daemons
 
-* inetd invocation::                   Internet super-server.
-* syslogd invocation::                 Syslog server.
 * ftpd invocation::                    FTP Daemon.
-* tftpd invocation::                   TFTP server.
-* rshd invocation::                    Remote shell server.
-* rlogind invocation::                 Remote login server.
+* inetd invocation::                   Internet super-server.
 * rexecd invocation::                  Remote execution server.
+* rlogind invocation::                 Remote login server.
+* rshd invocation::                    Remote shell server.
+* syslogd invocation::                 Syslog server.
 * talkd invocation::                   Talk server.
 * telnetd invocation::                 Telnet server.
+* tftpd invocation::                   TFTP server.
 * uucpd invocation::                   Unix to Unix Copy.
 
 * GNU Free Documentation License::     The license for this manual.
@@ -504,7 +506,7 @@ an arbitrary number of @dfn{padding} bytes used to fill out the packet.
 Synopsis:
 
 @example
-ping [@var{option}@dots{}] @var{host}@dots{}
+ping [@var{option}@dots{}] @var{host}
 @end example
 
 @noindent
@@ -591,7 +593,7 @@ Stop after sending and receiving answers to a total of
 @var{n} packets.
 
 @item -d
-@itemx -debug
+@itemx --debug
 @opindex -d
 @opindex --debug
 Set the SO_DEBUG option on the socket being used.
@@ -861,6 +863,164 @@ to ICMP_MASKREQ packets, but in general, Unices are designed either
 to answer the request with a valid netmask, or to drop the request,
 causing @command{ping} to wait for a timeout condition.
 
+@node ping6 invocation
+@chapter @command{ping6}: Packets to IPv6 network hosts
+@cindex ping6
+
+@command{ping6} uses ICMPv6 datagrams to get a response
+from the chosen destination host.
+The most common use is to probe whether the remote
+system is responsive.
+Observe that this program only uses IPv6 datagrams.
+
+Each datagram, of type @code{ECHO_REQUEST}, carries some header
+information and some additional payload, usually a time stamp.
+Making a suitable choice of payload, it is possible to probe
+different host or router properties on the way as the emitted
+datagram travels to its destination.
+
+@noindent
+Synopsis:
+
+@example
+ping6 [@var{option}@dots{}] @var{host}
+@end example
+
+@noindent
+Sending simple, timed echo requests is the standard use
+of @command{ping6}, but is by far not the only use case.
+
+This command is a close parallel to @command{ping},
+except that it handles IPv6 and is thus not able
+to handle peculiarities of IPv4.
+
+@section Command line options
+@anchor{ping6 options}
+
+@table @option
+@item -c @var{n}
+@itemx --count=@var{n}
+@opindex -c
+@opindex --count
+Stop after sending and receiving answers to a total of
+@var{n} packets.
+
+@item -d
+@itemx --debug
+@opindex -d
+@opindex --debug
+Set the SO_DEBUG option on the socket being used.
+
+@item -f
+@itemx --flood
+@opindex -f
+@opindex --flood
+Flood ping.
+Outputs packets as fast as they come back,
+or one hundred times per second, whichever is more.
+For every ECHO_REQUEST packet sent, a period @samp{.} is printed,
+while for every ECHO_REPLY received in reply, a backspace is printed.
+
+This provides a rapid display of how many packets are being dropped.
+Only the super-user may use this option.
+This mode can be very hard on a network.
+It should be used with caution!
+
+@item --hoplimit=@var{n}
+@opindex --hoplimit
+Limit maximal distance to @var{n}.
+Acceptable values are 1 to 255, inclusive.
+
+@item -i @var{n}
+@itemx --interval=@var{n}
+@opindex -i
+@opindex --interval
+Wait @var{n} seconds until sending next packet.
+The default is to wait for one second between packets.
+This option is incompatible with the option @option{-f}.
+
+@item -l @var{n}
+@itemx --preload=@var{n}
+@opindex -l
+@opindex --preload
+Sends @var{n} packets as fast as possible before falling
+back to the normal mode of operation.
+
+@item -n
+@itemx --numeric
+@opindex -n
+@opindex --numeric
+Numeric output only.
+No attempt will be made to resolve symbolic names for host addresses.
+
+@item -p @var{pattern}
+@itemx --pattern=@var{pattern}
+@opindex -p
+@opindex --pattern
+Up to 16 hexadecimal pad bytes are given as @var{pattern}.
+These are use for filling out the packets you send.
+This option is useful for diagnosing data-dependent problems
+within a network.
+As an example, @option{-p ff} will cause the sent packets
+to have payloads with every bit set to one.
+
+@item -q
+@itemx --quiet
+@opindex -q
+@opindex --quiet
+Do not print timing result of each transmitted packet.
+
+@item -r
+@itemx --ignore-routing
+@opindex -r
+@opindex --ignore-routing-log
+Bypass the normal routing tables and send directly
+to a host on an attached network.
+If the host is not on a directly attached network,
+an error is returned.
+This option can be used to ping a local host
+through an interface, for which there is no
+assigned route, such as when the interface
+was dropped by @command{routed}.
+
+@item -s @var{n}
+@itemx --size=@var{n}
+@opindex -s
+@opindex --size
+Specifies the number of data bytes to be sent.  The default is 56,
+which translates into 64@tie{}ICMP data bytes, taking
+the 8@tie{}bytes of ICMP header data into account.
+
+@item -T @var{num}
+@itemx --tos=@var{num}
+@opindex -T
+@opindex --tos
+Set the traffic class to @var{num} on transmitted packets.
+
+@item --ttl=@var{n}
+@opindex --ttl
+Synonym for @option{--hoplimit}.
+
+@item -v
+@itemx --verbose
+@opindex -v
+@opindex --verbose
+Produce more verbose output, giving more statistics.
+
+@item -w @var{n}
+@itemx --timeout=@var{n}
+@opindex -w
+@opindex --timeout
+Stop after @var{n} seconds.
+@end table
+
+The documentation of @command{ping} provides several
+pieces of information, and discussions, relevant to
+the use of @command{ping6}.
+Keep in mind, though, that the differing address family
+causes some discrepancy.
+@xref{ping invocation}.
+
 @node traceroute invocation
 @chapter @command{traceroute}: Trace the route to a host
 @cindex traceroute

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

Summary of changes:
 ChangeLog          |    6 ++
 doc/inetutils.texi |  182 ++++++++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 177 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Thu Apr 11 07:30:38 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1UQFiA-0008KD-1O
	for mharc-commit-inetutils@gnu.org; Thu, 11 Apr 2013 07:30:38 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37257)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UQFi5-0008Jk-6w
	for commit-inetutils@gnu.org; Thu, 11 Apr 2013 07:30:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UQFi2-0007LN-Tx
	for commit-inetutils@gnu.org; Thu, 11 Apr 2013 07:30:33 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:39609)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UQFi2-0007LE-PT
	for commit-inetutils@gnu.org; Thu, 11 Apr 2013 07:30:30 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1UQFhz-0007Lz-8r
	for commit-inetutils@gnu.org; Thu, 11 Apr 2013 11:30:30 +0000
Date: Thu, 11 Apr 2013 11:30:28 +0000
Message-Id: <E1UQFhz-0007Lz-8r@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-272-g5d83e7c
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: ef002d90516083a93d34d341f383153eadd1c409
X-Git-Newrev: 5d83e7c8c1c96de49972fd0d8dd687a64da0af09
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
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, 11 Apr 2013 11:30:36 -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  5d83e7c8c1c96de49972fd0d8dd687a64da0af09 (commit)
       via  46d208a7f5925a09b7d756447a2b27490f424260 (commit)
      from  ef002d90516083a93d34d341f383153eadd1c409 (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=5d83e7c8c1c96de49972fd0d8dd687a64da0af09


commit 5d83e7c8c1c96de49972fd0d8dd687a64da0af09
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Thu Apr 11 12:16:54 2013 +0200

    Working distcheck target.

diff --git a/ChangeLog b/ChangeLog
index 0b6b221..e2360a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2013-04-11  Mats Erik Andersson  <gnu@gisladisker.se>
 
+	Working distcheck target.
+
+	* Makefile.am (BUILT_SOURCES): Replace $(top_srcdir)
+	by $(top_builddir).
+	(DISTCLEANFILES): Add `$(top_builddir)/.version' to list.
+	($(top_builddir)/.version): Move target to build directory.
+
+2013-04-11  Mats Erik Andersson  <gnu@gisladisker.se>
+
 	Summary printout is a config.status command.
 
 	* configure.ac (AC_CONFIG_FILES): Add summary.sh to list.
diff --git a/Makefile.am b/Makefile.am
index 698d339..0c78a7b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,10 +27,11 @@ SUBDIRS = lib \
 	tests
 
 DISTCLEANFILES = pathdefs.make paths.defs \
+	$(top_builddir)/.version \
 	$(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION).tar.xz
 
-BUILT_SOURCES = $(top_srcdir)/.version
-$(top_srcdir)/.version:
+BUILT_SOURCES = $(top_builddir)/.version
+$(top_builddir)/.version:
 	echo $(VERSION) > $@-t && mv $@-t $@
 dist-hook:
 	echo $(VERSION) > $(distdir)/.tarball-version

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=46d208a7f5925a09b7d756447a2b27490f424260


commit 46d208a7f5925a09b7d756447a2b27490f424260
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Thu Apr 11 02:51:46 2013 +0200

    Summary printout.

diff --git a/.gitignore b/.gitignore
index 5ed6df7..4373037 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,4 +50,5 @@ pathdefs.make
 paths.defs
 stamp-h.in
 stamp-h1
+summary.sh
 !lib/Makefile.am
diff --git a/ChangeLog b/ChangeLog
index 3a5ad04..0b6b221 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2013-04-11  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	Summary printout is a config.status command.
+
+	* configure.ac (AC_CONFIG_FILES): Add summary.sh to list.
+	(AC_CONFIG_COMMANDS): New command `summary'.
+	(AC_MSG_NOTICE) <summary>: Removed.
+	* .gitignore: Add summary.sh to list.
+	* Makefile.am (EXTRA_DIST): Add summary.sh.in.
+	* summary.sh.in: New file.
+	* am/enable.m4 (IU_ENABLE_FOO): Publish `$1_PROPS'
+	and `enable_$1' via AC_SUBST.
+
 2013-04-10  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	* doc/inetutils.texi <main menu>: Order invocation
diff --git a/Makefile.am b/Makefile.am
index 3efee5f..698d339 100644
--- a/Makefile.am
+++ b/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/'.
 
-EXTRA_DIST = paths ChangeLog.0
+EXTRA_DIST = paths ChangeLog.0 summary.sh.in
 
 SUBDIRS = lib \
 	libinetutils libtelnet libicmp libls \
diff --git a/am/enable.m4 b/am/enable.m4
index 7076fbf..9f5d644 100644
--- a/am/enable.m4
+++ b/am/enable.m4
@@ -32,6 +32,8 @@ else
 fi;]
   AC_SUBST([$1_BUILD])
   AC_SUBST([$1_INSTALL_HOOK])
+  AC_SUBST([$1_PROPS])
+  AC_SUBST([enable_$1])
   AM_CONDITIONAL([ENABLE_$1], test "$enable_$1" = yes)
 ])
 
diff --git a/configure.ac b/configure.ac
index 6c6de9f..22e42ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -987,6 +987,7 @@ esac
 
 AC_CONFIG_FILES([
 Makefile
+summary.sh
 lib/Makefile
 libinetutils/Makefile
 libtelnet/Makefile
@@ -1008,7 +1009,8 @@ man/Makefile
 tests/Makefile
 confpaths.h:confpaths.h.in
 ])
-AC_OUTPUT
+
+AC_CONFIG_COMMANDS([summary], [sh ./summary.sh])
 
 # Collect printable information on each
 # available (i.e., reportable) target.
@@ -1061,39 +1063,4 @@ ftp_PROPS="${ftp_PROPS:+$ftp_PROPS }$LIBREADLINE"
 
 talk_PROPS="${talk_PROPS:+$talk_PROPS }$LIBCURSES"
 
-# Collect informational status.
-AC_MSG_NOTICE([summary of build decisions:
-
-  Clients:
-
-    dnsdomainname  ${enable_dnsdomainname}
-    ftp            ${enable_ftp}${ftp_BUILD:+  $ftp_PROPS}
-    hostname       ${enable_hostname}
-    ifconfig       ${enable_ifconfig}
-    logger         ${enable_logger}
-    ping           ${enable_ping}${ping_BUILD:+  $ping_PROPS}
-    ping6          ${enable_ping6}${ping6_BUILD:+  $ping_PROPS}
-    rcp            ${enable_rcp}${rcp_BUILD:+  $rcp_PROPS}
-    rexec          ${enable_rexec}
-    rlogin         ${enable_rlogin}${rlogin_BUILD:+  $rlogin_PROPS}
-    rsh            ${enable_rsh}${rsh_BUILD:+  $rsh_PROPS}
-    talk           ${enable_talk}${talk_BUILD:+  $talk_PROPS}
-    telnet         ${enable_telnet}${telnet_BUILD:+  $telnet_PROPS}
-    tftp           ${enable_tftp}
-    traceroute     ${enable_traceroute}\
-${traceroute_BUILD:+  $traceroute_PROPS}
-    whois          ${enable_whois}
-
-  Servers:
-
-    ftpd           ${enable_ftpd}${ftpd_BUILD:+  $ftpd_PROPS}
-    inetd          ${enable_inetd}
-    rexecd         ${enable_rexecd}${rexecd_BUILD:+  $rexecd_PROPS}
-    rlogind        ${enable_rlogind}${rlogind_BUILD:+  $rlogind_PROPS}
-    rshd           ${enable_rshd}${rshd_BUILD:+  $rshd_PROPS}
-    syslogd        ${enable_syslogd}
-    talkd          ${enable_talkd}
-    telnetd        ${enable_telnetd}${telnetd_BUILD:+  $telnetd_PROPS}
-    tftpd          ${enable_tftpd}
-    uucpd          ${enable_uucpd}
-])
+AC_OUTPUT
diff --git a/summary.sh.in b/summary.sh.in
new file mode 100644
index 0000000..ed65209
--- /dev/null
+++ b/summary.sh.in
@@ -0,0 +1,137 @@
+#!/bin/sh
+#
+# Copyright (C) 2013 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/'.
+
+# Template for printing a summary of program configurations.
+
+enable_dnsdomainname=@enable_dnsdomainname@
+dnsdomainname_BUILD=@dnsdomainname_BUILD@
+dnsdomainname_PROPS="@dnsdomainname_PROPS@"
+enable_ftp=@enable_ftp@
+ftp_BUILD=@ftp_BUILD@
+ftp_PROPS="@ftp_PROPS@"
+enable_hostname=@enable_hostname@
+hostname_BUILD=@hostname_BUILD@
+hostname_PROPS="@hostname_PROPS@"
+enable_ifconfig=@enable_ifconfig@
+ifconfig_BUILD=@ifconfig_BUILD@
+ifconfig_PROPS="@ifconfig_PROPS@"
+enable_logger=@enable_logger@
+logger_BUILD=@logger_BUILD@
+logger_PROPS="@logger_PROPS@"
+enable_ping=@enable_ping@
+ping_BUILD=@ping_BUILD@
+ping_PROPS="@ping_PROPS@"
+enable_ping6=@enable_ping6@
+ping6_BUILD=@ping6_BUILD@
+ping6_PROPS=@ping6_PROPS@
+enable_rcp=@enable_rcp@
+rcp_BUILD=@rcp_BUILD@
+rcp_PROPS="@rcp_PROPS@"
+enable_rexec=@enable_rexec@
+rexec_BUILD=@rexec_BUILD@
+rexec_PROPS="@rexec_PROPS@"
+enable_rlogin=@enable_rlogin@
+rlogin_BUILD=@rlogin_BUILD@
+rlogin_PROPS="@rlogin_PROPS@"
+enable_rsh=@enable_rsh@
+rsh_BUILD=@rsh_BUILD@
+rsh_PROPS="@rsh_PROPS@"
+enable_talk=@enable_talk@
+talk_BUILD=@talk_BUILD@
+talk_PROPS="@talk_PROPS@"
+enable_telnet=@enable_telnet@
+telnet_BUILD=@telnet_BUILD@
+telnet_PROPS="@telnet_PROPS@"
+enable_tftp=@enable_tftp@
+tftp_BUILD=@tftp_BUILD@
+tftp_PROPS="@tftp_PROPS@"
+enable_traceroute=@enable_traceroute@
+traceroute_BUILD=@traceroute_BUILD@
+traceroute_PROPS="@traceroute_PROPS@"
+enable_whois=@enable_whois@
+whois_BUILD=@whois_BUILD@
+whois_PROPS="@whois_PROPS@"
+enable_ftpd=@enable_ftpd@
+ftpd_BUILD=@ftpd_BUILD@
+ftpd_PROPS="@ftpd_PROPS@"
+enable_inetd=@enable_inetd@
+inetd_BUILD=@inetd_BUILD@
+inetd_PROPS="@inetd_PROPS@"
+enable_rexecd=@enable_rexecd@
+rexecd_BUILD=@rexecd_BUILD@
+rexecd_PROPS="@rexecd_PROPS@"
+enable_rlogind=@enable_rlogind@
+rlogind_BUILD=@rlogind_BUILD@
+rlogind_PROPS="@rlogind_PROPS@"
+enable_rshd=@enable_rshd@
+rshd_BUILD=@rshd_BUILD@
+rshd_PROPS="@rshd_PROPS@"
+enable_syslogd=@enable_syslogd@
+syslogd_BUILD=@syslogd_BUILD@
+syslogd_PROPS="@syslogd_PROPS@"
+enable_talkd=@enable_talkd@
+talkd_BUILD=@talkd_BUILD@
+talkd_PROPS="@talkd_PROPS@"
+enable_telnetd=@enable_telnetd@
+telnetd_BUILD=@telnetd_BUILD@
+telnetd_PROPS="@telnetd_PROPS@"
+enable_tftpd=@enable_tftpd@
+tftpd_BUILD=@tftpd_BUILD@
+tftpd_PROPS="@tftpd_PROPS@"
+enable_uucpd=@enable_uucpd@
+uucpd_BUILD=@uucpd_BUILD@
+uucpd_PROPS="@uucpd_PROPS@"
+
+# Collect informational status.
+cat <<EOT
+Summary of build decisions:
+
+  Clients:
+
+    dnsdomainname  ${enable_dnsdomainname}
+    ftp            ${enable_ftp}${ftp_BUILD:+  $ftp_PROPS}
+    hostname       ${enable_hostname}
+    ifconfig       ${enable_ifconfig}
+    logger         ${enable_logger}
+    ping           ${enable_ping}${ping_BUILD:+  $ping_PROPS}
+    ping6          ${enable_ping6}${ping6_BUILD:+  $ping_PROPS}
+    rcp            ${enable_rcp}${rcp_BUILD:+  $rcp_PROPS}
+    rexec          ${enable_rexec}
+    rlogin         ${enable_rlogin}${rlogin_BUILD:+  $rlogin_PROPS}
+    rsh            ${enable_rsh}${rsh_BUILD:+  $rsh_PROPS}
+    talk           ${enable_talk}${talk_BUILD:+  $talk_PROPS}
+    telnet         ${enable_telnet}${telnet_BUILD:+  $telnet_PROPS}
+    tftp           ${enable_tftp}
+    traceroute     ${enable_traceroute}\
+${traceroute_BUILD:+  $traceroute_PROPS}
+    whois          ${enable_whois}
+
+  Servers:
+
+    ftpd           ${enable_ftpd}${ftpd_BUILD:+  $ftpd_PROPS}
+    inetd          ${enable_inetd}
+    rexecd         ${enable_rexecd}${rexecd_BUILD:+  $rexecd_PROPS}
+    rlogind        ${enable_rlogind}${rlogind_BUILD:+  $rlogind_PROPS}
+    rshd           ${enable_rshd}${rshd_BUILD:+  $rshd_PROPS}
+    syslogd        ${enable_syslogd}
+    talkd          ${enable_talkd}
+    telnetd        ${enable_telnetd}${telnetd_BUILD:+  $telnetd_PROPS}
+    tftpd          ${enable_tftpd}
+    uucpd          ${enable_uucpd}
+EOT

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

Summary of changes:
 .gitignore    |    1 +
 ChangeLog     |   22 +++++++++
 Makefile.am   |    7 ++-
 am/enable.m4  |    2 +
 configure.ac  |   41 ++---------------
 summary.sh.in |  137 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 170 insertions(+), 40 deletions(-)
 create mode 100644 summary.sh.in


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed Apr 17 11:16:49 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1USU6L-00015Q-4q
	for mharc-commit-inetutils@gnu.org; Wed, 17 Apr 2013 11:16:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:32842)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1USU6D-0000zH-Eu
	for commit-inetutils@gnu.org; Wed, 17 Apr 2013 11:16:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1USU67-0006B4-M3
	for commit-inetutils@gnu.org; Wed, 17 Apr 2013 11:16:41 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:46884)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1USU67-0006Av-FK
	for commit-inetutils@gnu.org; Wed, 17 Apr 2013 11:16:35 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1USU66-0001pC-Q2
	for commit-inetutils@gnu.org; Wed, 17 Apr 2013 15:16:35 +0000
Date: Wed, 17 Apr 2013 15:16:34 +0000
Message-Id: <E1USU66-0001pC-Q2@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-274-g2355ddb
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5d83e7c8c1c96de49972fd0d8dd687a64da0af09
X-Git-Newrev: 2355ddbc4af9a0f6c6f92833763b32fb05d56633
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
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, 17 Apr 2013 15:16:48 -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  2355ddbc4af9a0f6c6f92833763b32fb05d56633 (commit)
       via  af67ee310bc21e8196be2f66b7269a3f394cb129 (commit)
      from  5d83e7c8c1c96de49972fd0d8dd687a64da0af09 (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=2355ddbc4af9a0f6c6f92833763b32fb05d56633


commit 2355ddbc4af9a0f6c6f92833763b32fb05d56633
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed Apr 17 16:43:26 2013 +0200

    rlogind, rshd: Set realm with Kerberos5.

diff --git a/ChangeLog b/ChangeLog
index 17a6f49..ff5cfad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-04-17  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	rlogind, rshd: Set realm with Kerberos5.
+
+	* src/rlogind.c (do_krb5_login) [KRB5}: Declare SERVER
+	with larger scope.  If `servername' has content, then
+	call krb5_set_default_realm() with supporting code.
+	* src/rshd.c (doit) [KRB5] <use_kerberos>: Likewise.
+
 2013-04-15  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	* src/rlogind.c (parse_opt) [KERBEROS || SHISHI]
diff --git a/src/rlogind.c b/src/rlogind.c
index 2fd1239..066679d 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -1456,6 +1456,7 @@ do_krb5_login (int infd, struct auth_data *ap, const char **err_msg)
   krb5_data inbuf;
   krb5_data version;
   krb5_authenticator *authenticator;
+  krb5_principal server;
   krb5_rcache rcache;
   krb5_keyblock *key;
   krb5_ticket *ticket;
@@ -1472,6 +1473,31 @@ do_krb5_login (int infd, struct auth_data *ap, const char **err_msg)
       return status;
     }
 
+  if (servername && *servername)
+    {
+      status = krb5_parse_name (ap->context, servername, &server);
+      if (status)
+	{
+	  syslog (LOG_ERR, "Invalid principal '%s': %s",
+		  servername, error_message (status));
+	  return status;
+	}
+
+      /* A realm name missing in `servername' has been augmented
+       * by krb5_parse_name(), so setting it is always harmless.
+       */
+      status = krb5_set_default_realm (ap->context,
+				       krb5_princ_realm (ap->context,
+							 server)->data);
+      krb5_free_principal (ap->context, server);
+      if (status)
+	{
+	  syslog (LOG_ERR, "Setting krb5 realm: %s",
+		  error_message (status));
+	  return status;
+	}
+    }
+
   if ((status = krb5_auth_con_init (ap->context, &auth_ctx))
       || (status = krb5_auth_con_genaddrs (ap->context, auth_ctx, infd,
 					   KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR))
@@ -1480,8 +1506,6 @@ do_krb5_login (int infd, struct auth_data *ap, const char **err_msg)
 
   if (!rcache)
     {
-      krb5_principal server;
-
       status = krb5_sname_to_principal (ap->context, 0, 0, KRB5_NT_SRV_HST,
 					&server);
       if (status)
diff --git a/src/rshd.c b/src/rshd.c
index 5e0b54a..6941b16 100644
--- a/src/rshd.c
+++ b/src/rshd.c
@@ -864,8 +864,27 @@ doit (int sockfd, struct sockaddr *fromp, socklen_t fromlen)
 #elif defined KRB5
   if (use_kerberos)
     {
+      krb5_principal server;
+
       /* Set up context data.  */
       rc = krb5_init_context (&context);
+
+      if (!rc && servername && *servername)
+	{
+	  rc = krb5_parse_name (context, servername, &server);
+
+	  /* A realm name missing in `servername' has been augmented
+	   * by krb5_parse_name(), so setting it again is harmless.
+	   */
+	  if (!rc)
+	    {
+	      rc = krb5_set_default_realm (context,
+					   krb5_princ_realm
+						(context, server)->data);
+	      krb5_free_principal (context, server);
+	    }
+	}
+
       if (!rc)
         rc = krb5_auth_con_init (context, &auth_ctx);
       if (!rc)
@@ -876,8 +895,6 @@ doit (int sockfd, struct sockaddr *fromp, socklen_t fromlen)
 
       if (!rc && !rcache)
 	{
-	  krb5_principal server;
-
 	  rc = krb5_sname_to_principal (context, 0, 0,
 					KRB5_NT_SRV_HST, &server);
 	  if (!rc)

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


commit af67ee310bc21e8196be2f66b7269a3f394cb129
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Tue Apr 16 11:35:59 2013 +0200

    rlogind: Side stepped error message.

diff --git a/ChangeLog b/ChangeLog
index e2360a4..17a6f49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-04-15  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	* src/rlogind.c (parse_opt) [KERBEROS || SHISHI]
+	<'k'>: Remove unused code checking `arg'.
+	(do_krb_login) [KRB5]: Remove `else', which prevents
+	later error message extraction.
+	[SHISHI]: Likewise.
+
 2013-04-11  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	Working distcheck target.
diff --git a/src/rlogind.c b/src/rlogind.c
index 4772026..2fd1239 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -532,15 +532,7 @@ parse_opt (int key, char *arg,
 
 #if defined KERBEROS || defined SHISHI
     case 'k':
-      if (arg)
-	{
-	  if (*arg == '4')
-	    kerberos = AUTH_KERBEROS_4;
-	  else if (*arg == '5')
-	    kerberos = AUTH_KERBEROS_5;
-	}
-      else
-	kerberos = AUTH_KERBEROS_DEFAULT;
+      kerberos = AUTH_KERBEROS_DEFAULT;
       break;
 
     case 'S':
@@ -1365,11 +1357,9 @@ do_krb_login (int infd, struct auth_data *ap, const char **err_msg)
 # if defined KRB5
   if (kerberos == AUTH_KERBEROS_5)
     rc = do_krb5_login (infd, ap, err_msg);
-  else
 # elif defined SHISHI
   if (kerberos == AUTH_KERBEROS_SHISHI)
     rc = do_shishi_login (infd, ap, err_msg);
-  else
 # else
   rc = do_krb4_login (infd, ap, err_msg);
 # endif

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

Summary of changes:
 ChangeLog     |   17 +++++++++++++++++
 src/rlogind.c |   40 +++++++++++++++++++++++++++-------------
 src/rshd.c    |   21 +++++++++++++++++++--
 3 files changed, 63 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Fri Apr 19 06:30:03 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1UT8Zv-0000fY-LQ
	for mharc-commit-inetutils@gnu.org; Fri, 19 Apr 2013 06:30:03 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57596)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UT8Zs-0000es-DK
	for commit-inetutils@gnu.org; Fri, 19 Apr 2013 06:30:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UT8Zq-0006sI-OB
	for commit-inetutils@gnu.org; Fri, 19 Apr 2013 06:30:00 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:49360)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UT8Zq-0006sB-Lm
	for commit-inetutils@gnu.org; Fri, 19 Apr 2013 06:29:58 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1UT8Zq-0001Pk-1P
	for commit-inetutils@gnu.org; Fri, 19 Apr 2013 10:29:58 +0000
Date: Fri, 19 Apr 2013 10:29:58 +0000
Message-Id: <E1UT8Zq-0001Pk-1P@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-275-gac310a0
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2355ddbc4af9a0f6c6f92833763b32fb05d56633
X-Git-Newrev: ac310a022cadcf973dda62607186bc67769a6c37
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
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, 19 Apr 2013 10:30:02 -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  ac310a022cadcf973dda62607186bc67769a6c37 (commit)
      from  2355ddbc4af9a0f6c6f92833763b32fb05d56633 (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=ac310a022cadcf973dda62607186bc67769a6c37


commit ac310a022cadcf973dda62607186bc67769a6c37
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Apr 19 12:28:00 2013 +0200

    rlogind, rshd: Diagnostics with libshishi.

diff --git a/ChangeLog b/ChangeLog
index ff5cfad..b10841a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2013-04-19  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	rlogind, rshd: Diagnostics with libshishi.
+
+	* src/rlogind.c (do_shishi_login) [SHISHI && WITH_PAM]:
+	Assign an error message when do_pam_check() fails.
+	* src/rshd.c (doit) [SHISHI && !ENCRYPTION]:
+	Abort with an error message when encryption was requested
+	by the client, but is not present in the server.
+
 2013-04-17  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	rlogind, rshd: Set realm with Kerberos5.
diff --git a/src/rlogind.c b/src/rlogind.c
index 066679d..19525e4 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -1723,7 +1723,10 @@ do_shishi_login (int infd, struct auth_data *ad, const char **err_msg)
 #  ifdef WITH_PAM
   rc = do_pam_check (infd, ad, "krlogin");
   if (rc != PAM_SUCCESS)
-    return rc;
+    {
+      *err_msg = "Permission denied";
+      return rc;
+    }
 #  endif /* WITH_PAM */
 
   syslog (LOG_INFO | LOG_AUTH,
@@ -2095,7 +2098,7 @@ rlogind_error (int f, int syserr, const char *msg, ...)
     snprintf (bp, sizeof buf - (bp - buf),
 	      "rlogind: %s: %s.\r\n", buf2, strerror (errno));
   else
-    snprintf (bp, sizeof buf - (bp - buf), "rlogind: %s.\r\n", buf2);
+    snprintf (bp, sizeof buf - (bp - buf), "rlogind: %s\r\n", buf2);
 
   len = strlen (bp);
   write (f, buf, bp + len - buf);
diff --git a/src/rshd.c b/src/rshd.c
index 6941b16..11bcd7d 100644
--- a/src/rshd.c
+++ b/src/rshd.c
@@ -987,9 +987,9 @@ doit (int sockfd, struct sockaddr *fromp, socklen_t fromlen)
       struct sockaddr_storage sock;
       socklen_t socklen;
 
-# ifdef ENCRYPTION
       if (strlen (cmdbuf) >= 3)
 	if (!strncmp (cmdbuf, "-x ", 3))
+# ifdef ENCRYPTION
 	  {
 	    int i;
 
@@ -1046,6 +1046,12 @@ doit (int sockfd, struct sockaddr *fromp, socklen_t fromlen)
 		  }
 	      }
 	  }
+# else /* !ENCRYPTION */
+	  {
+	    shishi_ap_done (ap);
+	    rshd_error ("Encrypted sessions are not supported.\n");
+	    exit (EXIT_FAILURE);
+	  }
 # endif /* ENCRYPTION */
 
     remuser = getstr ("remuser");	/* The requesting user!  */

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

Summary of changes:
 ChangeLog     |   10 ++++++++++
 src/rlogind.c |    7 +++++--
 src/rshd.c    |    8 +++++++-
 3 files changed, 22 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed Apr 24 16:49:42 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1UV6dK-0005lz-OR
	for mharc-commit-inetutils@gnu.org; Wed, 24 Apr 2013 16:49:42 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45542)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UV6dG-0005lV-OF
	for commit-inetutils@gnu.org; Wed, 24 Apr 2013 16:49:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UV6dE-0005TZ-KL
	for commit-inetutils@gnu.org; Wed, 24 Apr 2013 16:49:38 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:53890)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UV6dE-0005TU-HY
	for commit-inetutils@gnu.org; Wed, 24 Apr 2013 16:49:36 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1UV6dD-0004EG-SC
	for commit-inetutils@gnu.org; Wed, 24 Apr 2013 20:49:36 +0000
Date: Wed, 24 Apr 2013 20:49:35 +0000
Message-Id: <E1UV6dD-0004EG-SC@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-276-gd3afcfa
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: ac310a022cadcf973dda62607186bc67769a6c37
X-Git-Newrev: d3afcfa566f68e26060f465a0439af7e36ffe653
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
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, 24 Apr 2013 20:49: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  d3afcfa566f68e26060f465a0439af7e36ffe653 (commit)
      from  ac310a022cadcf973dda62607186bc67769a6c37 (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=d3afcfa566f68e26060f465a0439af7e36ffe653


commit d3afcfa566f68e26060f465a0439af7e36ffe653
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Tue Apr 23 23:55:56 2013 +0200

    Detection of libidn and krb5.

diff --git a/ChangeLog b/ChangeLog
index b10841a..88cce1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2013-04-23  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	* configure.ac <libidn detection>: Replace by a call
+	to IU_CHECK_LIBIDN.
+	* am/libidn.m4 (IU_CHECK_LIBIDN): New file, new macro.
+
+	* am/krb5.m4 (IU_CHECK_KRB5): Detect res_query using
+	AC_SEARCH_LIBS for better portability to BSD.
+	Set KRB5_IMPL to `krb5-config' if krb5-config is
+	available to provide compiler flags.  If KRB5_PREFIX
+	is `yes' and krb5-config does not exist, use the
+	location `-I/usr/include/krb5' for KRB5_CFLAGS.
+	Do not add $KRB4_LIBS to KRB5_LIBS when detecting
+	either `MIT' or `Heimdal'.
+
 2013-04-19  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	rlogind, rshd: Diagnostics with libshishi.
diff --git a/am/krb5.m4 b/am/krb5.m4
index 9ef53b9..cc92a31 100644
--- a/am/krb5.m4
+++ b/am/krb5.m4
@@ -21,17 +21,21 @@ dnl along with this program.  If not, see `http://www.gnu.org/licenses/'.
 dnl Written by Miles Bader.
 
 dnl IU_CHECK_KRB5(VERSION,PREFIX)
-dnl Search for a Kerberos implementation in the standard locations plus PREFIX,
-dnl if it is set and not "yes".
-dnl VERSION should be either 4 or 5
+dnl Search for a Kerberos implementation in the standard locations
+dnl plus PREFIX, if it is set and is not "yes".
+dnl VERSION should be either 4 or 5.
+dnl
 dnl Defines KRB5_CFLAGS and KRB5_LIBS if found.
-dnl Defines KRB_IMPL to "Heimdal", "MIT", or "OldMIT", or "none" if not found
+dnl Defines KRB5_IMPL to "krb5-config", "Heimdal", "MIT",
+dnl "OpenBSD-Heimdal", or "OldMIT", if found, and to "none"
+dnl otherwise.
+
 AC_DEFUN([IU_CHECK_KRB5],
 [
  if test "x$iu_cv_lib_krb5_libs" = x; then
   cache=""
   ## Make sure we have res_query
-  AC_CHECK_LIB(resolv, res_query)
+  AC_SEARCH_LIBS([res_query], [resolv])
   KRB5_PREFIX=[$2]
   KRB5_IMPL="none"
   # First try krb5-config
@@ -44,7 +48,7 @@ AC_DEFUN([IU_CHECK_KRB5],
   if test "$KRB5CFGPATH" != "none"; then
     KRB5_CFLAGS="$CPPFLAGS `$KRB5CFGPATH --cflags krb$1`"
     KRB5_LIBS="$LDFLAGS `$KRB5CFGPATH --libs krb$1`"
-    KRB5_IMPL="Heimdal"
+    KRB5_IMPL="krb5-config"
   else
     ## OK, try the old code
     saved_CPPFLAGS="$CPPFLAGS"
@@ -53,23 +57,26 @@ AC_DEFUN([IU_CHECK_KRB5],
     if test "$KRB5_PREFIX" != "yes"; then
       KRB5_CFLAGS="-I$KRB5_PREFIX/include"
       KRB5_LDFLAGS="-L$KRB5_PREFIX/lib"
-      CPPFLAGS="$CPPFLAGS $KRB5_CFLAGS"
       LDFLAGS="$LDFLAGS $KRB5_LDFLAGS"
+    else
+      ## A very common location in recent times.
+      KRB5_CFLAGS="-I/usr/include/krb5"
     fi
+    CPPFLAGS="$CPPFLAGS $KRB5_CFLAGS"
     KRB4_LIBS="-lkrb4 -ldes425"
 
     ## Check for new MIT kerberos V support
     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"], )
+       KRB5_LIBS="$KRB5_LDFLAGS -lkrb5 -lk5crypto -lcom_err"], )
 
     ## Heimdal kerberos V support
     if test "$KRB5_IMPL" = "none"; then
       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"]
+         KRB5_LIBS="$KRB5_LDFLAGS -lkrb5 -ldes -lasn1 -lroken -lcrypt -lcom_err"]
          , )
     fi
 
diff --git a/am/libidn.m4 b/am/libidn.m4
new file mode 100644
index 0000000..524bf06
--- /dev/null
+++ b/am/libidn.m4
@@ -0,0 +1,72 @@
+# libidn.m4 serial 1
+dnl Copyright (C) 2013 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GNU Inetutils.
+dnl
+dnl GNU Inetutils is free software: you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation, either version 3 of the License, or (at
+dnl your option) any later version.
+dnl
+dnl GNU Inetutils is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program.  If not, see `http://www.gnu.org/licenses/'.
+
+dnl Written by Mats Erik Andersson.
+
+dnl IU_CHECK_LIBIDN([PREFIX],[HEADERLOC])
+dnl Search for libidn in standard location and in PREFIX,
+dnl if the latter is set and is neither "yes", nor "no".
+dnl
+dnl First check: $with_idn != no
+
+AC_DEFUN([IU_CHECK_LIBIDN],
+[
+if test x"$with_idn" != xno \
+    && test "$ac_cv_header_locale_h" = yes \
+    && test "$ac_cv_func_setlocale" = yes
+then
+  if test -n "$1" \
+      && test x"$1" != xno \
+      && test x"$1" != xyes
+  then
+    INCIDN=-I$1/include
+    LIBIDN=-L$1/lib
+  fi
+
+  if test -n "$2" \
+      && test x"$2" != xyes
+  then
+    INCIDN=-I$2
+  fi
+
+  AC_CHECK_LIB([idn], [idna_to_ascii_lz],
+	       [LIBIDN="$LIBIDN -lidn"], [INCIDN= LIBIDN=],
+	       [$LIBIDN])
+
+  # Some systems are known to install <idna.h> below
+  # '/usr/include/idn'.  The caching performed by
+  # AC_CHECK_HEADERS prevents detection of this using
+  # repeated call of the macro.  Functional alternative?
+  save_CPPFLAGS=$CPPFLAGS
+  CPPFLAGS="$CPPFLAGS $INCIDN"
+  AC_CHECK_HEADERS([idna.h])
+
+  AC_MSG_CHECKING([if GNU libidn is available])
+  if test "$ac_cv_lib_idn_idna_to_ascii_lz" = yes \
+      && test "$ac_cv_header_idna_h" = yes; then
+    AC_DEFINE(HAVE_IDN, 1, [Define to 1 for use of GNU Libidn.])
+    AC_MSG_RESULT($ac_cv_lib_idn_idna_to_ascii_lz)
+  else
+    AC_MSG_RESULT([no])
+    INCIDN= LIBIDN=
+  fi
+  CPPFLAGS=$save_CPPFLAGS
+fi
+AC_SUBST([LIBIDN])
+AC_SUBST([INCIDN])
+])# IU_CHECK_LIBIDN
diff --git a/configure.ac b/configure.ac
index 22e42ff..9b49f4f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -578,34 +578,7 @@ AC_SUBST(LIBWRAP)
 AC_CHECK_HEADERS([locale.h])
 AC_CHECK_FUNCS([setlocale])
 
-if test x"$with_idn" != xno \
-    && test "$ac_cv_header_locale_h" = yes \
-    && test "$ac_cv_func_setlocale" = yes; then
-  if test x"$with_libidn_prefix" != xno \
-      && test x"$with_libidn_prefix" != xyes; then
-    INCIDN=-I$with_libidn_prefix/include
-    LIBIDN=-L$with_libidn_prefix/lib
-  fi
-  if test x"$with_idn" != xyes; then
-    INCIDN=-I$with_idn
-  fi
-  save_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="$CPPFLAGS $INCIDN"
-  AC_CHECK_HEADERS([idna.h])
-  if test "$ac_cv_header_idna_h" = yes; then
-    AC_CHECK_LIB(idn, idna_to_ascii_lz,
-		 [LIBIDN="$LIBIDN -lidn"], [INCIDN= LIBIDN=],
-		 [$LIBIDN])
-    AC_MSG_CHECKING([if GNU libidn is available])
-    if test "$ac_cv_lib_idn_idna_to_ascii_lz" = yes; then
-      AC_DEFINE(HAVE_IDN, 1, [Define to 1 for use of GNU Libidn.])
-    fi
-    AC_MSG_RESULT($ac_cv_lib_idn_idna_to_ascii_lz)
-  fi
-  CPPFLAGS=$save_CPPFLAGS
-fi
-AC_SUBST([LIBIDN])
-AC_SUBST([INCIDN])
+IU_CHECK_LIBIDN([$with_libidn_prefix], [$with_idn])
 
 ### Checks for header files.
 
@@ -1042,12 +1015,12 @@ rlogind_PROPS="${rlogind_PROPS:+$rlogind_PROPS }$LIBWRAP"
 
 # Support for libidn.
 
-ftp_PROPS="${ftp_PROPS:+$ftp_PROPS }${LIBIDN:+-libidn}"
-ping_PROPS="${ping_PROPS:+$ping_PROPS }${LIBIDN:+-libidn}"
-talk_PROPS="${talk_PROPS:+$talk_PROPS }${LIBIDN:+-libidn}"
-telnet_PROPS="${telnet_PROPS:+$telnet_PROPS }${LIBIDN:+-libidn}"
-tftp_PROPS="${tftp_PROPS:+$tftp_PROPS }${LIBIDN:+-libidn}"
-traceroute_PROPS="${traceroute_PROPS:+$traceroute_PROPS }${LIBIDN:+-libidn}"
+ftp_PROPS="${ftp_PROPS:+$ftp_PROPS }${LIBIDN:+-lidn}"
+ping_PROPS="${ping_PROPS:+$ping_PROPS }${LIBIDN:+-lidn}"
+talk_PROPS="${talk_PROPS:+$talk_PROPS }${LIBIDN:+-lidn}"
+telnet_PROPS="${telnet_PROPS:+$telnet_PROPS }${LIBIDN:+-lidn}"
+tftp_PROPS="${tftp_PROPS:+$tftp_PROPS }${LIBIDN:+-lidn}"
+traceroute_PROPS="${traceroute_PROPS:+$traceroute_PROPS }${LIBIDN:+-lidn}"
 
 # Termcap variants.
 

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

Summary of changes:
 ChangeLog    |   15 ++++++++++++
 am/krb5.m4   |   25 +++++++++++++-------
 am/libidn.m4 |   72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac |   41 +++++---------------------------
 4 files changed, 110 insertions(+), 43 deletions(-)
 create mode 100644 am/libidn.m4


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Thu Apr 25 14:33:33 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1UVQz7-0000iV-Am
	for mharc-commit-inetutils@gnu.org; Thu, 25 Apr 2013 14:33:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58403)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UVQz4-0000hw-FB
	for commit-inetutils@gnu.org; Thu, 25 Apr 2013 14:33:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UVQz2-0005rl-OF
	for commit-inetutils@gnu.org; Thu, 25 Apr 2013 14:33:30 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:47801)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UVQz2-0005rc-Kb
	for commit-inetutils@gnu.org; Thu, 25 Apr 2013 14:33:28 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1UVQz1-0005G8-PD
	for commit-inetutils@gnu.org; Thu, 25 Apr 2013 18:33:28 +0000
Date: Thu, 25 Apr 2013 18:33:27 +0000
Message-Id: <E1UVQz1-0005G8-PD@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-277-g6aec31d
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: d3afcfa566f68e26060f465a0439af7e36ffe653
X-Git-Newrev: 6aec31d308cf6fd350ccf42ba11b248f6f512d67
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
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, 25 Apr 2013 18:33:32 -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  6aec31d308cf6fd350ccf42ba11b248f6f512d67 (commit)
      from  d3afcfa566f68e26060f465a0439af7e36ffe653 (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=6aec31d308cf6fd350ccf42ba11b248f6f512d67


commit 6aec31d308cf6fd350ccf42ba11b248f6f512d67
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Thu Apr 25 20:31:48 2013 +0200

    syslogd: Probe recurring test errors.

diff --git a/ChangeLog b/ChangeLog
index 88cce1f..ac05bbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2013-04-25  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	syslogd: Attempt to mend recurring test failures.
+	The autobuilder Hydra is fairly often reporting
+	failures for `tests/syslogd.sh' on GNU/Linux,
+	appearing after configuration reload and then
+	blocking INET socket messages.
+
+	* src/syslogd.c (create_inet_socket): Set SO_REUSEADDR
+	before IPV6_V6ONLY.
+	* tests/syslogd.sh <reloaded configuration>: Remove
+	blocker `user.none' on file `$OUT'.
+
 2013-04-23  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	* configure.ac <libidn detection>: Replace by a call
diff --git a/src/syslogd.c b/src/syslogd.c
index c6fcc75..fc633a8 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -920,16 +920,17 @@ create_inet_socket (int af, int fd46[2])
       fd = socket (ai->ai_family, ai->ai_socktype, ai->ai_protocol);
       if (fd < 0)
 	continue;
+
+      err = setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof (yes));
+      if (err < 0)
+	logerror ("failed to set SO_REUSEADDR");
+
       if (ai->ai_family == AF_INET6)
 	{
 	  /* Avoid dual stacked sockets.  Better to use distinct sockets.  */
 	  (void) setsockopt (fd, IPPROTO_IPV6, IPV6_V6ONLY, &yes, sizeof (yes));
 	}
 
-      err = setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof (yes));
-      if (err < 0)
-	logerror ("failed to set SO_REUSEADDR");
-
       if (bind (fd, ai->ai_addr, ai->ai_addrlen) < 0)
 	{
 	  close (fd);
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index a1092f2..0614028 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -438,7 +438,7 @@ OUT_DEBUG="$IU_TESTDIR"/debug.log
 : > "$OUT_DEBUG"
 
 cat > "$CONF" <<-EOT
-	*.*;user.none	$OUT
+	*.*		$OUT
 	user.info	$OUT_USER
 	*.=debug	$OUT_DEBUG
 EOT

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

Summary of changes:
 ChangeLog        |   13 +++++++++++++
 src/syslogd.c    |    9 +++++----
 tests/syslogd.sh |    2 +-
 3 files changed, 19 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Thu Apr 25 18:44:01 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1UVUtV-0005tE-9y
	for mharc-commit-inetutils@gnu.org; Thu, 25 Apr 2013 18:44:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34832)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UVUtS-0005sz-JQ
	for commit-inetutils@gnu.org; Thu, 25 Apr 2013 18:43:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UVUtP-0004IN-8i
	for commit-inetutils@gnu.org; Thu, 25 Apr 2013 18:43:58 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:47087)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1UVUtP-0004IJ-5g
	for commit-inetutils@gnu.org; Thu, 25 Apr 2013 18:43:55 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1UVUtO-0002ty-NJ
	for commit-inetutils@gnu.org; Thu, 25 Apr 2013 22:43:54 +0000
Date: Thu, 25 Apr 2013 22:43:54 +0000
Message-Id: <E1UVUtO-0002ty-NJ@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-278-g4aa58d1
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6aec31d308cf6fd350ccf42ba11b248f6f512d67
X-Git-Newrev: 4aa58d1102e0b24a75420f906d87d5db42858118
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
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, 25 Apr 2013 22:43: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  4aa58d1102e0b24a75420f906d87d5db42858118 (commit)
      from  6aec31d308cf6fd350ccf42ba11b248f6f512d67 (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=4aa58d1102e0b24a75420f906d87d5db42858118


commit 4aa58d1102e0b24a75420f906d87d5db42858118
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Apr 26 00:32:57 2013 +0200

    rcp: Make encryption portable.

diff --git a/ChangeLog b/ChangeLog
index ac05bbb..0665618 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-04-26  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	rcp: Make encryption portable.
+
+	* src/rcp.c (main) [KERBEROS || SHISHI]: The encryption
+	switch `-x' does not belong in the remote command string.
+	It is must only be passed to `rsh'.  Remove the special
+	command string claimed for all Kerberos variants.
+
 2013-04-25  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	syslogd: Attempt to mend recurring test failures.
diff --git a/src/rcp.c b/src/rcp.c
index 6172804..0bfb826 100644
--- a/src/rcp.c
+++ b/src/rcp.c
@@ -371,20 +371,10 @@ main (int argc, char *argv[])
 #endif
 
   /* Command to be executed on remote system using "rsh". */
-#if defined KERBEROS || defined SHISHI
-  rc = asprintf (&command, "rcp%s%s%s%s", iamrecursive ? " -r" : "",
-# ifdef ENCRYPTION
-		 (doencrypt && use_kerberos ? " -x" : ""),
-# else /* No encryption */
-		 "",
-# endif
-		 preserve_option ? " -p" : "",
-		 targetshouldbedirectory ? " -d" : "");
-#else /* !KERBEROS && !SHISHI */
   rc = asprintf (&command, "rcp%s%s%s",
 		 iamrecursive ? " -r" : "", preserve_option ? " -p" : "",
 		 targetshouldbedirectory ? " -d" : "");
-#endif
+
   if (rc < 0)
     xalloc_die ();
 

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

Summary of changes:
 ChangeLog |    9 +++++++++
 src/rcp.c |   12 +-----------
 2 files changed, 10 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


