From MAILER-DAEMON Thu Sep 06 11:04:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T9ddA-0007yq-GC
	for mharc-commit-inetutils@gnu.org; Thu, 06 Sep 2012 11:04:32 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53448)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1T9dd2-0007xk-KP
	for commit-inetutils@gnu.org; Thu, 06 Sep 2012 11:04:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1T9dcz-0008AB-LV
	for commit-inetutils@gnu.org; Thu, 06 Sep 2012 11:04:24 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:38602)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1T9dcz-0008A7-HF
	for commit-inetutils@gnu.org; Thu, 06 Sep 2012 11:04:21 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1T9dcy-0008L6-UT
	for commit-inetutils@gnu.org; Thu, 06 Sep 2012 15:04:21 +0000
Date: Thu, 06 Sep 2012 15:04:20 +0000
Message-Id: <E1T9dcy-0008L6-UT@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-159-gb5d9f38
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 3841619d01f81d265c9cec7c37a1388bda465a1b
X-Git-Newrev: b5d9f38a3510e181a50bd82ab5103621c87a5df9
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 06 Sep 2012 15:04:31 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  b5d9f38a3510e181a50bd82ab5103621c87a5df9 (commit)
      from  3841619d01f81d265c9cec7c37a1388bda465a1b (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=b5d9f38a3510e181a50bd82ab5103621c87a5df9


commit b5d9f38a3510e181a50bd82ab5103621c87a5df9
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Thu Sep 6 16:06:21 2012 +0200

    talkd: Nominally functional ACL checking.

diff --git a/ChangeLog b/ChangeLog
index 1c8c87f..81ce3d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,46 @@
+2012-09-06  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	talkd: Partial activation of ACL features.
+	Upstream Gnulib has repaired read_utmp() call.
+
+	* talkd/acl.c (ACT_ALLOW, ACT_DENY): Removed macros.
+	(read_acl): Add parameter `int silent'.  Report missing
+	file only if `!silent'.  Partially decrease syslog severity.
+	New return values ACL_ALLOW and ACL_DENY.
+	(open_users_acl): Call read_acl() with silent flag, a file
+	is not mandatory for users.
+	(acl_match): Return ACL_ALLOW as default result.
+	* talkd/announce.c (print_msg, announce): Lower severity
+	LOG_CRIT to LOG_ERR.
+	* talkd/intalkd.h (ACL_ALLOW, ACL_DENY): New macros.
+	(logging): New variable.
+	(read_acl): Update prototype.
+	* talkd/process.c (process_request): Delay ACL matching
+	until protocol and address have been checked.  Send answer
+	FAILED in reply whenever acl_match() returns ACL_DENY.
+	Give syslog messages lower severity and condition on
+	`logging || debug'.
+	* talkd/table.c (insert_table): Change LOG_CRIT to LOG_ERR.
+	* talkd/talkd.c (logging): New variable.
+	(doc): Mention service `ntalk'.
+	(argp_options): New option `-l/--logging'.
+	(parse_opt) <'l'>: New case.
+	(main): Call read_acl() with non-silent flag.  Explicitly
+	use STDIN_FILENO as descriptor for talkd_run().
+	(alarm_handler): New variable OERRNO. Protect and recover
+	errno across handler actions.
+	(talkd_run): Commit syslog messages for `logging || debug'.
+	Lower severity to LOG_NOTICE.
+
+	* doc/inetutils.texi <talkd invokation>: Expose the
+	distinguishing features of the present implementation.
+
+	* talk/init_disp.c (init_display): Catch SIGQUIT.
+
+	* configure.ac: Include <sys/socket.h> when checking
+	for `sockaddr_in6.sin6_len' and `sockaddr_storage.ss_len'.
+	Check talk_BUILD and LIBCURSES in summary message.
+
 2012-08-31  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	ping, ping6: Support IDN named hosts.
diff --git a/configure.ac b/configure.ac
index e313b59..5d9bccd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -655,9 +655,11 @@ IU_CHECK_MEMBERS([struct sockaddr_in.sin_len], , ,
       #include <netinet/in.h> ])
 IU_CHECK_MEMBERS([struct sockaddr_in6.sin6_len], , ,
     [ #include <sys/types.h>
+      #include <sys/socket.h>
       #include <netinet/in.h> ])
 IU_CHECK_MEMBERS([struct sockaddr_storage.ss_len], , ,
     [ #include <sys/types.h>
+      #include <sys/socket.h>
       #include <netinet/in.h> ])
 
 if test "$ac_cv_header_utmp_h" = yes; then
@@ -1003,7 +1005,8 @@ ${rcp_BUILD:+$KERBEROS_VERSION}
 ${rlogin_BUILD:+$KERBEROS_VERSION}
     rsh            ${enable_rsh}  \
 ${rshd_BUILD:+$KERBEROS_VERSION}
-    talk           ${enable_talk}
+    talk           ${enable_talk}  \
+${talk_BUILD:+$LIBCURSES}
     telnet         ${enable_telnet}  \
 ${telnet_BUILD:+${KERBEROS_VERSION:+$KERBEROS_VERSION }$LIBTERMCAP}
     tftp           ${enable_tftp}
diff --git a/doc/inetutils.texi b/doc/inetutils.texi
index bce878d..457c2bc 100644
--- a/doc/inetutils.texi
+++ b/doc/inetutils.texi
@@ -1518,7 +1518,7 @@ transfer parameters: @code{mode}, @code{form}, and @code{struct}.
 @node The .netrc File
 @section The @file{.netrc} File
 
-The @code{.netrc} file contains login and initialization information
+The @file{.netrc} file contains login and initialization information
 used by the auto-login process.  It resides in the user's home
 directory.  The following tokens are recognized; they may be separated
 by spaces, tabs, or new-lines:
@@ -2424,8 +2424,8 @@ from the socket and create a new socket connected to the peer.  It
 should fork, and the parent should then exit to allow inetd to check
 for new service requests to spawn new servers.  Datagram servers which
 process all incoming datagrams on a socket and eventually time out are
-said to be ``single-threaded''.  @command{comsat} and talkd are both
-examples of the latter type of datagram server.  @command{tftpd} is an
+said to be ``single-threaded''.  @command{comsat} and @command{talkd} are
+both examples of the latter type of datagram server.  @command{tftpd} is an
 example of a multi-threaded datagram server.
 
 Servers using stream sockets generally are multi-threaded and use the
@@ -3639,6 +3639,7 @@ on the connection associated with the stderr, and is not ...
 @samp{Password incorrect} is a security breach which allows people to
 probe a system for users with null passwords.
 
+
 @node talkd invocation
 @chapter @command{talkd}: a server for communication between users
 @cindex talkd
@@ -3646,11 +3647,12 @@ probe a system for users with null passwords.
 @command{talkd} is the server that notifies a user that someone else
 wants to initiate a conversation.  It acts as a repository of
 invitations, responding to requests by clients wishing to rendezvous
-to hold a conversation.
+in order to hold a conversation.
 
-@example
-talkd [@var{option}]@dots{}
-@end example
+@section Invoking
+This implementation uses the newer protocol specification @samp{ntalk},
+and is intended to be invoked by a super-server @command{inetd} at that
+datagram port.  The following switches and options are available.
 
 @table @option
 @item -a @var{file}
@@ -3660,7 +3662,7 @@ talkd [@var{option}]@dots{}
 Read site-wide ACLs from @var{file}.
 
 @item -d
-@item --debug
+@itemx --debug
 @opindex --debug
 @opindex --d
 Enable debugging.
@@ -3669,26 +3671,35 @@ Enable debugging.
 @itemx --idle-timeout=@var{seconds}
 @opindex -i
 @opindex --idle-timeout
-Set idle timeout value.
+Set idle timeout length
+
+@item -l
+@itemx --logging
+@opindex -i
+@opindex --logging
+Enable a somewhat enhanced logging verbosity, reporting
+some more unexpected events that might arise.
 
 @item -r @var{seconds}
 @itemx --request-ttl=@var{seconds}
 @opindex -r
 @opindex --request-ttl
-Set request time-to-live value.
+Set time-to-live length for requests.
 
 @item -t @var{seconds}
-@item --timeout=@var{seconds}
+@itemx --timeout=@var{seconds}
 @opindex -t
 @opindex --timeout
-Set timeout value.
+Set timeout length.
 @end table
 
+@section Modus operandi
+
 In normal operation, a client, the caller, initiates a rendezvous by
-sending a @code{CTL_MSG} to the server of type @samp{LOOK_UP} (see
+sending a @code{CTL_MSG} of type @samp{LOOK_UP} to the server (see
 @file{protocols/talkd.h}).  This causes the server to search its
-invitation tables to check if an invitation currently exists for the
-caller (to speak to the callee specified in the message).  If the
+invitation tables to check whether an invitation currently exists for the
+caller (wanting to talk to the callee specified in the message).  If the
 lookup fails, the caller then sends an @samp{ANNOUNCE} message causing
 the server to broadcast an announcement on the callee's login ports
 requesting contact.  When the callee responds, the local server uses
@@ -3696,6 +3707,41 @@ the recorded invitation to respond with the appropriate rendezvous
 address and the caller and callee client programs establish a stream
 connection through which the conversation takes place.
 
+This implementation inserts an additional preparation where a site-wide
+access control list can be used to limit service access in general, and
+for any local user, i.e., present on the server's system, a further user
+owned file @file{.talkd} is parsed if at all present, in order to even
+further fine tune access to this particular user.
+
+@section Access control in talkd
+
+The server can be run in a mode with additional access control,
+beyond the legacy capabilities of @command{ntalkd}.  This is done
+using the option @option{-a}, or equivalently @option{--acl}.
+The format of this access control is shared with the user specific
+file @file{.talkrc}.
+
+As is usual, indentation, empty lines, and lines whose first printable
+character is the hash character, are all ignored.  Each active line
+must contain at least two fields, an @code{action} and a @code{user-exp},
+where the only acceptable action types are @samp{allow} and @samp{deny}.
+The second field @code{user-exp} is a POSIX regular expression crafted
+to match user names of callers, i.e., the remote participant, for which
+the action applies.
+
+@example
+action user-exp [net-exp @dots{}]
+@end example
+
+Each line may be augmented by a net list, containing one or more
+expressions @code{net-exp}. Each of these is either the simple
+word @samp{any}, a full IPv4 address, or a full IPv4 address with
+an appended netmask.  The effect is to restrict the applicability
+of the rule to the specified address ranges, or to set an explicit
+wildcard match.  The absence of a net list is equivalent to specifying
+a single @samp{any}.
+
+
 @node telnetd invocation
 @chapter @command{telnetd}: Telnet server
 @cindex telnetd
diff --git a/talk/init_disp.c b/talk/init_disp.c
index 1611e13..dc58226 100644
--- a/talk/init_disp.c
+++ b/talk/init_disp.c
@@ -107,6 +107,7 @@ init_display (void)
   noecho ();
   crmode ();
 
+  signal (SIGQUIT, sig_sent);
   signal (SIGINT, sig_sent);
   signal (SIGPIPE, sig_sent);
 
diff --git a/talkd/acl.c b/talkd/acl.c
index 168d5ea..501239e 100644
--- a/talkd/acl.c
+++ b/talkd/acl.c
@@ -34,9 +34,6 @@ struct netdef
   unsigned int netmask;
 };
 
-#define ACT_ALLOW  0
-#define ACT_DENY   1
-
 typedef struct acl acl_t;
 
 struct acl
@@ -119,7 +116,7 @@ netdef_parse (char *str)
   netdef = malloc (sizeof *netdef);
   if (!netdef)
     {
-      syslog (LOG_ERR, "out of memory");
+      syslog (LOG_ERR, "Out of memory");
       exit (EXIT_FAILURE);
     }
 
@@ -131,7 +128,7 @@ netdef_parse (char *str)
 }
 
 void
-read_acl (char *config_file)
+read_acl (char *config_file, int silent)
 {
   FILE *fp;
   int line;
@@ -144,7 +141,8 @@ read_acl (char *config_file)
   fp = fopen (config_file, "r");
   if (!fp)
     {
-      syslog (LOG_ERR, "can't open config file %s: %m", config_file);
+      if (!silent)
+	syslog (LOG_ERR, "Cannot open config file %s: %m", config_file);
       return;
     }
 
@@ -178,19 +176,19 @@ read_acl (char *config_file)
 	}
 
       if (strcmp (argv[0], "allow") == 0)
-	action = ACT_ALLOW;
+	action = ACL_ALLOW;
       else if (strcmp (argv[0], "deny") == 0)
-	action = ACT_DENY;
+	action = ACL_DENY;
       else
 	{
-	  syslog (LOG_ERR, "%s:%d: unknown keyword", config_file, line);
+	  syslog (LOG_WARNING, "%s:%d: unknown keyword", config_file, line);
 	  argcv_free (argc, argv);
 	  continue;
 	}
 
       if (regcomp (&re, argv[1], 0) != 0)
 	{
-	  syslog (LOG_ERR, "%s:%d: bad regexp", config_file, line);
+	  syslog (LOG_WARNING, "%s:%d: bad regexp", config_file, line);
 	  argcv_free (argc, argv);
 	  continue;
 	}
@@ -217,7 +215,7 @@ read_acl (char *config_file)
       acl = malloc (sizeof *acl);
       if (!acl)
 	{
-	  syslog (LOG_CRIT, "out of memory");
+	  syslog (LOG_ERR, "Out of memory");
 	  exit (EXIT_FAILURE);
 	}
       acl->next = NULL;
@@ -251,14 +249,14 @@ open_users_acl (char *name)
 	    2 /* Null and separator.  */ );
   if (!filename)
     {
-      syslog (LOG_ERR, "out of memory");
+      syslog (LOG_ERR, "Out of memory");
       return NULL;
     }
 
   sprintf (filename, "%s/%s", pw->pw_dir, USER_ACL_NAME);
 
   mark = acl_tail;
-  read_acl (filename);
+  read_acl (filename, 1);
   free (filename);
   return mark;
 }
@@ -329,5 +327,5 @@ acl_match (CTL_MSG * msg, struct sockaddr_in *sa_in)
 	}
     }
   discard_acl (mark);
-  return ACT_ALLOW;
+  return ACL_ALLOW;
 }
diff --git a/talkd/announce.c b/talkd/announce.c
index 5fce5c3..7bf1818 100644
--- a/talkd/announce.c
+++ b/talkd/announce.c
@@ -116,7 +116,7 @@ print_mesg (char *tty, CTL_MSG * request, char *remote_machine)
 
   if ((cp = ttymsg (&iovec, 1, tty, RING_WAIT - 5)) != NULL)
     {
-      syslog (LOG_CRIT, "%s", cp);
+      syslog (LOG_ERR, "%s", cp);
       return FAILED;
     }
   return SUCCESS;
@@ -136,7 +136,7 @@ announce (CTL_MSG * request, char *remote_machine)
   ttypath = malloc (len);
   if (!ttypath)
     {
-      syslog (LOG_CRIT, "out of memory");
+      syslog (LOG_ERR, "Out of memory");
       exit (EXIT_FAILURE);
     }
   sprintf (ttypath, "%s/%s", PATH_DEV, request->r_tty);
diff --git a/talkd/intalkd.h b/talkd/intalkd.h
index 338e7f8..30b8b95 100644
--- a/talkd/intalkd.h
+++ b/talkd/intalkd.h
@@ -39,7 +39,11 @@
 
 #define USER_ACL_NAME ".talkrc"
 
+#define ACL_ALLOW  0
+#define ACL_DENY   1
+
 extern int debug;
+extern int logging;
 extern unsigned int timeout;
 extern time_t max_idle_time;
 extern time_t max_request_ttl;
@@ -58,6 +62,6 @@ extern int print_response (const char *cp, CTL_RESPONSE * rp);
 extern int insert_table (CTL_MSG * request, CTL_RESPONSE * response);
 extern int delete_invite (unsigned long id_num);
 extern int new_id (void);
-extern void read_acl (char *config_file);
+extern void read_acl (char *config_file, int silent);
 extern int acl_match (CTL_MSG * msg, struct sockaddr_in *sa_in);
 extern int announce (CTL_MSG * request, char *remote_machine);
diff --git a/talkd/process.c b/talkd/process.c
index f291599..4b180f0 100644
--- a/talkd/process.c
+++ b/talkd/process.c
@@ -31,24 +31,13 @@ process_request (CTL_MSG * msg, struct sockaddr_in *sa_in, CTL_RESPONSE * rp)
 {
   CTL_MSG *ptr;
 
-  if (debug)
-    {
-      print_request ("process_request", msg);
-    }
-
-  if (acl_match (msg, sa_in))
-    {
-      syslog (LOG_NOTICE, "dropping request: %s@%s",
-	      msg->l_name, inet_ntoa (sa_in->sin_addr));
-      return 1;
-    }
-
   rp->vers = TALK_VERSION;
   rp->type = msg->type;
   rp->id_num = htonl (0);
   if (msg->vers != TALK_VERSION)
     {
-      syslog (LOG_ERR, "Bad protocol version %d", msg->vers);
+      if (logging || debug)
+	syslog (LOG_NOTICE, "Bad protocol version %d", msg->vers);
       rp->answer = BADVERSION;
       return 0;
     }
@@ -57,20 +46,38 @@ process_request (CTL_MSG * msg, struct sockaddr_in *sa_in, CTL_RESPONSE * rp)
   msg->addr.sa_family = ntohs (msg->addr.sa_family);
   if (msg->addr.sa_family != AF_INET)
     {
-      syslog (LOG_ERR, "Bad address, family %d", msg->addr.sa_family);
+      if (logging || debug)
+	syslog (LOG_NOTICE, "Bad address, family %d", msg->addr.sa_family);
       rp->answer = BADADDR;
       return 0;
     }
   msg->ctl_addr.sa_family = ntohs (msg->ctl_addr.sa_family);
   if (msg->ctl_addr.sa_family != AF_INET)
     {
-      syslog (LOG_WARNING, "Bad control address, family %d",
-	      msg->ctl_addr.sa_family);
+      if (logging || debug)
+	syslog (LOG_NOTICE, "Bad control address, family %d",
+		msg->ctl_addr.sa_family);
       rp->answer = BADCTLADDR;
       return 0;
     }
   /* FIXME: compare address and sa_in? */
 
+  if (acl_match (msg, sa_in) == ACL_DENY)
+    {
+      if (logging || debug)
+	syslog (LOG_NOTICE, "dropping request: %s@%s",
+		msg->l_name, inet_ntoa (sa_in->sin_addr));
+      /* Answer FAILED to minimise information leakage,
+       * since ACL has denied access.  */
+      rp->answer = FAILED;
+      return 0;
+    }
+
+  if (debug)
+    {
+      print_request ("process_request", msg);
+    }
+
   msg->pid = ntohl (msg->pid);
 
   switch (msg->type)
diff --git a/talkd/table.c b/talkd/table.c
index b3e9363..24f6829 100644
--- a/talkd/table.c
+++ b/talkd/table.c
@@ -156,7 +156,7 @@ insert_table (CTL_MSG * request, CTL_RESPONSE * response)
   ptr = malloc (sizeof *ptr);
   if (!ptr)
     {
-      syslog (LOG_CRIT, "out of memory");
+      syslog (LOG_ERR, "Out of memory");
       exit (EXIT_FAILURE);
     }
 
diff --git a/talkd/talkd.c b/talkd/talkd.c
index 436414b..227149d 100644
--- a/talkd/talkd.c
+++ b/talkd/talkd.c
@@ -35,6 +35,7 @@ void talkd_run (int fd);
 
 /* Configurable parameters: */
 int debug;
+int logging;
 unsigned int timeout = 30;
 time_t max_idle_time = 120;
 time_t max_request_ttl = MAX_LIFE;
@@ -43,7 +44,7 @@ char *acl_file;
 char *hostname;
 
 const char args_doc[] = "";
-const char doc[] = "Talk daemon.";
+const char doc[] = "Talk daemon, using service `ntalk'.";
 const char *program_authors[] = {
 	"Sergey Poznyakoff",
 	NULL
@@ -54,6 +55,7 @@ static struct argp_option argp_options[] = {
   {"debug", 'd', NULL, 0, "enable debugging", GRP+1},
   {"idle-timeout", 'i', "SECONDS", 0, "set idle timeout value to SECONDS",
    GRP+1},
+  {"logging", 'l', NULL, 0, "enable more syslog reporting", GRP+1},
   {"request-ttl", 'r', "SECONDS", 0, "set request time-to-live value to "
    "SECONDS", GRP+1},
   {"timeout", 't', "SECONDS", 0, "set timeout value to SECONDS", GRP+1},
@@ -74,6 +76,10 @@ parse_opt (int key, char *arg, struct argp_state *state)
       debug++;
       break;
 
+    case 'l':
+      logging++;
+      break;
+
     case 't':
       timeout = strtoul (arg, NULL, 0);
       break;
@@ -103,9 +109,9 @@ main (int argc, char *argv[])
   iu_argp_init ("talkd", program_authors);
   argp_parse (&argp, argc, argv, 0, NULL, NULL);
 
-  read_acl (acl_file);
+  read_acl (acl_file, 0);
   talkd_init ();
-  talkd_run (0);
+  talkd_run (STDIN_FILENO);
   return 0;
 }
 
@@ -116,7 +122,7 @@ talkd_init (void)
   hostname = localhost ();
   if (!hostname)
     {
-      syslog (LOG_ERR, "can't determine my hostname: %m");
+      syslog (LOG_ERR, "Cannot determine my hostname: %m");
       exit (EXIT_FAILURE);
     }
 }
@@ -126,9 +132,12 @@ time_t last_msg_time;
 static void
 alarm_handler (int err _GL_UNUSED_PARAMETER)
 {
+  int oerrno = errno;
+
   if ((time (NULL) - last_msg_time) >= max_idle_time)
     exit (EXIT_SUCCESS);
   alarm (timeout);
+  errno = oerrno;
 }
 
 void
@@ -149,8 +158,8 @@ talkd_run (int fd)
 	recvfrom (fd, &msg, sizeof msg, 0, (struct sockaddr *) &sa_in, &len);
       if (rc != sizeof msg)
 	{
-	  if (rc < 0 && errno != EINTR)
-	    syslog (LOG_WARNING, "recvfrom: %m");
+	  if (rc < 0 && errno != EINTR && (logging || debug))
+	    syslog (LOG_NOTICE, "recvfrom: %m");
 	  continue;
 	}
       last_msg_time = time (NULL);
@@ -159,8 +168,8 @@ talkd_run (int fd)
 	  rc = sendto (fd, &resp, sizeof resp, 0,
 		       (struct sockaddr *) &msg.ctl_addr,
 		       sizeof (msg.ctl_addr));
-	  if (rc != sizeof resp)
-	    syslog (LOG_WARNING, "sendto: %m");
+	  if (rc != sizeof resp && (logging || debug))
+	    syslog (LOG_NOTICE, "sendto: %m");
 	}
     }
 }

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

Summary of changes:
 ChangeLog          |   43 +++++++++++++++++++++++++++++
 configure.ac       |    5 +++-
 doc/inetutils.texi |   76 +++++++++++++++++++++++++++++++++++++++++----------
 talk/init_disp.c   |    1 +
 talkd/acl.c        |   26 ++++++++---------
 talkd/announce.c   |    4 +-
 talkd/intalkd.h    |    6 +++-
 talkd/process.c    |   39 +++++++++++++++-----------
 talkd/table.c      |    2 +-
 talkd/talkd.c      |   25 +++++++++++-----
 10 files changed, 169 insertions(+), 58 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Thu Sep 06 20:38:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T9maM-0000N6-Rp
	for mharc-commit-inetutils@gnu.org; Thu, 06 Sep 2012 20:38:14 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44599)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1T9maI-0000Ma-UB
	for commit-inetutils@gnu.org; Thu, 06 Sep 2012 20:38:12 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1T9maG-0000C1-R2
	for commit-inetutils@gnu.org; Thu, 06 Sep 2012 20:38:10 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:41660)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1T9maG-0000Bv-Mz
	for commit-inetutils@gnu.org; Thu, 06 Sep 2012 20:38:08 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1T9maG-0002Wj-56
	for commit-inetutils@gnu.org; Fri, 07 Sep 2012 00:38:08 +0000
Date: Fri, 07 Sep 2012 00:38:08 +0000
Message-Id: <E1T9maG-0002Wj-56@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-160-gb763dbc
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b5d9f38a3510e181a50bd82ab5103621c87a5df9
X-Git-Newrev: b763dbc51e7306d94270cedc982006047e04f60f
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 07 Sep 2012 00:38:13 -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  b763dbc51e7306d94270cedc982006047e04f60f (commit)
      from  b5d9f38a3510e181a50bd82ab5103621c87a5df9 (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=b763dbc51e7306d94270cedc982006047e04f60f


commit b763dbc51e7306d94270cedc982006047e04f60f
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Sep 7 02:17:18 2012 +0200

    talkd: Full ACL implementation.

diff --git a/ChangeLog b/ChangeLog
index 81ce3d4..324dc54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2012-09-07  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	talkd: Full ACL capability.
+
+	* talkd/acl.c (struct acl): New member `system'.
+	(read_acl): Rename parameter `silent' as `system',
+	used to distinguish site-wide and user setting.
+	If `system' is true and file is set, but non-readable,
+	then write a syslog message and abort execution.
+	(open_user_acl): Call read_acl() with `system = 0'.
+	(acl_match): New variables SYSTEM_ACTION, USER_ACTION,
+	and FOUND_USER_ACL.  Check site-wide ACL against
+	`msg->r_name' and user ACL against `msg->l_name'.
+	Travers the full list of rules for applicable actions.
+	Implement overriding mechanism depending on policy
+	for the returned value.
+	* talkd/intalkd.h (strict_policy): New variable.
+	* talkd/talkd.c (strict_policy): Likewise.
+	(arpg_options): New option `-S/--strict-policy'.
+	(parse_opt) <'S'>: New case.
+	(main): Call read_acl() with `system = 1'.
+	* doc/inetutils.texi <talkd invocation>: Updated.
+
 2012-09-06  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	talkd: Partial activation of ACL features.
diff --git a/doc/inetutils.texi b/doc/inetutils.texi
index 457c2bc..56eb184 100644
--- a/doc/inetutils.texi
+++ b/doc/inetutils.texi
@@ -3686,6 +3686,14 @@ some more unexpected events that might arise.
 @opindex --request-ttl
 Set time-to-live length for requests.
 
+@item -S
+@itemx --strict-policy
+@opindex -S
+@opindex --strict-policy
+Apply strict ACL policy on this system. This means that
+the site-wide ACL must provide explicit @samp{allow}
+rules for admitting traffic at all.
+
 @item -t @var{seconds}
 @itemx --timeout=@var{seconds}
 @opindex -t
@@ -3710,7 +3718,7 @@ connection through which the conversation takes place.
 This implementation inserts an additional preparation where a site-wide
 access control list can be used to limit service access in general, and
 for any local user, i.e., present on the server's system, a further user
-owned file @file{.talkd} is parsed if at all present, in order to even
+owned file @file{.talkrc} is parsed if at all present, in order to even
 further fine tune access to this particular user.
 
 @section Access control in talkd
@@ -3719,15 +3727,25 @@ The server can be run in a mode with additional access control,
 beyond the legacy capabilities of @command{ntalkd}.  This is done
 using the option @option{-a}, or equivalently @option{--acl}.
 The format of this access control is shared with the user specific
-file @file{.talkrc}.
+file @file{.talkrc}.  Normally the site-wide setting operates with
+a default value @samp{allow}, but specifying the option @option{-S},
+or @option{--strict-policy}, changes this to @samp{deny}.
+In addition, strict policy disables the possibility that an
+allowing outcome from the user specific ACL would be able to override
+a denial resulting from the system-wide ACL.
 
 As is usual, indentation, empty lines, and lines whose first printable
 character is the hash character, are all ignored.  Each active line
 must contain at least two fields, an @code{action} and a @code{user-exp},
 where the only acceptable action types are @samp{allow} and @samp{deny}.
 The second field @code{user-exp} is a POSIX regular expression crafted
-to match user names of callers, i.e., the remote participant, for which
-the action applies.
+to match user names.
+
+In a site-wide ACL the expression is matched against the requested
+local user name, whereas in a user specific ACL the matching is done
+against the remote caller's name of obvious reasons.  Remember that
+the regular expression would need anchors in order to test not only
+substrings.
 
 @example
 action user-exp [net-exp @dots{}]
@@ -3739,7 +3757,25 @@ word @samp{any}, a full IPv4 address, or a full IPv4 address with
 an appended netmask.  The effect is to restrict the applicability
 of the rule to the specified address ranges, or to set an explicit
 wildcard match.  The absence of a net list is equivalent to specifying
-a single @samp{any}.
+a single @samp{any}.  The netmask can be specified as a CIDR mask
+length, or as an explicit address mask.
+
+The actual evaluation is run separately for the site-wide ACL,
+and the requested local user ACL contained in the private file
+@file{.talkrc} of this user.
+
+All rules in each set are evaluated, in the sense that whenever
+an expression @code{net-exp} matches the incoming IPv4 address,
+then the regular expression @code{user-exp} is tested for a match.
+That being the case, the corresponding action is recorded.  The last
+match in each set determines the outcome.
+
+In the most common case, a system wide @samp{deny} can be overridden
+if the local user has specified valid access rules. In the contrary
+case where no valid user rule could be established at all, then a
+@samp{deny} from a system wide ACL will be used as the final action.
+This final ruling, without any possibility of user intervention,
+is always enforced whenever the server is being run in strict policy mode.
 
 
 @node telnetd invocation
diff --git a/talkd/acl.c b/talkd/acl.c
index 501239e..e3c7ac3 100644
--- a/talkd/acl.c
+++ b/talkd/acl.c
@@ -41,6 +41,7 @@ struct acl
   acl_t *next;
   regex_t re;
   netdef_t *netlist;
+  int system;
   int action;
 };
 
@@ -128,7 +129,7 @@ netdef_parse (char *str)
 }
 
 void
-read_acl (char *config_file, int silent)
+read_acl (char *config_file, int system)
 {
   FILE *fp;
   int line;
@@ -141,9 +142,15 @@ read_acl (char *config_file, int silent)
   fp = fopen (config_file, "r");
   if (!fp)
     {
-      if (!silent)
-	syslog (LOG_ERR, "Cannot open config file %s: %m", config_file);
-      return;
+      if (system)
+	{
+	  /* A missing, yet specified, site-wide ACL is a serious error.
+	   * Abort execution whenever this happens.
+	   */
+	  syslog (LOG_ERR, "Cannot open config file %s: %m", config_file);
+	  exit (EXIT_FAILURE);
+	}
+      return;	/* User setting may fail to exist.  Just ignore.  */
     }
 
   line = 0;
@@ -220,6 +227,7 @@ read_acl (char *config_file, int silent)
 	}
       acl->next = NULL;
       acl->action = action;
+      acl->system = system;
       acl->netlist = head;
       acl->re = re;
 
@@ -256,8 +264,9 @@ open_users_acl (char *name)
   sprintf (filename, "%s/%s", pw->pw_dir, USER_ACL_NAME);
 
   mark = acl_tail;
-  read_acl (filename, 1);
+  read_acl (filename, 0);	/* Private file, not mandatory.  */
   free (filename);
+
   return mark;
 }
 
@@ -307,9 +316,17 @@ acl_match (CTL_MSG * msg, struct sockaddr_in *sa_in)
 {
   acl_t *acl, *mark;
   unsigned int ip;
+  int system_action = ACL_ALLOW, user_action = ACL_ALLOW;
+  int found_user_acl = 0;
+
+  if (strict_policy)
+    system_action = ACL_DENY;
 
   mark = open_users_acl (msg->r_name);
   ip = sa_in->sin_addr.s_addr;
+  if (mark && (mark != acl_tail))
+    found_user_acl = 1;
+
   for (acl = acl_head; acl; acl = acl->next)
     {
       netdef_t *net;
@@ -318,14 +335,36 @@ acl_match (CTL_MSG * msg, struct sockaddr_in *sa_in)
 	{
 	  if (net->ipaddr == (ip & net->netmask))
 	    {
-	      if (regexec (&acl->re, msg->l_name, 0, NULL, 0) == 0)
-		{
-		  discard_acl (mark);
-		  return acl->action;
-		}
+	      /*
+	       * Site-wide ACLs concern user's name on this machine,
+	       * whereas user's rules concern the incoming client name.
+	       */
+	      if (acl->system &&
+		  regexec (&acl->re, msg->r_name, 0, NULL, 0) == 0)
+		system_action = acl->action;
+	      else if (regexec (&acl->re, msg->l_name, 0, NULL, 0) == 0)
+		user_action = acl->action;
 	    }
 	}
     }
   discard_acl (mark);
-  return ACL_ALLOW;
+
+  if (system_action == ACL_ALLOW)
+    return user_action;
+
+  if (strict_policy)
+    return ACL_DENY;	/* Equal to `system_action'.  */
+
+  /* At this point it is known that last activated site-wide
+   * ACL rule has set SYSTEM_ACTION to ACL_DENY.  Do we
+   * always want it to be overridable?
+   */
+
+  /* Override ACL_DENY only if there was a user specific file
+   * ~/.talkrc containing some active rules at all.  In other
+   * words, a site-policy claiming `deny' will need an act of
+   * will by the user in order that it be overridden.
+   */
+
+  return found_user_acl ? user_action : ACL_DENY;
 }
diff --git a/talkd/intalkd.h b/talkd/intalkd.h
index 30b8b95..b611a33 100644
--- a/talkd/intalkd.h
+++ b/talkd/intalkd.h
@@ -44,6 +44,7 @@
 
 extern int debug;
 extern int logging;
+extern int strict_policy;
 extern unsigned int timeout;
 extern time_t max_idle_time;
 extern time_t max_request_ttl;
@@ -62,6 +63,6 @@ extern int print_response (const char *cp, CTL_RESPONSE * rp);
 extern int insert_table (CTL_MSG * request, CTL_RESPONSE * response);
 extern int delete_invite (unsigned long id_num);
 extern int new_id (void);
-extern void read_acl (char *config_file, int silent);
+extern void read_acl (char *config_file, int system);
 extern int acl_match (CTL_MSG * msg, struct sockaddr_in *sa_in);
 extern int announce (CTL_MSG * request, char *remote_machine);
diff --git a/talkd/talkd.c b/talkd/talkd.c
index 227149d..3e4f183 100644
--- a/talkd/talkd.c
+++ b/talkd/talkd.c
@@ -36,6 +36,7 @@ void talkd_run (int fd);
 /* Configurable parameters: */
 int debug;
 int logging;
+int strict_policy;
 unsigned int timeout = 30;
 time_t max_idle_time = 120;
 time_t max_request_ttl = MAX_LIFE;
@@ -58,6 +59,7 @@ static struct argp_option argp_options[] = {
   {"logging", 'l', NULL, 0, "enable more syslog reporting", GRP+1},
   {"request-ttl", 'r', "SECONDS", 0, "set request time-to-live value to "
    "SECONDS", GRP+1},
+  {"strict-policy", 'S', NULL, 0, "apply strict ACL policy", GRP+1},
   {"timeout", 't', "SECONDS", 0, "set timeout value to SECONDS", GRP+1},
 #undef GRP
   {NULL}
@@ -76,20 +78,24 @@ parse_opt (int key, char *arg, struct argp_state *state)
       debug++;
       break;
 
+    case 'i':
+      max_idle_time = strtoul (arg, NULL, 0);
+      break;
+
     case 'l':
       logging++;
       break;
 
-    case 't':
-      timeout = strtoul (arg, NULL, 0);
+    case 'r':
+      max_request_ttl = strtoul (arg, NULL, 0);
       break;
 
-    case 'i':
-      max_idle_time = strtoul (arg, NULL, 0);
+    case 'S':
+      strict_policy++;
       break;
 
-    case 'r':
-      max_request_ttl = strtoul (arg, NULL, 0);
+    case 't':
+      timeout = strtoul (arg, NULL, 0);
       break;
 
     default:
@@ -109,7 +115,7 @@ main (int argc, char *argv[])
   iu_argp_init ("talkd", program_authors);
   argp_parse (&argp, argc, argv, 0, NULL, NULL);
 
-  read_acl (acl_file, 0);
+  read_acl (acl_file, 1);	/* System wide ACL.  Can abort.  */
   talkd_init ();
   talkd_run (STDIN_FILENO);
   return 0;

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

Summary of changes:
 ChangeLog          |   23 +++++++++++++++++++
 doc/inetutils.texi |   46 +++++++++++++++++++++++++++++++++++----
 talkd/acl.c        |   61 ++++++++++++++++++++++++++++++++++++++++++---------
 talkd/intalkd.h    |    3 +-
 talkd/talkd.c      |   20 +++++++++++------
 5 files changed, 129 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Fri Sep 07 10:48:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T9zrK-0006Ac-OQ
	for mharc-commit-inetutils@gnu.org; Fri, 07 Sep 2012 10:48:38 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40072)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1T9zrC-0006A4-BY
	for commit-inetutils@gnu.org; Fri, 07 Sep 2012 10:48:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1T9zr3-0004QD-JP
	for commit-inetutils@gnu.org; Fri, 07 Sep 2012 10:48:30 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:37766)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1T9zr3-0004Q6-E9
	for commit-inetutils@gnu.org; Fri, 07 Sep 2012 10:48:21 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1T9zr2-0006l4-T0
	for commit-inetutils@gnu.org; Fri, 07 Sep 2012 14:48:21 +0000
Date: Fri, 07 Sep 2012 14:48:20 +0000
Message-Id: <E1T9zr2-0006l4-T0@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-163-g8042e80
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b763dbc51e7306d94270cedc982006047e04f60f
X-Git-Newrev: 8042e80fa1e4c76a883a7148ffa6a3041cfbb400
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 07 Sep 2012 14:48:37 -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  8042e80fa1e4c76a883a7148ffa6a3041cfbb400 (commit)
       via  04d5c05aa8cf8e937ab1208ccc41a0371f1659c5 (commit)
       via  63af745d06d893b8497621cc9e521a1bebd1c1a7 (commit)
      from  b763dbc51e7306d94270cedc982006047e04f60f (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=8042e80fa1e4c76a883a7148ffa6a3041cfbb400


commit 8042e80fa1e4c76a883a7148ffa6a3041cfbb400
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Sep 7 15:47:24 2012 +0200

    traceroute: Support IDN named hosts.
    
    Cover compiler warnings in ping, ping6, inetd.

diff --git a/ChangeLog b/ChangeLog
index fc1a0e7..dc999f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,70 @@
 2012-09-07  Mats Erik Andersson  <gnu@gisladisker.se>
 
+	traceroute: Support IDN named hosts.
+
+	* configure.ac: Check traceroute_BUILD and LIBIDN in
+	summary message.
+	* src/Makefile.am (traceroute_LDADD): Add $(LIBIDN).
+	(INCLUDES): Add $(INCIDN).
+
+	* src/traceroute.c: Include <unused_parameter.h>
+	[HAVE_LOCALE_H]: Include <locale.h>.
+	[HAVE_IDNA_H]: Include <idna.h>.
+	(argp_options, argp): Add missing fields.
+	(main): New variables RC and RHOST.  Let getaddrinfo()
+	resolve RHOST.
+	[HAVE_SETLOCALE]: Call setlocale().
+	[HAVE_IDN]: Call idna_to_ascii_lz().
+	(do_try): Add _GL_UNUSED_PARAMETER.
+
+	ping, ping6: Use setlocale() independently of IDN.
+	Attend to some compiler warnings.
+
+	* ping/libping.c: Remove inclusion of <locale.h>.
+	(ping_set_dest): Remove call to setlocale().
+	* ping/ping.c: Include <unused-parameter.h>.
+	[HAVE_LOCALE_H]: Include <locale.h>.
+	(argp_options, argp): Add missing fields.
+	(main) [HAVE_SETLOCALE]: Call setlocale().
+	(sig_int): Add _GL_UNUSED_PARAMETER.
+	(ping_run): Declare NRESP and I as size_t.
+	(send_echo): Declare OFF as size_t.
+	* ping/ping6.c: Include <unused-parameter.h>.
+	(argp_options, argp): Add missing fields.
+	(main) [HAVE_SETLOCALE]: Call setlocale().
+	(sig_int, print_echo, ping_init): Add _GL_UNUSED_PARAMETER.
+	(ping_run): Declare NRESP size_t and I as `unsigned long'.
+	(send_echo): Declare OFF as size_t.
+	(ping_echo): Replace format string "%d" by "%zd".
+	(ping_set_dest): Remove call setlocale().
+	* ping/ping_address.c: Include <unused-address.h>.
+	(print_address): Add _GL_UNUSED_PARAMETER.
+	* ping/ping_common.c: Include <unused-address.h>.
+	(init_data_buffer): Use `size_t len' as second parameter.
+	Declare I as size_t.
+	(decode_pattern): Add _GL_UNUSED_PARAMETER.
+	* ping/ping_common.h (init_data_buffer): Update prototype.
+	* ping/ping_echo.c: Include <unused-parameter.h>.
+	(ping_echo): Replace format string "%d" by "%zd".
+	(print_echo, print_ip_data): Add _GL_UNUSED_PARAMETER.
+	(print_icmp_code): Declare HLEN as size_t.
+	(print_ip_header): Declare J as size_t.
+	(icmp_diag): Add missing fields.
+	* ping/ping_timestamp.c: Include <unused-parameter.h>.
+	(print_timestamp): Add _GL_UNUSED_PARAMETER.
+
+	inetd: Attend to compiler warnings.
+
+	* src/inetd.c (toomany): Declare as unsigned.
+	(argp_options, argp): Add missing fields.
+	(struct servtab): Declare se_count as unsigned.
+	(enter): Declare I as size_t.
+	(parse_opt, echo_dg, discard_dg, chargen_dg)
+	(machtime_stream, machtime_dg, daytime_stream)
+	(daytime_dg): Add _GL_UNUSED_PARAMETER.
+
+2012-09-07  Mats Erik Andersson  <gnu@gisladisker.se>
+
 	talk, talkd: Compiler warnings.
 
 	* talk/ctl.c (daemon_addr, ctl_addr, my_addr): Remove
diff --git a/configure.ac b/configure.ac
index 5d9bccd..8681b98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1010,7 +1010,8 @@ ${talk_BUILD:+$LIBCURSES}
     telnet         ${enable_telnet}  \
 ${telnet_BUILD:+${KERBEROS_VERSION:+$KERBEROS_VERSION }$LIBTERMCAP}
     tftp           ${enable_tftp}
-    traceroute     ${enable_traceroute}
+    traceroute     ${enable_traceroute}  \
+${traceroute_BUILD:+$LIBIDN}
     whois          ${enable_whois}
 
   Servers:
diff --git a/ping/libping.c b/ping/libping.c
index a2bf3d7..ac99b9d 100644
--- a/ping/libping.c
+++ b/ping/libping.c
@@ -33,9 +33,6 @@
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
-#ifdef HAVE_LOCALE_H
-# include <locale.h>
-#endif
 #ifdef HAVE_IDNA_H
 # include <idna.h>
 #endif
@@ -284,9 +281,6 @@ ping_set_dest (PING * ping, char *host)
       char *p;
       int rc;
 
-# ifdef HAVE_SETLOCALE
-      setlocale(LC_ALL, "");
-# endif
       rc = idna_to_ascii_lz (host, &p, 0);
       if (rc)
 	return 1;
diff --git a/ping/ping.c b/ping/ping.c
index 22f5368..0c3de3d 100644
--- a/ping/ping.c
+++ b/ping/ping.c
@@ -42,8 +42,12 @@
 #include <ctype.h>
 #include <errno.h>
 #include <limits.h>
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
 
 #include <argp.h>
+#include <unused-parameter.h>
 #include <ping.h>
 #include "ping_impl.h"
 #include "libinetutils.h"
@@ -137,7 +141,7 @@ static struct argp_option argp_options[] = {
    "which is one of \"tsonly\" and \"tsaddr\"", GRP+1},
   {"size", 's', "NUMBER", 0, "send NUMBER data octets", GRP+1},
 #undef GRP
-  {NULL}
+  {NULL, 0, NULL, 0, NULL, 0}
 };
 
 static error_t
@@ -257,7 +261,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp = {argp_options, parse_opt, args_doc, doc};
+static struct argp argp =
+  {argp_options, parse_opt, args_doc, doc, NULL, NULL, NULL};
 
 int
 main (int argc, char **argv)
@@ -268,6 +273,10 @@ main (int argc, char **argv)
 
   set_program_name (argv[0]);
 
+# ifdef HAVE_SETLOCALE
+  setlocale(LC_ALL, "");
+# endif
+
   if (getuid () == 0)
     is_root = true;
 
@@ -364,7 +373,7 @@ decode_ip_timestamp (char *arg)
 int volatile stop = 0;
 
 void
-sig_int (int signal)
+sig_int (int signal _GL_UNUSED_PARAMETER)
 {
   stop = 1;
 }
@@ -378,8 +387,8 @@ ping_run (PING * ping, int (*finish) ())
   struct timeval last, intvl, now;
   struct timeval *t = NULL;
   int finishing = 0;
-  int nresp = 0;
-  int i;
+  size_t nresp = 0;
+  size_t i;
 
   signal (SIGINT, sig_int);
 
@@ -487,7 +496,7 @@ ping_run (PING * ping, int (*finish) ())
 int
 send_echo (PING * ping)
 {
-  int off = 0;
+  size_t off = 0;
 
   if (PING_TIMING (data_length))
     {
diff --git a/ping/ping6.c b/ping/ping6.c
index 4f3e948..e8f895e 100644
--- a/ping/ping6.c
+++ b/ping/ping6.c
@@ -48,6 +48,7 @@
 # include <idna.h>
 #endif
 
+#include <unused-parameter.h>
 #include <xalloc.h>
 #include "ping6.h"
 #include "libinetutils.h"
@@ -108,7 +109,7 @@ static struct argp_option argp_options[] = {
   {"quiet", 'q', NULL, 0, "quiet output", GRP+1},
   {"size", 's', "NUMBER", 0, "send NUMBER data octets", GRP+1},
 #undef GRP
-  {NULL}
+  {NULL, 0, NULL, 0, NULL, 0}
 };
 
 static error_t
@@ -193,7 +194,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp = {argp_options, parse_opt, args_doc, doc};
+static struct argp argp =
+  {argp_options, parse_opt, args_doc, doc, NULL, NULL, NULL};
 
 int
 main (int argc, char **argv)
@@ -203,6 +205,10 @@ main (int argc, char **argv)
 
   set_program_name (argv[0]);
 
+# ifdef HAVE_SETLOCALE
+  setlocale (LC_ALL, "");
+# endif
+
   if (getuid () == 0)
     is_root = true;
 
@@ -251,7 +257,7 @@ main (int argc, char **argv)
 static volatile int stop = 0;
 
 static void
-sig_int (int signal)
+sig_int (int signal _GL_UNUSED_PARAMETER)
 {
   stop = 1;
 }
@@ -265,8 +271,8 @@ ping_run (PING * ping, int (*finish) ())
   struct timeval last, intvl, now;
   struct timeval *t = NULL;
   int finishing = 0;
-  int nresp = 0;
-  int i;
+  size_t nresp = 0;
+  unsigned long i;
 
   signal (SIGINT, sig_int);
 
@@ -377,7 +383,7 @@ ping_run (PING * ping, int (*finish) ())
 static int
 send_echo (PING * ping)
 {
-  int off = 0;
+  size_t off = 0;
 
   if (PING_TIMING (data_length))
     {
@@ -459,7 +465,7 @@ ping_echo (char *hostname)
       error (EXIT_FAILURE, 0, "getnameinfo: %s", errmsg);
     }
 
-  printf ("PING %s (%s): %d data bytes",
+  printf ("PING %s (%s): %zu data bytes",
 	  ping->ping_hostname, buffer, data_length);
   if (options & OPT_VERBOSE)
     printf (", id 0x%04x = %u", ping->ping_ident, ping->ping_ident);
@@ -481,7 +487,8 @@ ping_reset (PING * p)
 
 static int
 print_echo (int dupflag, int hops, struct ping_stat *ping_stat,
-	    struct sockaddr_in6 *dest, struct sockaddr_in6 *from,
+	    struct sockaddr_in6 *dest _GL_UNUSED_PARAMETER,
+	    struct sockaddr_in6 *from,
 	    struct icmp6_hdr *icmp6, int datalen)
 {
   int err;
@@ -696,7 +703,7 @@ echo_finish (void)
 }
 
 static PING *
-ping_init (int type, int ident)
+ping_init (int type _GL_UNUSED_PARAMETER, int ident)
 {
   int fd, err;
   const int on = 1;
@@ -886,9 +893,6 @@ ping_set_dest (PING * ping, char *host)
   char *rhost;
 
 #ifdef HAVE_IDN
-# ifdef HAVE_SETLOCALE
-  setlocale (LC_ALL, "");
-# endif
   err = idna_to_ascii_lz (host, &rhost, 0);
   if (err)
     return 1;
diff --git a/ping/ping_address.c b/ping/ping_address.c
index fcc0c60..35bc4ba 100644
--- a/ping/ping_address.c
+++ b/ping/ping_address.c
@@ -40,6 +40,7 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <errno.h>
+#include <unused-parameter.h>
 
 #include <ping.h>
 #include <ping_impl.h>
@@ -89,9 +90,11 @@ recv_address (int code, void *closure,
 }
 
 void
-print_address (int dupflag, void *closure,
-	       struct sockaddr_in *dest, struct sockaddr_in *from,
-	       struct ip *ip, icmphdr_t * icmp, int datalen)
+print_address (int dupflag, void *closure _GL_UNUSED_PARAMETER,
+	       struct sockaddr_in *dest _GL_UNUSED_PARAMETER,
+	       struct sockaddr_in *from,
+	       struct ip *ip _GL_UNUSED_PARAMETER,
+	       icmphdr_t * icmp, int datalen)
 {
   struct in_addr addr;
 
diff --git a/ping/ping_common.c b/ping/ping_common.c
index 8f2fcf9..59afb86 100644
--- a/ping/ping_common.c
+++ b/ping/ping_common.c
@@ -30,6 +30,7 @@
 #include <arpa/inet.h>
 #include <netdb.h>
 #include <xalloc.h>
+#include <unused-parameter.h>
 
 #include "ping_common.h"
 
@@ -59,9 +60,9 @@ ping_cvt_number (const char *optarg, size_t maxval, int allow_zero)
 }
 
 void
-init_data_buffer (unsigned char * pat, int len)
+init_data_buffer (unsigned char * pat, size_t len)
 {
-  int i = 0;
+  size_t i = 0;
   unsigned char *p;
 
   if (data_length == 0)
@@ -87,7 +88,7 @@ init_data_buffer (unsigned char * pat, int len)
 
 void
 decode_pattern (const char *text, int *pattern_len,
-		unsigned char *pattern_data)
+		unsigned char *pattern_data _GL_UNUSED_PARAMETER)
 {
   int i, c, off;
 
diff --git a/ping/ping_common.h b/ping/ping_common.h
index 68f477c..5cf3e8c 100644
--- a/ping/ping_common.h
+++ b/ping/ping_common.h
@@ -154,7 +154,7 @@ size_t ping_cvt_number (const char *optarg, size_t maxval, int allow_zero);
 int is_normed_time (n_time t);
 const char * ping_cvt_time (char *buf, size_t buflen, n_time t);
 
-void init_data_buffer (unsigned char *pat, int len);
+void init_data_buffer (unsigned char *pat, size_t len);
 
 void decode_pattern (const char *text, int *pattern_len,
 		     unsigned char *pattern_data);
diff --git a/ping/ping_echo.c b/ping/ping_echo.c
index cd3cdf1..7ba698a 100644
--- a/ping/ping_echo.c
+++ b/ping/ping_echo.c
@@ -40,6 +40,7 @@
 #include <ctype.h>
 #include <errno.h>
 #include <limits.h>
+#include <unused-parameter.h>
 
 #include <ping.h>
 #include "ping_impl.h"
@@ -138,7 +139,7 @@ ping_echo (char *hostname)
 #endif /* IP_OPTIONS */
     }
 
-  printf ("PING %s (%s): %d data bytes",
+  printf ("PING %s (%s): %zu data bytes",
 	  ping->ping_hostname,
 	  inet_ntoa (ping->ping_dest.ping_sockaddr.sin_addr), data_length);
   if (options & OPT_VERBOSE)
@@ -172,7 +173,8 @@ handler (int code, void *closure,
 
 int
 print_echo (int dupflag, struct ping_stat *ping_stat,
-	    struct sockaddr_in *dest, struct sockaddr_in *from,
+	    struct sockaddr_in *dest _GL_UNUSED_PARAMETER,
+	    struct sockaddr_in *from,
 	    struct ip *ip, icmphdr_t * icmp, int datalen)
 {
   int hlen;
@@ -297,7 +299,7 @@ print_icmp_code (int type, int code, char *prefix)
 static void
 print_ip_header (struct ip *ip)
 {
-  int hlen;
+  size_t hlen;
   unsigned char *cp;
 
   hlen = ip->ip_hl << 2;
@@ -305,7 +307,7 @@ print_ip_header (struct ip *ip)
 
   if (options & OPT_VERBOSE)
     {
-      int j;
+      size_t j;
 
       printf ("IP Hdr Dump:\n ");
       for (j = 0; j < sizeof (*ip); ++j)
@@ -330,7 +332,7 @@ print_ip_header (struct ip *ip)
 }
 
 void
-print_ip_data (icmphdr_t * icmp, void *data)
+print_ip_data (icmphdr_t * icmp, void *data _GL_UNUSED_PARAMETER)
 {
   int hlen;
   unsigned char *cp;
@@ -377,21 +379,21 @@ print_parameterprob (icmphdr_t * icmp, void *data)
 }
 
 struct icmp_diag icmp_diag[] = {
-  {ICMP_ECHOREPLY, "Echo Reply", NULL},
+  {ICMP_ECHOREPLY, "Echo Reply", NULL, NULL},
   {ICMP_DEST_UNREACH, NULL, print_icmp, "Dest Unreachable"},
-  {ICMP_SOURCE_QUENCH, "Source Quench", print_ip_data},
+  {ICMP_SOURCE_QUENCH, "Source Quench", print_ip_data, NULL},
   {ICMP_REDIRECT, NULL, print_icmp, "Redirect"},
-  {ICMP_ECHO, "Echo Request", NULL},
-  {ICMP_ROUTERADV, "Router Advertisment", NULL},
-  {ICMP_ROUTERDISCOVERY, "Router Discovery", NULL},
+  {ICMP_ECHO, "Echo Request", NULL, NULL},
+  {ICMP_ROUTERADV, "Router Advertisment", NULL, NULL},
+  {ICMP_ROUTERDISCOVERY, "Router Discovery", NULL, NULL},
   {ICMP_TIME_EXCEEDED, NULL, print_icmp, "Time exceeded"},
-  {ICMP_PARAMETERPROB, NULL, print_parameterprob},
-  {ICMP_TIMESTAMP, "Timestamp", NULL},
-  {ICMP_TIMESTAMPREPLY, "Timestamp Reply", NULL},
-  {ICMP_INFO_REQUEST, "Information Request", NULL},
-  {ICMP_INFO_REPLY, "Information Reply", NULL},
-  {ICMP_ADDRESS, "Address Mask Request", NULL},
-  {ICMP_ADDRESSREPLY, "Address Mask Reply", NULL},
+  {ICMP_PARAMETERPROB, NULL, print_parameterprob, NULL},
+  {ICMP_TIMESTAMP, "Timestamp", NULL, NULL},
+  {ICMP_TIMESTAMPREPLY, "Timestamp Reply", NULL, NULL},
+  {ICMP_INFO_REQUEST, "Information Request", NULL, NULL},
+  {ICMP_INFO_REPLY, "Information Reply", NULL, NULL},
+  {ICMP_ADDRESS, "Address Mask Request", NULL, NULL},
+  {ICMP_ADDRESSREPLY, "Address Mask Reply", NULL, NULL},
 };
 
 void
diff --git a/ping/ping_timestamp.c b/ping/ping_timestamp.c
index c0c22e6..3d59f95 100644
--- a/ping/ping_timestamp.c
+++ b/ping/ping_timestamp.c
@@ -39,6 +39,7 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <errno.h>
+#include <unused-parameter.h>
 
 #include <ping.h>
 #include <ping_impl.h>
@@ -89,9 +90,11 @@ recv_timestamp (int code, void *closure,
 
 
 void
-print_timestamp (int dupflag, void *closure,
-		 struct sockaddr_in *dest, struct sockaddr_in *from,
-		 struct ip *ip, icmphdr_t * icmp, int datalen)
+print_timestamp (int dupflag, void *closure _GL_UNUSED_PARAMETER,
+		 struct sockaddr_in *dest _GL_UNUSED_PARAMETER,
+		 struct sockaddr_in *from,
+		 struct ip *ip _GL_UNUSED_PARAMETER,
+		 icmphdr_t * icmp, int datalen)
 {
   char timestr[16];
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 718c75e..c812453 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -65,7 +65,7 @@ EXTRA_PROGRAMS += tftp
 
 bin_PROGRAMS += $(traceroute_BUILD)
 traceroute_SOURCES = traceroute.c
-traceroute_LDADD = $(top_builddir)/libicmp/libicmp.a $(LDADD)
+traceroute_LDADD = $(top_builddir)/libicmp/libicmp.a $(LDADD) $(LIBIDN)
 EXTRA_PROGRAMS += traceroute
 
 inetdaemon_PROGRAMS += $(inetd_BUILD)
@@ -100,7 +100,7 @@ uucpd_SOURCES = uucpd.c
 uucpd_LDADD = $(LDADD) $(LIBCRYPT)
 EXTRA_PROGRAMS += uucpd
 
-INCLUDES = $(iu_INCLUDES) $(INCAUTH) -I$(top_srcdir)/libicmp
+INCLUDES = $(iu_INCLUDES) $(INCAUTH) -I$(top_srcdir)/libicmp $(INCIDN)
 
 AM_CPPFLAGS = $(PATHDEF_BSHELL) $(PATHDEF_CONSOLE) $(PATHDEF_CP) $(PATHDEF_DEFPATH) $(PATHDEF_DEV) $(PATHDEF_INETDCONF) $(PATHDEF_INETDDIR) $(PATHDEF_INETDPID) $(PATHDEF_KLOG) $(PATHDEF_LOG) $(PATHDEF_LOGCONF) $(PATHDEF_LOGIN) $(PATHDEF_LOGPID) $(PATHDEF_NOLOGIN) $(PATHDEF_RLOGIN) $(PATHDEF_RSH) $(PATHDEF_TTY) $(PATHDEF_UTMP) $(PATHDEF_UTMPX) $(PATHDEF_UUCICO)
 
diff --git a/src/inetd.c b/src/inetd.c
index 1554ddd..bb1181c 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -156,7 +156,7 @@ int nsock, maxsock;
 fd_set allsock;
 int options;
 int timingout;
-int toomany = TOOMANY;
+unsigned toomany = TOOMANY;
 char **Argv;
 char *LastArg;
 
@@ -197,11 +197,12 @@ static struct argp_option argp_options[] = {
    "resolve IP addresses when setting environment variables "
    "(see --environment)", GRP+1},
 #undef GRP
-  {NULL}
+  {NULL, 0, NULL, 0, NULL, 0}
 };
 
 static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
+parse_opt (int key, char *arg,
+	   struct argp_state *state _GL_UNUSED_PARAMETER)
 {
   char *p;
   int number;
@@ -243,7 +244,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp = {argp_options, parse_opt, args_doc, doc};
+static struct argp argp =
+  {argp_options, parse_opt, args_doc, doc, NULL, NULL, NULL};
 
 
 struct servtab
@@ -270,7 +272,7 @@ struct servtab
   struct sockaddr_storage se_ctrladdr;	/* bound address */
   socklen_t se_addrlen;		/* exact address length in use */
   unsigned se_refcnt;
-  int se_count;			/* number started since se_time */
+  unsigned se_count;			/* number started since se_time */
   struct timeval se_time;	/* start of se_count */
   struct servtab *se_next;
 } *servtab;
@@ -711,7 +713,7 @@ enter (struct servtab *cp)
 {
   struct servtab *sep;
   SIGSTATUS sigstatus;
-  int i;
+  size_t i;
 
   /* Checking/Removing duplicates */
   for (sep = servtab; sep; sep = sep->se_next)
@@ -1493,7 +1495,7 @@ echo_stream (int s, struct servtab *sep)
 
 /* Echo service -- echo data back */
 void
-echo_dg (int s, struct servtab *sep)
+echo_dg (int s, struct servtab *sep _GL_UNUSED_PARAMETER)
 {
   char buffer[BUFSIZE];
   int i;
@@ -1531,7 +1533,7 @@ discard_stream (int s, struct servtab *sep)
 
 void
 /* Discard service -- ignore data */
-discard_dg (int s, struct servtab *sep)
+discard_dg (int s, struct servtab *sep _GL_UNUSED_PARAMETER)
 {
   char buffer[BUFSIZE];
 
@@ -1592,7 +1594,7 @@ chargen_stream (int s, struct servtab *sep)
 
 /* Character generator */
 void
-chargen_dg (int s, struct servtab *sep)
+chargen_dg (int s, struct servtab *sep _GL_UNUSED_PARAMETER)
 {
 #ifdef IPV6
   struct sockaddr_storage sa;
@@ -1654,7 +1656,7 @@ machtime (void)
 }
 
 void
-machtime_stream (int s, struct servtab *sep)
+machtime_stream (int s, struct servtab *sep _GL_UNUSED_PARAMETER)
 {
   long result;
 
@@ -1663,7 +1665,7 @@ machtime_stream (int s, struct servtab *sep)
 }
 
 void
-machtime_dg (int s, struct servtab *sep)
+machtime_dg (int s, struct servtab *sep _GL_UNUSED_PARAMETER)
 {
   long result;
 #ifdef IPV6
@@ -1684,7 +1686,7 @@ machtime_dg (int s, struct servtab *sep)
 
 void
 /* Return human-readable time of day */
-daytime_stream (int s, struct servtab *sep)
+daytime_stream (int s, struct servtab *sep _GL_UNUSED_PARAMETER)
 {
   char buffer[256];
   time_t lclock;
@@ -1697,7 +1699,7 @@ daytime_stream (int s, struct servtab *sep)
 
 /* Return human-readable time of day */
 void
-daytime_dg (int s, struct servtab *sep)
+daytime_dg (int s, struct servtab *sep _GL_UNUSED_PARAMETER)
 {
   char buffer[256];
   time_t lclock;
diff --git a/src/traceroute.c b/src/traceroute.c
index 8332167..0a3ad38 100644
--- a/src/traceroute.c
+++ b/src/traceroute.c
@@ -46,7 +46,14 @@
 #include <limits.h>
 #include <assert.h>
 #include <argp.h>
+#include <unused-parameter.h>
 #include <icmp.h>
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+#ifdef HAVE_IDNA_H
+# include <idna.h>
+#endif
 
 #include "xalloc.h"
 #include "libinetutils.h"
@@ -129,7 +136,7 @@ static struct argp_option argp_options[] = {
   {"type", 'M', "METHOD", 0, "use METHOD (`icmp' or `udp') for traceroute "
    "operations", GRP+1},
 #undef GRP
-  {NULL}
+  {NULL, 0, NULL, 0, NULL, 0}
 };
 
 static error_t
@@ -190,30 +197,47 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp = {argp_options, parse_opt, args_doc, doc};
+static struct argp argp =
+  {argp_options, parse_opt, args_doc, doc, NULL, NULL, NULL};
 
 int
 main (int argc, char **argv)
 {
-  int hop;
+  int hop, rc;
+  char *rhost;
   struct addrinfo hints, *res;
   trace_t trace;
 
   set_program_name (argv[0]);
 
+#ifdef HAVE_SETLOCALE
+  setlocale (LC_ALL, "");
+#endif
+
   pid = getpid();
 
   /* Parse command line */
   iu_argp_init ("traceroute", program_authors);
   argp_parse (&argp, argc, argv, 0, NULL, NULL);
 
+  if ((hostname == NULL) || (*hostname == '\0'))
+    error (EXIT_FAILURE, 0, "unknown host");
+
   /* Hostname lookup first for better information */
   memset (&hints, 0, sizeof (hints));
   hints.ai_family = AF_INET;
   hints.ai_flags = AI_CANONNAME;
 
-  if ((hostname == NULL) || (*hostname == '\0')
-      || getaddrinfo (hostname, NULL, &hints, &res))
+#ifdef HAVE_IDN
+  rc = idna_to_ascii_lz (hostname, &rhost, 0);
+  if (rc)
+    error (EXIT_FAILURE, 0, "unknown host");
+#else /* !HAVE_IDN */
+  rhost = hostname;
+#endif
+
+  rc = getaddrinfo (rhost, NULL, &hints, &res);
+  if (rc)
     error (EXIT_FAILURE, 0, "unknown host");
 
   memcpy (&dest, res->ai_addr, res->ai_addrlen);
@@ -247,7 +271,8 @@ main (int argc, char **argv)
 
 void
 do_try (trace_t * trace, const int hop,
-	const int max_hops, const int max_tries)
+	const int max_hops _GL_UNUSED_PARAMETER,
+	const int max_tries)
 {
   fd_set readset;
   int ret, tries, readonly = 0;

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


commit 04d5c05aa8cf8e937ab1208ccc41a0371f1659c5
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Sep 7 13:10:45 2012 +0200

    talk, talkd: Compiler warnings.

diff --git a/ChangeLog b/ChangeLog
index b110c35..fc1a0e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
 2012-09-07  Mats Erik Andersson  <gnu@gisladisker.se>
 
+	talk, talkd: Compiler warnings.
+
+	* talk/ctl.c (daemon_addr, ctl_addr, my_addr): Remove
+	initial values, since they are incomplete.
+	(open_sockt): Set `my_addr.sin_family' and `my_addr.sin_len'.
+	(open_ctl): Likewise with `ctl_addr'.
+	* talk/ctl_transact.c (ctl_transact): Likewise with
+	`daemon_addr'.  Call htons() with `daemon_port'.
+	* talk/get_addrs.c (daemon_port): Use in host byte order,
+	calling ntohs() on `sp->s_port'.
+	* talk/invite.c: Include <unused-parameter.h>.
+	(re_invite): Add _GL_UNUSED_PARAMETER. Initialise `daemon_addr'.
+	* talk/msgs.c: Include <unused-parameter.h>.
+	(disp_msg): Add _GL_UNUSED_PARAMETER.
+	* talk/talk.c (argp): Fill in missing fields.
+	* talkd/talkd.c (argp_options, argp): Likewise.
+	(parse_opt): Add _GL_UNUSED_PARAMETER.
+
+2012-09-07  Mats Erik Andersson  <gnu@gisladisker.se>
+
 	syslogd, tftp, tftpd, uucpd: Compiler warnings.
 
 	* src/syslogd.c (argp_options, parse_opt): Fill in
diff --git a/talk/ctl.c b/talk/ctl.c
index 29713e9..5d3ba2e 100644
--- a/talk/ctl.c
+++ b/talk/ctl.c
@@ -62,15 +62,9 @@
 #include "talk.h"
 #include "talk_ctl.h"
 
-#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
-struct sockaddr_in daemon_addr = { sizeof (daemon_addr), AF_INET };
-struct sockaddr_in ctl_addr = { sizeof (ctl_addr), AF_INET };
-struct sockaddr_in my_addr = { sizeof (my_addr), AF_INET };
-#else /* !HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
-struct sockaddr_in daemon_addr = { AF_INET };
-struct sockaddr_in ctl_addr = { AF_INET };
-struct sockaddr_in my_addr = { AF_INET };
-#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
+struct sockaddr_in daemon_addr;
+struct sockaddr_in ctl_addr;
+struct sockaddr_in my_addr;
 
 	/* inet addresses of the two machines */
 struct in_addr my_machine_addr;
@@ -89,6 +83,10 @@ open_sockt (void)
 {
   socklen_t length;
 
+  my_addr.sin_family = AF_INET;
+#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
+  my_addr.sin_len = sizeof (my_addr);
+#endif
   my_addr.sin_addr = my_machine_addr;
   my_addr.sin_port = 0;
   sockt = socket (AF_INET, SOCK_STREAM, 0);
@@ -109,6 +107,10 @@ open_ctl (void)
 {
   socklen_t length;
 
+  ctl_addr.sin_family = AF_INET;
+#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
+  ctl_addr.sin_len = sizeof (ctl_addr);
+#endif
   ctl_addr.sin_port = 0;
   ctl_addr.sin_addr = my_machine_addr;
   ctl_sockt = socket (AF_INET, SOCK_DGRAM, 0);
diff --git a/talk/ctl_transact.c b/talk/ctl_transact.c
index 47f03fc..2a50942 100644
--- a/talk/ctl_transact.c
+++ b/talk/ctl_transact.c
@@ -75,8 +75,12 @@ ctl_transact (struct in_addr target, CTL_MSG msg, int type, CTL_RESPONSE * rp)
   struct timeval wait;
 
   msg.type = type;
+  daemon_addr.sin_family = AF_INET;
+#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
+  daemon_addr.sin_len = sizeof (daemon_addr);
+#endif
   daemon_addr.sin_addr = target;
-  daemon_addr.sin_port = daemon_port;
+  daemon_addr.sin_port = htons (daemon_port);
   FD_ZERO (&ctl_mask);
   FD_SET (ctl_sockt, &ctl_mask);
 
diff --git a/talk/get_addrs.c b/talk/get_addrs.c
index 3fc5585..b5e9a0e 100644
--- a/talk/get_addrs.c
+++ b/talk/get_addrs.c
@@ -102,7 +102,7 @@ get_addrs (char *my_machine_name, char *his_machine_name)
 	       "ntalk", "udp");
       exit (-1);
     }
-  daemon_port = sp->s_port;
+  daemon_port = ntohs (sp->s_port);
 
   return 0;
 }
diff --git a/talk/invite.c b/talk/invite.c
index d89f60e..37d5304 100644
--- a/talk/invite.c
+++ b/talk/invite.c
@@ -61,6 +61,7 @@
 #include <errno.h>
 #include <unistd.h>
 #include <setjmp.h>
+#include <unused-parameter.h>
 #include "talk_ctl.h"
 #include "talk.h"
 
@@ -115,7 +116,7 @@ announce_invite (void)
  * Routine called on interupt to re-invite the callee
  */
 void
-re_invite (int sig)
+re_invite (int sig _GL_UNUSED_PARAMETER)
 {
 
   message ("Ringing your party again");
@@ -194,6 +195,10 @@ send_delete (void)
    * and don't wait for an answer
    */
   msg.id_num = htonl (remote_id);
+  daemon_addr.sin_family = AF_INET;
+#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
+  daemon_addr.sin_len = sizeof (daemon_addr);
+#endif
   daemon_addr.sin_addr = his_machine_addr;
   if (sendto (ctl_sockt, (const char *) &msg, sizeof (msg), 0,
 	      (struct sockaddr *) &daemon_addr,
diff --git a/talk/msgs.c b/talk/msgs.c
index 4ff3e27..fac1fe9 100644
--- a/talk/msgs.c
+++ b/talk/msgs.c
@@ -58,6 +58,7 @@
 #include <time.h>
 #include <signal.h>
 #include <stdio.h>
+#include <unused-parameter.h>
 #include "talk.h"
 
 #define MSG_INTERVAL 4
@@ -66,7 +67,7 @@ char *current_state;
 int current_line = 0;
 
 static void
-disp_msg (int sig)
+disp_msg (int sig _GL_UNUSED_PARAMETER)
 {
   message (current_state);
 }
diff --git a/talk/talk.c b/talk/talk.c
index 4e95b1d..ff7311e 100644
--- a/talk/talk.c
+++ b/talk/talk.c
@@ -81,7 +81,7 @@ const char *program_authors[] =
 
 const char doc[] = "talk to another user";
 const char args_doc[] = "person [ttyname]";
-static struct argp argp = { NULL, NULL, args_doc, doc };
+static struct argp argp = { NULL, NULL, args_doc, doc, NULL, NULL, NULL};
 
 int
 main (int argc, char *argv[])
diff --git a/talkd/talkd.c b/talkd/talkd.c
index 3e4f183..1a7f12e 100644
--- a/talkd/talkd.c
+++ b/talkd/talkd.c
@@ -62,11 +62,12 @@ static struct argp_option argp_options[] = {
   {"strict-policy", 'S', NULL, 0, "apply strict ACL policy", GRP+1},
   {"timeout", 't', "SECONDS", 0, "set timeout value to SECONDS", GRP+1},
 #undef GRP
-  {NULL}
+  {NULL, 0, NULL, 0, NULL, 0}
 };
 
 static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
+parse_opt (int key, char *arg,
+	   struct argp_state *state _GL_UNUSED_PARAMETER)
 {
   switch (key)
     {
@@ -105,7 +106,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp = {argp_options, parse_opt, args_doc, doc};
+static struct argp argp =
+  {argp_options, parse_opt, args_doc, doc, NULL, NULL, NULL};
 
 int
 main (int argc, char *argv[])

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


commit 63af745d06d893b8497621cc9e521a1bebd1c1a7
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Sep 7 12:35:30 2012 +0200

    Compiler warnings.

diff --git a/ChangeLog b/ChangeLog
index 324dc54..b110c35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,26 @@
 2012-09-07  Mats Erik Andersson  <gnu@gisladisker.se>
 
+	syslogd, tftp, tftpd, uucpd: Compiler warnings.
+
+	* src/syslogd.c (argp_options, parse_opt): Fill in
+	non-initialised fields.
+	* src/tftp.c: Include <unused-parameter.h>.
+	(cmdtab, argp_options, parse_opt): Fill in missing fields.
+	(setbinary, setascii, status, intr, quit, settrace)
+	(setverbose, timer): Add _GL_UNUSED_PARAMETER.
+	* src/tftpd.c: Include <unused-parameter.h>.
+	(options, argp, formats): Fill in missing fields.
+	(parse_opt, timeout, justquit): Add _GL_UNUSED_PARAMETER.
+	* src/uucpd.c (arpg): Fill in missing fields.
+
+	Upgrade TFTP test.
+
+	* tests/tftp.sh: Make mode `binary' explicit.  Add a case
+	with `ascii' transmission.
+	(ASCIIFILE, type): New variables.
+
+2012-09-07  Mats Erik Andersson  <gnu@gisladisker.se>
+
 	talkd: Full ACL capability.
 
 	* talkd/acl.c (struct acl): New member `system'.
diff --git a/src/syslogd.c b/src/syslogd.c
index f96ee85..01a97de 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -357,7 +357,7 @@ static struct argp_option argp_options[] = {
    GRP+1},
   {"sync", 'S', NULL, 0, "force a file sync on every line", GRP+1},
 #undef GRP
-  {NULL}
+  {NULL, 0, NULL, 0, NULL, 0}
 };
 
 static error_t
@@ -460,7 +460,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp = {argp_options, parse_opt, args_doc, doc};
+static struct argp argp =
+  {argp_options, parse_opt, args_doc, doc, NULL, NULL, NULL};
 
 int
 main (int argc, char *argv[])
diff --git a/src/tftp.c b/src/tftp.c
index 144d67a..c2ed52c 100644
--- a/src/tftp.c
+++ b/src/tftp.c
@@ -73,6 +73,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <argp.h>
+#include <unused-parameter.h>
 
 #include <libinetutils.h>
 
@@ -179,7 +180,7 @@ struct cmd cmdtab[] = {
   {"rexmt", xhelp, setrexmt},
   {"timeout", ihelp, settimeout},
   {"?", hhelp, help},
-  {0}
+  {NULL, NULL, NULL}
 };
 
 struct cmd *getcmd (register char *name);
@@ -190,8 +191,8 @@ const char args_doc[] = "[HOST [PORT]]";
 const char doc[] = "Trivial file transfer protocol client";
 
 static struct argp_option argp_options[] = {
-  {"verbose", 'v', NULL, 0, "verbose output"},
-  {NULL}
+  {"verbose", 'v', NULL, 0, "verbose output", 1},
+  {NULL, 0, NULL, 0, NULL, 0}
 };
 
 char *hostport_argv[3] = { "connect" };
@@ -253,7 +254,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp = {argp_options, parse_opt, args_doc, doc};
+static struct argp argp =
+  {argp_options, parse_opt, args_doc, doc, NULL, NULL, NULL};
 
 int
 main (int argc, char *argv[])
@@ -473,13 +475,13 @@ modecmd (int argc, char *argv[])
 }
 
 void
-setbinary (int argc, char *argv[])
+setbinary (int argc _GL_UNUSED_PARAMETER, char *argv[] _GL_UNUSED_PARAMETER)
 {
   settftpmode ("octet");
 }
 
 void
-setascii (int argc, char *argv[])
+setascii (int argc _GL_UNUSED_PARAMETER, char *argv[] _GL_UNUSED_PARAMETER)
 {
   settftpmode ("netascii");
 }
@@ -749,7 +751,7 @@ settimeout (int argc, char *argv[])
 }
 
 void
-status (int argc, char *argv[])
+status (int argc _GL_UNUSED_PARAMETER, char *argv[] _GL_UNUSED_PARAMETER)
 {
   if (connected)
     printf ("Connected to %s.\n", hostname);
@@ -762,7 +764,7 @@ status (int argc, char *argv[])
 }
 
 void
-intr (int signo)
+intr (int signo _GL_UNUSED_PARAMETER)
 {
   signal (SIGALRM, SIG_IGN);
   alarm (0);
@@ -886,7 +888,7 @@ makeargv (void)
 }
 
 void
-quit (int argc, char *argv[])
+quit (int argc _GL_UNUSED_PARAMETER, char *argv[] _GL_UNUSED_PARAMETER)
 {
   exit (EXIT_SUCCESS);
 }
@@ -923,14 +925,14 @@ help (int argc, char *argv[])
 }
 
 void
-settrace (int argc, char **argv)
+settrace (int argc _GL_UNUSED_PARAMETER, char *argv[] _GL_UNUSED_PARAMETER)
 {
   trace = !trace;
   printf ("Packet tracing %s.\n", trace ? "on" : "off");
 }
 
 void
-setverbose (int argc, char **argv)
+setverbose (int argc _GL_UNUSED_PARAMETER, char *argv[] _GL_UNUSED_PARAMETER)
 {
   verbose = !verbose;
   printf ("Verbose mode %s.\n", verbose ? "on" : "off");
@@ -1314,7 +1316,7 @@ printstats (const char *direction, unsigned long amount)
 }
 
 static void
-timer (int sig)
+timer (int sig _GL_UNUSED_PARAMETER)
 {
   timeout += rexmtval;
   if (timeout >= maxtimeout)
diff --git a/src/tftpd.c b/src/tftpd.c
index f8f4cff..004803d 100644
--- a/src/tftpd.c
+++ b/src/tftpd.c
@@ -82,6 +82,7 @@
 
 #include "tftpsubs.h"
 
+#include <unused-parameter.h>
 #include <argp.h>
 #include <progname.h>
 #include <libinetutils.h>
@@ -133,15 +134,16 @@ static const char *verifyhost (struct sockaddr_storage *, socklen_t);
 
 static struct argp_option options[] = {
   { "logging", 'l', NULL, 0,
-    "enable logging" },
+    "enable logging", 1},
   { "nonexistent", 'n', NULL, 0,
     "supress negative acknowledgement of requests for "
-    "nonexistent relative filenames" },
-  { NULL }
+    "nonexistent relative filenames", 1},
+  { NULL, 0, NULL, 0, NULL, 0}
 };
 
 static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
+parse_opt (int key, char *arg _GL_UNUSED_PARAMETER,
+	   struct argp_state *state _GL_UNUSED_PARAMETER)
 {
   switch (key)
     {
@@ -165,7 +167,8 @@ static struct argp argp =
     options,
     parse_opt,
     "directory...",
-    "Trivial File Transfer Protocol server"
+    "Trivial File Transfer Protocol server",
+    NULL, NULL, NULL
   };
 
 
@@ -320,7 +323,7 @@ struct formats
   {
     {"netascii", validate_access, send_file, recvfile, 1},
     {"octet", validate_access, send_file, recvfile, 0},
-    {0}
+    {0, NULL, NULL, NULL, 0}
   };
 
 /*
@@ -525,7 +528,7 @@ int timeout;
 sigjmp_buf timeoutbuf;
 
 void
-timer (int sig)
+timer (int sig _GL_UNUSED_PARAMETER)
 {
 
   timeout += rexmtval;
@@ -605,7 +608,7 @@ abort:
 }
 
 void
-justquit (int sig)
+justquit (int sig _GL_UNUSED_PARAMETER)
 {
   exit (EXIT_SUCCESS);
 }
diff --git a/src/uucpd.c b/src/uucpd.c
index 0699420..d811682 100644
--- a/src/uucpd.c
+++ b/src/uucpd.c
@@ -104,10 +104,9 @@ extern char **environ;
 
 static struct argp argp =
   {
-    NULL,
-    NULL,
-    NULL,
-    "TCP/IP server for uucico"
+    NULL, NULL, NULL,
+    "TCP/IP server for uucico",
+    NULL, NULL, NULL
   };
 
 int
diff --git a/tests/tftp.sh b/tests/tftp.sh
index 65e6b77..6efe305 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -278,6 +278,7 @@ test -d "$TMPDIR" && mkdir -p "$TMPDIR/tftp-test" \
     }
 
 # It is important to test data of differing sizes.
+# These are binary files.
 #
 # Input format:
 #
@@ -296,6 +297,14 @@ done
 
 FILELIST="`echo "$FILEDATA" | $SED 's/ .*//' | tr "\n" ' '`"
 
+# Add a file known to be ASCII encoded.
+#
+ASCIIFILE=asciifile.txt
+if test -r tools.sh; then
+    cp tools.sh "$TMPDIR/tftp-test/$ASCIIFILE"
+    FILELIST="$FILELIST $ASCIIFILE"
+fi
+
 SUCCESSES=0
 EFFORTS=0
 RESULT=0
@@ -306,9 +315,13 @@ for addr in $ADDRESSES; do
     $silence echo "trying address '$addr'..." >&2
 
     for name in $FILELIST; do
+	test -n "$name" || continue
 	EFFORTS=`expr $EFFORTS + 1`
-	rm -f $name
-	echo "get $name" | eval "$TFTP" ${VERBOSE:+-v} "$addr" $PORT $bucket
+	rm -f "$name"
+	test "$name" = $ASCIIFILE && type=ascii || type=binary
+	echo "$type
+get $name" | \
+	eval "$TFTP" ${VERBOSE:+-v} "$addr" $PORT $bucket
 
 	cmp "$TMPDIR/tftp-test/$name" "$name" 2>/dev/null
 	result=$?
@@ -355,7 +368,9 @@ if $do_conf_reload; then
     for addr in $ADDRESSES; do
 	EFFORTS=`expr $EFFORTS + 1`
 	test -f "$name" && rm "$name"
-	echo "get $name" | eval "$TFTP" ${VERBOSE:+-v} "$addr" $PORT $bucket
+	echo "binary
+get $name" | \
+	eval "$TFTP" ${VERBOSE:+-v} "$addr" $PORT $bucket
 	cmp "$TMPDIR/tftp-test/$name" "$name" 2>/dev/null
 	result=$?
 	if test $result -ne 0; then

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

Summary of changes:
 ChangeLog             |  106 +++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac          |    3 +-
 ping/libping.c        |    6 ---
 ping/ping.c           |   21 +++++++---
 ping/ping6.c          |   28 +++++++------
 ping/ping_address.c   |    9 +++-
 ping/ping_common.c    |    7 ++-
 ping/ping_common.h    |    2 +-
 ping/ping_echo.c      |   36 +++++++++--------
 ping/ping_timestamp.c |    9 +++-
 src/Makefile.am       |    4 +-
 src/inetd.c           |   28 +++++++------
 src/syslogd.c         |    5 +-
 src/tftp.c            |   26 ++++++------
 src/tftpd.c           |   19 +++++----
 src/traceroute.c      |   37 ++++++++++++++---
 src/uucpd.c           |    7 +--
 talk/ctl.c            |   20 +++++----
 talk/ctl_transact.c   |    6 ++-
 talk/get_addrs.c      |    2 +-
 talk/invite.c         |    7 +++-
 talk/msgs.c           |    3 +-
 talk/talk.c           |    2 +-
 talkd/talkd.c         |    8 ++-
 tests/tftp.sh         |   21 ++++++++-
 25 files changed, 303 insertions(+), 119 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Fri Sep 07 15:18:57 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TA44v-0006oo-C5
	for mharc-commit-inetutils@gnu.org; Fri, 07 Sep 2012 15:18:57 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37328)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TA44t-0006oH-0M
	for commit-inetutils@gnu.org; Fri, 07 Sep 2012 15:18:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TA44r-0001ic-Kk
	for commit-inetutils@gnu.org; Fri, 07 Sep 2012 15:18:54 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:51453)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TA44r-0001iY-HR
	for commit-inetutils@gnu.org; Fri, 07 Sep 2012 15:18:53 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1TA44q-000468-Tz
	for commit-inetutils@gnu.org; Fri, 07 Sep 2012 19:18:53 +0000
Date: Fri, 07 Sep 2012 19:18:52 +0000
Message-Id: <E1TA44q-000468-Tz@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-164-g43b1d34
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 8042e80fa1e4c76a883a7148ffa6a3041cfbb400
X-Git-Newrev: 43b1d34579512f4257dcb1230d3edf59a25749c0
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 07 Sep 2012 19:18:56 -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  43b1d34579512f4257dcb1230d3edf59a25749c0 (commit)
      from  8042e80fa1e4c76a883a7148ffa6a3041cfbb400 (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=43b1d34579512f4257dcb1230d3edf59a25749c0


commit 43b1d34579512f4257dcb1230d3edf59a25749c0
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Sep 7 21:15:59 2012 +0200

    talk, talkd: Portability issue.
    
    BSD systems need richer address structures,
    which must be augmented from message data.

diff --git a/ChangeLog b/ChangeLog
index dc999f1..ebb85ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2012-09-07  Mats Erik Andersson  <gnu@gisladisker.se>
 
+	talk, talkd: Portability issue.
+
+	* talk/look_up.c (check_local): New variable ADDR.
+	Call connect() with ADDR, built from `rp->addr'.
+
+	* talkd/talkd.c (talkd_run): New variable CTL_ADDR.
+	Call sendto() with CTL_ADDR, built from `msg.ctl_addr'.
+
+2012-09-07  Mats Erik Andersson  <gnu@gisladisker.se>
+
 	traceroute: Support IDN named hosts.
 
 	* configure.ac: Check traceroute_BUILD and LIBIDN in
diff --git a/talk/look_up.c b/talk/look_up.c
index 3a0baab..22ac311 100644
--- a/talk/look_up.c
+++ b/talk/look_up.c
@@ -107,11 +107,18 @@ check_local (void)
   current_state = "Waiting to connect with caller";
   do
     {
+      struct sockaddr addr;
+
       if (rp->addr.sa_family != AF_INET)
 	p_error ("Response uses invalid network address");
       errno = 0;
-      if (connect (sockt,
-		   (struct sockaddr *) &rp->addr, sizeof (rp->addr)) != -1)
+      addr.sa_family = rp->addr.sa_family;
+#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
+      addr.sa_len = sizeof (struct sockaddr_in);
+#endif
+      memcpy (&addr.sa_data, &rp->addr.sa_data, sizeof (addr.sa_data));
+
+      if (connect (sockt, &addr, sizeof (addr)) != -1)
 	return (1);
     }
   while (errno == EINTR);
diff --git a/talkd/talkd.c b/talkd/talkd.c
index 1a7f12e..2c43736 100644
--- a/talkd/talkd.c
+++ b/talkd/talkd.c
@@ -151,6 +151,8 @@ alarm_handler (int err _GL_UNUSED_PARAMETER)
 void
 talkd_run (int fd)
 {
+  struct sockaddr ctl_addr;
+
   signal (SIGALRM, alarm_handler);
   alarm (timeout);
   while (1)
@@ -173,9 +175,14 @@ talkd_run (int fd)
       last_msg_time = time (NULL);
       if (process_request (&msg, &sa_in, &resp) == 0)
 	{
+	  ctl_addr.sa_family = msg.ctl_addr.sa_family;
+#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
+	  ctl_addr.sa_len = sizeof (struct sockaddr_in);
+#endif
+	  memcpy (&ctl_addr.sa_data, &msg.ctl_addr.sa_data,
+		  sizeof (ctl_addr.sa_data));
 	  rc = sendto (fd, &resp, sizeof resp, 0,
-		       (struct sockaddr *) &msg.ctl_addr,
-		       sizeof (msg.ctl_addr));
+		       &ctl_addr, sizeof (ctl_addr));
 	  if (rc != sizeof resp && (logging || debug))
 	    syslog (LOG_NOTICE, "sendto: %m");
 	}

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

Summary of changes:
 ChangeLog      |   10 ++++++++++
 talk/look_up.c |   11 +++++++++--
 talkd/talkd.c  |   11 +++++++++--
 3 files changed, 28 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Thu Sep 13 16:33:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TCG6P-0008Up-7b
	for mharc-commit-inetutils@gnu.org; Thu, 13 Sep 2012 16:33:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49718)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCG6K-0008U7-P8
	for commit-inetutils@gnu.org; Thu, 13 Sep 2012 16:33:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCG6H-0002zt-If
	for commit-inetutils@gnu.org; Thu, 13 Sep 2012 16:33:28 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:59836)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCG6H-0002zp-Dv
	for commit-inetutils@gnu.org; Thu, 13 Sep 2012 16:33:25 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1TCG6G-0002qb-Lw
	for commit-inetutils@gnu.org; Thu, 13 Sep 2012 20:33:25 +0000
Date: Thu, 13 Sep 2012 20:33:24 +0000
Message-Id: <E1TCG6G-0002qb-Lw@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-168-g9aa72c7
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 43b1d34579512f4257dcb1230d3edf59a25749c0
X-Git-Newrev: 9aa72c7a975724fa70f4025b47ce3ee4723b75bd
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Sep 2012 20:33:31 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  9aa72c7a975724fa70f4025b47ce3ee4723b75bd (commit)
       via  78079c52085a164b3e8feeb71b41c85988ba008d (commit)
       via  a69f322c049b6645330472393021733018de9fd0 (commit)
       via  64d135fa07aff893864faadf5ca8014c8389f6b2 (commit)
      from  43b1d34579512f4257dcb1230d3edf59a25749c0 (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=9aa72c7a975724fa70f4025b47ce3ee4723b75bd


commit 9aa72c7a975724fa70f4025b47ce3ee4723b75bd
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Thu Sep 13 00:52:18 2012 +0200

    Configuration of library linkage.

diff --git a/ChangeLog b/ChangeLog
index ce584e4..adbf56a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,30 @@
 2012-09-13  Mats Erik Andersson  <gnu@gisladisker.se>
 
+	Use libdl only when needed, i.e., with libpam.
+
+	* configure.ac (LIBDL): New variable.  Publish it
+	using AC_SUBST.  When calling AC_CHECK_LIB for
+	dlopen in libdl, add the action `LIBDL=-ldl' which
+	avoids a global change of LIBS.
+	* ftpd/Makefile.am (LDADD): Add $(LIBDL).
+	* src/Makefile.am (rexecd_LDADD, rshd_LDADD): Likewise.
+
+	Link libnsl, libresolv or libsocket only if needed.
+
+	* configure.ac: Use AC_SEARCH_LIBS instead of AC_CHECK_LIB
+	when sensing for libnsl, libresolv, and libsocket.
+
+	Refine libidn detection and specification.
+
+	* configure.ac <--with-libidn-prefix>: New option.
+	<libidn detection>: Call AC_MSG_CHECKING after other
+	checks, and call AC_MSG_RESULT with correct variable.
+	Preload INCIDN and LIBIDN from $with_libidn_prefix.
+	In call to AC_CHECKLIB(idn, ...), use preset LIBIDN.
+	In summary message, print `-lidn' instead of LIBIDN.
+
+2012-09-13  Mats Erik Andersson  <gnu@gisladisker.se>
+
 	* ifconfig/changeif.c (herror prototype)
 	[!HAVE_DECL_GETADDRINFO]: Conditional use of prototype.
 	(set_address) [HAVE_DECL_GETADDRINFO]: New variables RC,
diff --git a/configure.ac b/configure.ac
index 8681b98..2ad090b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,9 +87,13 @@ AC_ARG_WITH([pam],
             AC_HELP_STRING([--with-pam],
                            [Add support for PAM]))
 AC_ARG_WITH([idn],
-  AC_HELP_STRING([--with-idn],
+  AC_HELP_STRING([--with-idn[[=DIR]]],
 		 [Use IDN support, with optional inclusion directory]), ,
 		 [with_idn=no])
+AC_ARG_WITH([libidn-prefix],
+  AC_HELP_STRING([--with-libidn-prefix[[=DIR]]],
+		 [Base directory, probes DIR/include and DIR/lib]), ,
+		 [with_libidn_prefix=no])
 
 IU_ENABLE_SERVER(ftpd)
 IU_ENABLE_SERVER(inetd)
@@ -150,9 +154,9 @@ AC_ARG_VAR(NETSTAT, [Location of 'netstat'.])
 gl_INIT
 
 ### Checks for libraries.
-AC_CHECK_LIB(nsl, inet_ntoa)
-AC_CHECK_LIB(resolv, gethostname)
-AC_CHECK_LIB(socket, getpeername)
+AC_SEARCH_LIBS([inet_ntoa], [nsl])
+AC_SEARCH_LIBS([gethostname], [resolv])
+AC_SEARCH_LIBS([getpeername], [socket])
 
 # See if a termcap library is available (under one of several names)
 IU_LIB_TERMCAP
@@ -196,7 +200,7 @@ fi
 
 # See if we have libpam.a.  Investigate PAM versus Linux-PAM.
 if test "$with_pam" = yes ; then
-  AC_CHECK_LIB(dl, dlopen)
+  AC_CHECK_LIB(dl, dlopen, LIBDL=-ldl)
   AC_CHECK_LIB(pam, pam_authenticate, LIBPAM=-lpam)
   if test "$ac_cv_lib_pam_pam_authenticate" = yes ; then
     AC_DEFINE([WITH_PAM], 1, [Define to one if you have -lpam.])
@@ -208,6 +212,7 @@ if test "$with_pam" = yes ; then
     fi
   fi
 fi
+AC_SUBST(LIBDL)
 AC_SUBST(LIBPAM)
 AC_SUBST(FTPD_LIBPAM)
 
@@ -564,10 +569,15 @@ AC_SUBST(LIBWRAP)
 ### Check for GNU Libidn
 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
-  AC_MSG_CHECKING([if GNU libidn is available])
+  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
@@ -575,12 +585,15 @@ if test x"$with_idn" != xno \
   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=-lidn], [INCIDN=])
+    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
-  AC_MSG_RESULT($ac_cv_lib_idna_to_ascii_lz)
   CPPFLAGS=$save_CPPFLAGS
 fi
 AC_SUBST([LIBIDN])
@@ -995,9 +1008,9 @@ ${ftp_BUILD:+${LIBREADLINE:+$LIBREADLINE }$LIBTERMCAP}
     ifconfig       ${enable_ifconfig}
     logger         ${enable_logger}
     ping           ${enable_ping}  \
-${ping_BUILD:+$LIBIDN}
+${ping_BUILD:+${LIBIDN:+-libidn}}
     ping6          ${enable_ping6}  \
-${ping6_BUILD:+$LIBIDN}
+${ping6_BUILD:+${LIBIDN:+-libidn}}
     rcp            ${enable_rcp}  \
 ${rcp_BUILD:+$KERBEROS_VERSION}
     rexec          ${enable_rexec}
@@ -1011,7 +1024,7 @@ ${talk_BUILD:+$LIBCURSES}
 ${telnet_BUILD:+${KERBEROS_VERSION:+$KERBEROS_VERSION }$LIBTERMCAP}
     tftp           ${enable_tftp}
     traceroute     ${enable_traceroute}  \
-${traceroute_BUILD:+$LIBIDN}
+${traceroute_BUILD:+${LIBIDN:+-libidn}}
     whois          ${enable_whois}
 
   Servers:
diff --git a/ftpd/Makefile.am b/ftpd/Makefile.am
index c9b4e8f..dd54ba7 100644
--- a/ftpd/Makefile.am
+++ b/ftpd/Makefile.am
@@ -36,6 +36,6 @@ AM_CPPFLAGS = $(PATHDEF_FTPWELCOME) $(PATHDEF_FTPUSERS) \
            $(PATHDEF_FTPLOGINMESG) $(PATHDEF_FTPCHROOT) $(PATHDEF_FTPDPID) \
            $(PATHDEF_DEVNULL)  $(PATHDEF_NOLOGIN) $(PATHDEF_BSHELL)
 
-LDADD = $(LIBLS) $(LIBCRYPT) $(LIBWRAP) $(FTPD_LIBPAM) $(iu_LIBRARIES)
+LDADD = $(LIBLS) $(LIBCRYPT) $(LIBWRAP) $(FTPD_LIBPAM) $(LIBDL) $(iu_LIBRARIES)
 
 EXTRA_DIST = ftpcmd.c
diff --git a/src/Makefile.am b/src/Makefile.am
index c812453..1f7bf13 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -74,7 +74,7 @@ EXTRA_PROGRAMS += inetd
 
 inetdaemon_PROGRAMS += $(rexecd_BUILD)
 rexecd_SOURCES = rexecd.c
-rexecd_LDADD = $(LDADD) $(LIBCRYPT) $(LIBPAM)
+rexecd_LDADD = $(LDADD) $(LIBCRYPT) $(LIBPAM) $(LIBDL)
 EXTRA_PROGRAMS += rexecd
 
 inetdaemon_PROGRAMS += $(rlogind_BUILD)
@@ -84,7 +84,7 @@ EXTRA_PROGRAMS += rlogind
 
 inetdaemon_PROGRAMS += $(rshd_BUILD)
 rshd_SOURCES = rshd.c
-rshd_LDADD = $(LDADD) $(LIBAUTH) $(LIBPAM)
+rshd_LDADD = $(LDADD) $(LIBAUTH) $(LIBPAM) $(LIBDL)
 EXTRA_PROGRAMS += rshd
 
 inetdaemon_PROGRAMS += $(syslogd_BUILD)

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


commit 78079c52085a164b3e8feeb71b41c85988ba008d
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Thu Sep 13 00:48:10 2012 +0200

    Address resolution alternative.

diff --git a/ChangeLog b/ChangeLog
index a018436..ce584e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2012-09-13  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	* ifconfig/changeif.c (herror prototype)
+	[!HAVE_DECL_GETADDRINFO]: Conditional use of prototype.
+	(set_address) [HAVE_DECL_GETADDRINFO]: New variables RC,
+	ADDR, HINTS, AI, and RES.  New, alternate code for address
+	resolution using getaddrinfo() and getnameinfo().
+
+	* libinetutils/localhost.c (localhost) [HAVE_DECL_GETADDRINFO]:
+	New variables RC, HINTS, RES, and FQDN.  New, alternate code
+	for address resolution.
+
+	* tests/Makefile.am (TESTS): Add `localhost' as test case.
+
 2012-09-11  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	* ftpd/ftpcmd.y (cmd): Add parantheses to separate
diff --git a/ifconfig/changeif.c b/ifconfig/changeif.c
index 2ce3347..c474883 100644
--- a/ifconfig/changeif.c
+++ b/ifconfig/changeif.c
@@ -52,7 +52,9 @@
       return -1;							\
     }
 
+#ifndef HAVE_DECL_GETADDRINFO
 extern void herror (const char *pfx);
+#endif
 
 /* Set address of interface in IFR. Destroys union in IFR, but leaves
    ifr_name intact.  ADDRESS may be an IP number or a hostname that
@@ -65,6 +67,41 @@ set_address (int sfd, struct ifreq *ifr, char *address)
 	   "don't know how to set an interface address on this system");
   return -1;
 #else
+# ifdef HAVE_DECL_GETADDRINFO
+  int rc;
+  char addr[INET_ADDRSTRLEN];
+  struct addrinfo hints, *ai, *res;
+
+  memset (&hints, 0, sizeof (hints));
+  hints.ai_family = AF_INET;
+
+  rc = getaddrinfo (address, NULL, &hints, &res);
+  if (rc)
+    {
+      error (0, 0, "cannot resolve `%s': %s", address, gai_strerror (rc));
+      return -1;
+    }
+  for (ai = res; ai; ai = ai->ai_next)
+    if (ai->ai_family == AF_INET)
+      break;
+
+  if (ai == NULL)
+    {
+      error (0, 0, "`%s' refers to an unknown address type", address);
+      freeaddrinfo (res);
+      return -1;
+    }
+
+  rc = getnameinfo (ai->ai_addr, ai->ai_addrlen,
+		    addr, sizeof (addr), NULL, 0,
+		    NI_NUMERICHOST);
+  freeaddrinfo (res);
+  if (rc)
+    {
+      error (0, 0, "cannot resolve `%s': %s", address, gai_strerror (rc));
+      return -1;
+    }
+# else /* !HAVE_DECL_GETADDRINFO */
   char *addr;
   struct hostent *host = gethostbyname (address);
 
@@ -80,9 +117,11 @@ set_address (int sfd, struct ifreq *ifr, char *address)
     }
 
   addr = inet_ntoa (*((struct in_addr *) host->h_addr));
+# endif /* !HAVE_DECL_GETADDRINFO */
 
   {
-    SIOCSIF (ADDR, addr) if (verbose)
+    SIOCSIF (ADDR, addr)
+    if (verbose)
       printf ("Set interface address of `%s' to %s.\n",
 	      ifr->ifr_name, inet_ntoa (sin->sin_addr));
   }
diff --git a/libinetutils/localhost.c b/libinetutils/localhost.c
index da168bb..1228e08 100644
--- a/libinetutils/localhost.c
+++ b/libinetutils/localhost.c
@@ -33,11 +33,12 @@
 #include <netdb.h>
 
 /* Return the name of the localhost.  This is just a wrapper for gethostname,
-   which takes care of allocating a big enough buffer, and caches the result
+   taking care of allocating a big enough buffer, and caching the result
    after the first call (so the result should be copied before modification).
-   If something goes wrong, 0 is returned, and errno set.  */
-/* We know longer use static buffers, is to dangerous and
-   cause subtile bugs.  */
+   If something goes wrong, 0 is returned, and errno is set.
+ */
+/* We no longer use static buffers, as it is too dangerous and
+   it causes subtile bugs.  */
 char *
 localhost (void)
 {
@@ -75,8 +76,31 @@ localhost (void)
       buf = 0;
     }
   else
-    /* Determine FQDN */
+    /* Determine FQDN.  */
     {
+#ifdef HAVE_DECL_GETADDRINFO
+      int rc;
+      struct addrinfo hints, *res;
+      char fqdn[NI_MAXHOST];
+
+      memset (&hints, 0, sizeof (hints));
+      hints.ai_family = AF_INET;
+
+      rc = getaddrinfo (buf, NULL, &hints, &res);
+      if (!rc)
+	{
+	  /* Back resolving as official host name.  */
+	  rc = getnameinfo (res->ai_addr, res->ai_addrlen,
+			    fqdn, sizeof (fqdn), NULL, 0,
+			    NI_NAMEREQD);
+	  if (!rc)
+	    {
+	      free (buf);
+	      buf = strdup (fqdn);
+	    }
+	  freeaddrinfo (res);
+	}
+#else /* !HAVE_DECL_GETADDRINFO */
       struct hostent *hp = gethostbyname (buf);
 
       if (hp)
@@ -90,6 +114,7 @@ localhost (void)
 	      buf = strdup (hp->h_name);
 	    }
 	}
+#endif /* !HAVE_DECL_GETADDRINFO */
     }
   return buf;
 }
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0a9ba70..f26247d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -68,7 +68,7 @@ if ENABLE_dnsdomainname
 dist_check_SCRIPTS += dnsdomainname.sh
 endif
 
-TESTS = $(dist_check_SCRIPTS)
+TESTS = localhost $(dist_check_SCRIPTS)
 
 TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT)
 

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


commit a69f322c049b6645330472393021733018de9fd0
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Tue Sep 11 19:25:38 2012 +0200

    ftpd, libls: Compiler warnings.

diff --git a/ChangeLog b/ChangeLog
index 5496d5e..a018436 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2012-09-11  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	* ftpd/ftpcmd.y (cmd): Add parantheses to separate
+	subordinate && from ||.
+	* ftpd/ftpd.c (off_to_str): Cast OFF as long.
+	(options): Fill in missing fields.
+	(main) [!HAVE_INITSETPROCTITLE]: Trivially use envp.
+	* ftpd/pam.c: Include <unused-parameter.h>.
+	(pam_pass): Cast passwd as `char *'.
+	(pam_end_login): Add _GL_UNUSED_PARAMETER.
+	* ftpd/popen.c (ls_main prototype) [WITH_LIBLS]:
+	Enclose within conditional WITH_LIBLS.
+	* ftpd/server_mode.c (server_mode) [HAVE_FORK]:
+	Trivially use argv.
+	* libls/fts.c: Include <unused-parameter.h>.
+	(fts_set): Add _GL_UNUSED_PARAMETER.
+	* libls/ls.c (display): Cast MAXSIZE as off_t.
+
 2012-09-10  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	* ping/ping.c (ping_finish): Replace format string "%ld"
diff --git a/ftpd/ftpcmd.y b/ftpd/ftpcmd.y
index 1bfe92b..278cb90 100644
--- a/ftpd/ftpcmd.y
+++ b/ftpd/ftpcmd.y
@@ -197,19 +197,19 @@ cmd
 		{
 			if ($2) {
 				if ($4
-				    && (his_addr.ss_family == AF_INET
+				    && ((his_addr.ss_family == AF_INET
 					&& memcmp (&((struct sockaddr_in *) &his_addr)->sin_addr,
 						   &((struct sockaddr_in *) &data_dest)->sin_addr,
 						   sizeof (struct in_addr)) == 0
 					&& ntohs (((struct sockaddr_in *) &data_dest)->sin_port)
-					   > IPPORT_RESERVED
+					   > IPPORT_RESERVED)
 					||
-					his_addr.ss_family == AF_INET6
+					(his_addr.ss_family == AF_INET6
 					&& memcmp (&((struct sockaddr_in6 *) &his_addr)->sin6_addr,
 						   &((struct sockaddr_in6 *) &data_dest)->sin6_addr,
 						   sizeof (struct in6_addr)) == 0
 					&& ntohs (((struct sockaddr_in6 *) &data_dest)->sin6_port)
-					   > IPPORT_RESERVED
+					   > IPPORT_RESERVED)
 				       )
 				   )
 				{
@@ -730,19 +730,19 @@ cmd
 			if ($2)
 			  {
 			    if ($4 &&
-				( his_addr.ss_family == AF_INET
+				((his_addr.ss_family == AF_INET
 				  && memcmp (&((struct sockaddr_in *) &his_addr)->sin_addr,
 					     &((struct sockaddr_in *) &data_dest)->sin_addr,
 					     sizeof (struct in_addr)) == 0
 				  && ntohs (((struct sockaddr_in *) &data_dest)->sin_port)
-					> IPPORT_RESERVED
-				  ||
-				  his_addr.ss_family == AF_INET6
+					> IPPORT_RESERVED)
+				 ||
+				 (his_addr.ss_family == AF_INET6
 				  && memcmp (&((struct sockaddr_in6 *) &his_addr)->sin6_addr,
 					     &((struct sockaddr_in6 *) &data_dest)->sin6_addr,
 					     sizeof (struct in6_addr)) == 0
 				  && ntohs (((struct sockaddr_in6 *) &data_dest)->sin6_port)
-					> IPPORT_RESERVED
+					> IPPORT_RESERVED)
 				)
 			       )
 			      {
diff --git a/ftpd/ftpd.c b/ftpd/ftpd.c
index c73bb7c..d796fc0 100644
--- a/ftpd/ftpd.c
+++ b/ftpd/ftpd.c
@@ -191,7 +191,7 @@ off_to_str (off_t off)
   if (sizeof (off) > sizeof (long))
     sprintf (*next_buf, "%lld", (long long int) off);
   else if (sizeof (off) == sizeof (long))
-    sprintf (*next_buf, "%ld", off);
+    sprintf (*next_buf, "%ld", (long) off);
   else
     sprintf (*next_buf, "%d", (int) off);
 
@@ -316,7 +316,7 @@ static struct argp_option options[] = {
     "",
     GRID+3 },
 #endif
-  { NULL }
+  { NULL, 0, NULL, 0, NULL, 0 }
 };
 
 static error_t
@@ -441,7 +441,9 @@ main (int argc, char *argv[], char **envp)
 #ifdef HAVE_INITSETPROCTITLE
   /* Save start and extent of argv for setproctitle.  */
   initsetproctitle (argc, argv, envp);
-#endif /* HAVE_INITSETPROCTITLE */
+#else /* !HAVE_INITSETPROCTITLE */
+  (void) envp;		/* Silence warnings.  */
+#endif
 
   /* Parse the command line */
   iu_argp_init ("ftpd", default_program_authors);
diff --git a/ftpd/pam.c b/ftpd/pam.c
index 41973ce..6f4fe00 100644
--- a/ftpd/pam.c
+++ b/ftpd/pam.c
@@ -23,6 +23,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <syslog.h>
+#include <unused-parameter.h>
 #include "extern.h"
 
 #ifdef HAVE_SECURITY_PAM_APPL_H
@@ -255,7 +256,7 @@ pam_pass (const char *passwd, struct credentials *pcred)
   int error = PAM_AUTH_ERR;
   if (pamh)
     {
-      pcred->pass = passwd;
+      pcred->pass = (char *) passwd;
       error = pam_doit (pcred);
       pcred->pass = NULL;
     }
@@ -263,7 +264,7 @@ pam_pass (const char *passwd, struct credentials *pcred)
 }
 
 void
-pam_end_login (struct credentials * pcred)
+pam_end_login (struct credentials * pcred _GL_UNUSED_PARAMETER)
 {
   int error;
 
diff --git a/ftpd/popen.c b/ftpd/popen.c
index 83b9dc0..8aa8a11 100644
--- a/ftpd/popen.c
+++ b/ftpd/popen.c
@@ -86,7 +86,9 @@ struct file_pid
 /* A linked list associating ftpd_popen'd FILEs with pids.  */
 struct file_pid *file_pids = 0;
 
+#ifdef WITH_LIBLS
 extern int ls_main (int argc, char *argv[]);
+#endif
 
 FILE *
 ftpd_popen (char *program, const char *type)
diff --git a/ftpd/server_mode.c b/ftpd/server_mode.c
index 0a48773..7b7771e 100644
--- a/ftpd/server_mode.c
+++ b/ftpd/server_mode.c
@@ -234,6 +234,8 @@ server_mode (const char *pidfile, struct sockaddr *phis_addr,
 
 #ifndef HAVE_FORK
   _exit (execvp (argv[0], argv));
+#else
+  (void) argv;		/* Silence warnings.  */
 #endif
 
   return fd;
diff --git a/libls/fts.c b/libls/fts.c
index b9736f4..35d0de4 100644
--- a/libls/fts.c
+++ b/libls/fts.c
@@ -55,6 +55,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <unused-parameter.h>
 
 #include "fts.h"
 
@@ -512,7 +513,7 @@ next:tmp = p;
  * reasons.
  */
 int
-fts_set (FTS *sp, FTSENT *p, int instr)
+fts_set (FTS *sp _GL_UNUSED_PARAMETER, FTSENT *p, int instr)
 {
   if (instr && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
       instr != FTS_NOINSTR && instr != FTS_SKIP)
diff --git a/libls/ls.c b/libls/ls.c
index f331819..481f76f 100644
--- a/libls/ls.c
+++ b/libls/ls.c
@@ -494,7 +494,7 @@ display (FTSENT *p, FTSENT *list)
 	    maxinode = sp->st_ino;
 	  if (sp->st_nlink > maxnlink)
 	    maxnlink = sp->st_nlink;
-	  if (sp->st_size > maxsize)
+	  if (sp->st_size > (off_t) maxsize)
 	    maxsize = sp->st_size;
 
 	  btotal += sp->st_blocks;

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


commit 64d135fa07aff893864faadf5ca8014c8389f6b2
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Mon Sep 10 19:56:23 2012 +0200

    ping, ping6: Compiler warnings.

diff --git a/ChangeLog b/ChangeLog
index ebb85ce..5496d5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-09-10  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	* ping/ping.c (ping_finish): Replace format string "%ld"
+	by "%zu" for counter status.
+	* ping/ping6.c (ping_finish): Likewise.
+	* ping/ping_common.h (struct ping_data): Set type size_t
+	on fields ping_num_xmit, ping_num_recv and ping_num_rept.
+	* ping/ping_router.c: Include <unused-parameter.h>.
+	(ping_router): Add _GL_UNUSED_PARAMETER.
+
 2012-09-07  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	talk, talkd: Portability issue.
diff --git a/ping/ping.c b/ping/ping.c
index 0c3de3d..9f51671 100644
--- a/ping/ping.c
+++ b/ping/ping.c
@@ -517,14 +517,14 @@ ping_finish (void)
 {
   fflush (stdout);
   printf ("--- %s ping statistics ---\n", ping->ping_hostname);
-  printf ("%ld packets transmitted, ", ping->ping_num_xmit);
-  printf ("%ld packets received, ", ping->ping_num_recv);
+  printf ("%zu packets transmitted, ", ping->ping_num_xmit);
+  printf ("%zu packets received, ", ping->ping_num_recv);
   if (ping->ping_num_rept)
-    printf ("+%ld duplicates, ", ping->ping_num_rept);
+    printf ("+%zu duplicates, ", ping->ping_num_rept);
   if (ping->ping_num_xmit)
     {
       if (ping->ping_num_recv > ping->ping_num_xmit)
-	printf ("-- somebody's printing up packets!");
+	printf ("-- somebody is printing forged packets!");
       else
 	printf ("%d%% packet loss",
 		(int) (((ping->ping_num_xmit - ping->ping_num_recv) * 100) /
diff --git a/ping/ping6.c b/ping/ping6.c
index e8f895e..5364a99 100644
--- a/ping/ping6.c
+++ b/ping/ping6.c
@@ -404,10 +404,10 @@ ping_finish (void)
 {
   fflush (stdout);
   printf ("--- %s ping statistics ---\n", ping->ping_hostname);
-  printf ("%ld packets transmitted, ", ping->ping_num_xmit);
-  printf ("%ld packets received, ", ping->ping_num_recv);
+  printf ("%zu packets transmitted, ", ping->ping_num_xmit);
+  printf ("%zu packets received, ", ping->ping_num_recv);
   if (ping->ping_num_rept)
-    printf ("+%ld duplicates, ", ping->ping_num_rept);
+    printf ("+%zu duplicates, ", ping->ping_num_rept);
   if (ping->ping_num_xmit)
     {
       if (ping->ping_num_recv > ping->ping_num_xmit)
diff --git a/ping/ping_common.h b/ping/ping_common.h
index 5cf3e8c..0a5c336 100644
--- a/ping/ping_common.h
+++ b/ping/ping_common.h
@@ -117,9 +117,9 @@ struct ping_data
 
   unsigned char *ping_buffer;         /* I/O buffer */
   union ping_address ping_from;
-  long ping_num_xmit;          /* Number of packets transmitted */
-  long ping_num_recv;          /* Number of packets received */
-  long ping_num_rept;          /* Number of duplicates received */
+  size_t ping_num_xmit;        /* Number of packets transmitted */
+  size_t ping_num_recv;        /* Number of packets received */
+  size_t ping_num_rept;        /* Number of duplicates received */
 };
 
 #define _C_BIT(p,bit)   (p)->ping_cktab[(bit)>>3]	/* byte in ck array */
diff --git a/ping/ping_router.c b/ping/ping_router.c
index e478ffa..0d8f3d8 100644
--- a/ping/ping_router.c
+++ b/ping/ping_router.c
@@ -39,12 +39,13 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <errno.h>
+#include <unused-parameter.h>
 
 #include <ping.h>
 #include <ping_impl.h>
 
 int
-ping_router (char *hostname)
+ping_router (char *hostname _GL_UNUSED_PARAMETER)
 {
   return 0;
 }

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

Summary of changes:
 ChangeLog                |   67 ++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac             |   35 ++++++++++++++++-------
 ftpd/Makefile.am         |    2 +-
 ftpd/ftpcmd.y            |   18 ++++++------
 ftpd/ftpd.c              |    8 +++--
 ftpd/pam.c               |    5 ++-
 ftpd/popen.c             |    2 +
 ftpd/server_mode.c       |    2 +
 ifconfig/changeif.c      |   41 +++++++++++++++++++++++++++-
 libinetutils/localhost.c |   35 ++++++++++++++++++++---
 libls/fts.c              |    3 +-
 libls/ls.c               |    2 +-
 ping/ping.c              |    8 +++---
 ping/ping6.c             |    6 ++--
 ping/ping_common.h       |    6 ++--
 ping/ping_router.c       |    3 +-
 src/Makefile.am          |    4 +-
 tests/Makefile.am        |    2 +-
 18 files changed, 201 insertions(+), 48 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Thu Sep 13 18:37:46 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TCI2c-0006fa-Pj
	for mharc-commit-inetutils@gnu.org; Thu, 13 Sep 2012 18:37:46 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38450)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCI2a-0006fU-1U
	for commit-inetutils@gnu.org; Thu, 13 Sep 2012 18:37:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCI2Y-0007Hm-90
	for commit-inetutils@gnu.org; Thu, 13 Sep 2012 18:37:43 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:36083)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCI2Y-0007Hh-4z
	for commit-inetutils@gnu.org; Thu, 13 Sep 2012 18:37:42 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1TCI2X-0007zS-Ce
	for commit-inetutils@gnu.org; Thu, 13 Sep 2012 22:37:41 +0000
Date: Thu, 13 Sep 2012 22:37:41 +0000
Message-Id: <E1TCI2X-0007zS-Ce@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-169-g7faf49c
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 9aa72c7a975724fa70f4025b47ce3ee4723b75bd
X-Git-Newrev: 7faf49c035c277daa3f8e01d1581223ab2a4a8e4
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Sep 2012 22:37:45 -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  7faf49c035c277daa3f8e01d1581223ab2a4a8e4 (commit)
      from  9aa72c7a975724fa70f4025b47ce3ee4723b75bd (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=7faf49c035c277daa3f8e01d1581223ab2a4a8e4


commit 7faf49c035c277daa3f8e01d1581223ab2a4a8e4
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Sep 14 00:21:17 2012 +0200

    telnetd: Compiler warnings.

diff --git a/ChangeLog b/ChangeLog
index adbf56a..3c4fecf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2012-09-14  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	telnetd: Compiler warnings.
+
+	* telnetd/pty.c (startslave) [!AUTHENTICATION]:
+	Trivially use autoname.
+	(start_login): Trivially use host, autologin, name.
+	* telnetd/telnetd.c: Include <unused-parameter.h>
+	(argp_options): Add missing fields.  Collect options
+	for authentication into a separate group.  New macro GRID.
+	(parse_opt): Add _GL_UNUSED_PARAMETER.
+	(argp): Add missing fields.
+	* telnetd/term.c (tty_setlinemode) [!TIOCEXT && !EXTPROC]:
+	Trivially use `on'.
+	* telnetd/utility.c (pty_output_datalen): Cast integer
+	difference as size_t.
+	(pty_get_char): Likewise.
+	(stilloob): Add missing field in TIMEOUT.
+	(getterminaltype) [!AUTHENTICATION]: Trivially use user_name.
+	(printsub) [AUTHENTICATION && ENCRYPTION]: Declare BUF as
+	array of unsigned char.
+	<case TELQUAL_NAME>: Cast array reference as `char *'
+	inside call to debug_output_datalen.
+	(_var_long_name): Trivially use start and length.
+
 2012-09-13  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	Use libdl only when needed, i.e., with libpam.
diff --git a/telnetd/pty.c b/telnetd/pty.c
index d333a88..83fd373 100644
--- a/telnetd/pty.c
+++ b/telnetd/pty.c
@@ -51,7 +51,10 @@ startslave (char *host, int autologin, char *autoname)
       fatal (net, "Authorization failed");
       exit (EXIT_FAILURE);
     }
+#else /* !AUTHENTICATION */
+  (void) autoname;	/* Silence warnings.  */
 #endif
+
   pid = forkpty (&master, line, NULL, NULL);
   if (pid < 0)
     {
@@ -112,6 +115,10 @@ start_login (char *host, int autologin, char *name)
   int argc;
   char **argv;
 
+  (void) host;		/* Silence warnings.  Diagnostic use?  */
+  (void) autologin;
+  (void) name;
+
   scrub_env ();
 
   /* Set the environment variable "LINEMODE" to indicate our linemode */
diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c
index 064d6cd..c376197 100644
--- a/telnetd/telnetd.c
+++ b/telnetd/telnetd.c
@@ -26,6 +26,7 @@
 #include <argp.h>
 #include <progname.h>
 #include <error.h>
+#include <unused-parameter.h>
 #include <libinetutils.h>
 
 #if defined AUTHENTICATION || defined ENCRYPTION
@@ -99,37 +100,39 @@ struct telnetd_clocks clocks;
 
 
 static struct argp_option argp_options[] = {
-#ifdef  AUTHENTICATION
-  { "authmode", 'a', "MODE", 0,
-    "specify what mode to use for authentication" },
-#endif
+#define GRID 10
   { "debug", 'D', "LEVEL", OPTION_ARG_OPTIONAL,
-    "set debugging level" },
+    "set debugging level", GRID },
   { "exec-login", 'E', "STRING", 0,
-    "set program to be executed instead of " PATH_LOGIN },
+    "set program to be executed instead of " PATH_LOGIN, GRID },
   { "no-hostinfo", 'h', NULL, 0,
-    "do not print host information before login has been completed" },
+    "do not print host information before login has been completed", GRID },
   { "linemode", 'l', "MODE", OPTION_ARG_OPTIONAL,
-    "set line mode" },
+    "set line mode", GRID },
   { "no-keepalive", 'n', NULL, 0,
-    "disable TCP keep-alives" },
-#if defined AUTHENTICATION || defined ENCRYPTION
-  { "server-principal", 'S', "NAME", 0,
-    "set Kerberos principal name for this server instance, "
-    "with or without explicit realm" },
-#endif
+    "disable TCP keep-alives", GRID },
   { "reverse-lookup", 'U', NULL, 0,
     "refuse connections from addresses that "
-    "cannot be mapped back into a symbolic name" },
-#ifdef  AUTHENTICATION
+    "cannot be mapped back into a symbolic name", GRID },
+#undef GRID
+
+#ifdef AUTHENTICATION
+# define GRID 20
+  { NULL, 0, NULL, 0, "Authentication control:", GRID },
+  { "authmode", 'a', "MODE", 0,
+    "specify what mode to use for authentication", GRID },
+  { "server-principal", 'S', "NAME", 0,
+    "set Kerberos principal name for this server instance, "
+    "with or without explicit realm", GRID },
   { "disable-auth-type", 'X', "TYPE", 0,
-    "disable the use of given authentication option" },
-#endif
-  { NULL }
+    "disable the use of given authentication option", GRID },
+# undef GRID
+#endif /* AUTHENTICATION */
+  { NULL, 0, NULL, 0, NULL, 0 }
 };
 
 static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
+parse_opt (int key, char *arg, struct argp_state *state _GL_UNUSED_PARAMETER)
 {
   switch (key)
     {
@@ -187,7 +190,8 @@ static struct argp argp =
     argp_options,
     parse_opt,
     NULL,
-    "DARPA telnet protocol server"
+    "DARPA telnet protocol server",
+    NULL, NULL, NULL
   };
 
 
diff --git a/telnetd/term.c b/telnetd/term.c
index 6ee845e..2b74610 100644
--- a/telnetd/term.c
+++ b/telnetd/term.c
@@ -305,6 +305,8 @@ tty_setlinemode (int on)
     termbuf.c_lflag |= EXTPROC;
   else
     termbuf.c_lflag &= ~EXTPROC;
+#  else /* !EXTPROC */
+  (void) on;		/* Silence warnings.  */
 #  endif
 # endif	/* TIOCEXT */
 }
diff --git a/telnetd/utility.c b/telnetd/utility.c
index b02601a..0ca1f99 100644
--- a/telnetd/utility.c
+++ b/telnetd/utility.c
@@ -302,7 +302,7 @@ pty_output_byte (int c)
 void
 pty_output_datalen (const void *data, size_t len)
 {
-  if ((&ptyobuf[BUFSIZ] - pfrontp) > len)
+  if ((size_t) (&ptyobuf[BUFSIZ] - pfrontp) > len)
     ptyflush ();
   memcpy (pfrontp, data, len);
   pfrontp += len;
@@ -362,7 +362,7 @@ pty_get_char (int peek)
 int
 pty_input_putback (const char *str, size_t len)
 {
-  if (len > &ptyibuf[BUFSIZ] - ptyip)
+  if (len > (size_t) (&ptyibuf[BUFSIZ] - ptyip))
     len = &ptyibuf[BUFSIZ] - ptyip;
   strncpy (ptyip, str, len);
   pcc += len;
@@ -445,7 +445,7 @@ io_drain (void)
 int
 stilloob (int s)
 {
-  static struct timeval timeout = { 0 };
+  static struct timeval timeout = { 0, 0 };
   fd_set excepts;
   int value;
 
@@ -720,7 +720,9 @@ getterminaltype (char *user_name)
       if (his_state_is_will (TELOPT_AUTHENTICATION))
 	retval = auth_wait (user_name);
     }
-#endif /* AUTHENTICATION */
+#else /* !AUTHENTICATION */
+  (void) user_name;	/* Silence warning.  */
+#endif
 
 #ifdef	ENCRYPTION
   send_will (TELOPT_ENCRYPT, 1);
@@ -929,7 +931,7 @@ printsub (int direction, unsigned char *pointer, int length)
   register int i;
 
 #if defined AUTHENTICATION && defined ENCRYPTION
-  char buf[512];
+  unsigned char buf[512];
 #endif
 
   if (direction)
@@ -1447,7 +1449,7 @@ printsub (int direction, unsigned char *pointer, int length)
 	case TELQUAL_NAME:
 	  i = 2;
 	  debug_output_data (" NAME \"");
-	  debug_output_datalen (&pointer[i], length);
+	  debug_output_datalen ((char *) &pointer[i], length);
 	  i += length;
 	  debug_output_data ("\"");
 	  break;
@@ -1686,6 +1688,8 @@ _var_short_name (struct line_expander *exp)
 char *
 _var_long_name (struct line_expander *exp, char *start, int length)
 {
+  (void) start;		/* Silence warnings until implemented.  */
+  (void) length;
   exp->state = EXP_STATE_ERROR;
   return NULL;
 }

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

Summary of changes:
 ChangeLog         |   25 +++++++++++++++++++++++++
 telnetd/pty.c     |    7 +++++++
 telnetd/telnetd.c |   46 +++++++++++++++++++++++++---------------------
 telnetd/term.c    |    2 ++
 telnetd/utility.c |   16 ++++++++++------
 5 files changed, 69 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Fri Sep 14 09:36:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TCW4g-0003J2-CO
	for mharc-commit-inetutils@gnu.org; Fri, 14 Sep 2012 09:36:50 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44179)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCW4Y-0002za-VA
	for commit-inetutils@gnu.org; Fri, 14 Sep 2012 09:36:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCW4U-0000fi-2p
	for commit-inetutils@gnu.org; Fri, 14 Sep 2012 09:36:42 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:55851)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCW4T-0000fD-Vd
	for commit-inetutils@gnu.org; Fri, 14 Sep 2012 09:36:38 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1TCW4T-0007C2-DC
	for commit-inetutils@gnu.org; Fri, 14 Sep 2012 13:36:37 +0000
Date: Fri, 14 Sep 2012 13:36:37 +0000
Message-Id: <E1TCW4T-0007C2-DC@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-170-ge28334c
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 7faf49c035c277daa3f8e01d1581223ab2a4a8e4
X-Git-Newrev: e28334cfec659d6d7ac064ecffbc7948bc91fd54
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Sep 2012 13:36:49 -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  e28334cfec659d6d7ac064ecffbc7948bc91fd54 (commit)
      from  7faf49c035c277daa3f8e01d1581223ab2a4a8e4 (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=e28334cfec659d6d7ac064ecffbc7948bc91fd54


commit e28334cfec659d6d7ac064ecffbc7948bc91fd54
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Sep 14 14:37:08 2012 +0200

    telnetd: More compiler warnings.

diff --git a/ChangeLog b/ChangeLog
index 3c4fecf..21f93ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2012-09-14  Mats Erik Andersson  <gnu@gisladisker.se>
 
+	telnetd: More compiler warnings.
+
+	* am/libcurses.m4 (IU_LIB_TERMCAP): Use AC_LINK_IFELSE
+	instead of AC_CHECK_DECLS to find declaration of tgetent.
+	* telnetd/term.c (copy_termbuf) [TIOCPKT_IOCTL]: Declare
+	LEN as size_t.  Increment LEN in loop.
+	* telnetd/utility.c (printdata): Cast *PTR as int.
+
+2012-09-14  Mats Erik Andersson  <gnu@gisladisker.se>
+
 	telnetd: Compiler warnings.
 
 	* telnetd/pty.c (startslave) [!AUTHENTICATION]:
diff --git a/am/libcurses.m4 b/am/libcurses.m4
index 45cacc4..37aa650 100644
--- a/am/libcurses.m4
+++ b/am/libcurses.m4
@@ -91,20 +91,42 @@ AC_DEFUN([IU_LIB_TERMCAP], [
   if test "$LIBNCURSES"; then
     LIBTERMCAP="$LIBNCURSES"
   else
+    dnl Must check declaration in different settings,
+    dnl so caching in AC_CHECK_DECL is too distructive.
+    dnl
+    _IU_SAVE_LIBS=$LIBS
     AC_CHECK_LIB(termcap, tgetent, LIBTERMCAP=-ltermcap)
-    AC_CHECK_DECLS([tgetent], , , [[#include <termcap.h>]])
+    AC_MSG_CHECKING([where tgetent is declared])
+    location_tgetent=none
+    LIBS="$LIBS $LIBTERMCAP"
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM([[#include <termcap.h>]],
+	[[(void) tgetent((char *) 0, (char *) 0);]])],
+      [AC_DEFINE([HAVE_TERMCAP_TGETENT], 1,
+	[Define to 1 if tgetent() exists in <termcap.h>.])
+       ac_cv_have_decl_tgetent=yes
+       location_tgetent=termcap.h],
+      [AC_LINK_IFELSE(
+	[AC_LANG_PROGRAM([[#include <curses.h>
+#include <term.h>]],
+	  [[(void) tgetent((char *) 0, (char *) 0);]])],
+	[AC_DEFINE([HAVE_CURSES_TGETENT], 1,
+	  [Define to 1 if tgetent() exists in <term.h>.])
+	 ac_cv_have_decl_tgetent=yes
+	 location_tgetent=term.h])
+      ])
+    LIBS=$_IU_SAVE_LIBS
+
     if test "$ac_cv_lib_termcap_tgetent" = yes \
 	&& test "$ac_cv_have_decl_tgetent" = yes; then
-      AC_DEFINE([HAVE_TERMCAP_TGETENT], 1,
-		[Define to 1 if tgetent() exists in <termcap.h>.])
+      AC_MSG_RESULT($location_tgetent)
     else
       AC_CHECK_LIB(curses, tgetent, LIBTERMCAP=-lcurses)
       AC_CHECK_DECLS([tgetent], , , [[#include <curses.h>
 #include <term.h>]])
       if test "$ac_cv_lib_curses_tgetent" = yes \
 	  && test "$ac_cv_have_decl_tgetent" = yes; then
-	AC_DEFINE([HAVE_CURSES_TGETENT], 1,
-		  [Define to 1 if tgetent() exists in <curses.h>.])
+	AC_DEFINE([HAVE_CURSES_TGETENT], 1)
       fi
     fi
     if test "$ac_cv_lib_curses_tgetent" = no \
diff --git a/telnetd/term.c b/telnetd/term.c
index 2b74610..77d1177 100644
--- a/telnetd/term.c
+++ b/telnetd/term.c
@@ -506,11 +506,12 @@ init_termbuf (void)
 }
 
 #if defined TIOCPKT_IOCTL
-/*FIXME: Hardly needed*/
+/*FIXME: Hardly needed?
+ * Built by OpenSolaris and BSD, though.  */
 void
 copy_termbuf ()
 {
-  int len = 0;
+  size_t len = 0;
   char *cp = (char *) &termbuf;
 
   while (pty_input_level () > 0)
@@ -518,6 +519,7 @@ copy_termbuf ()
       if (len >= sizeof (termbuf))
 	break;
       *cp++ = pty_get_char (0);
+      len++;
     }
   termbuf2 = termbuf;
 }
diff --git a/telnetd/utility.c b/telnetd/utility.c
index 0ca1f99..5ca0430 100644
--- a/telnetd/utility.c
+++ b/telnetd/utility.c
@@ -928,7 +928,7 @@ printoption (register char *fmt, register int option)
 void
 printsub (int direction, unsigned char *pointer, int length)
 {
-  register int i;
+  register int i = 0;
 
 #if defined AUTHENTICATION && defined ENCRYPTION
   unsigned char buf[512];
@@ -1565,7 +1565,7 @@ printdata (register char *tag, register char *ptr, register int cnt)
       for (i = 0; i < 20 && cnt; i++)
 	{
 	  debug_output_data ("%02x", *ptr);
-	  xbuf[i] = isprint (*ptr) ? *ptr : '.';
+	  xbuf[i] = isprint ((int) *ptr) ? *ptr : '.';
 
 	  if (i % 2)
 	    debug_output_data (" ");

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

Summary of changes:
 ChangeLog         |   10 ++++++++++
 am/libcurses.m4   |   32 +++++++++++++++++++++++++++-----
 telnetd/term.c    |    6 ++++--
 telnetd/utility.c |    4 ++--
 4 files changed, 43 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Fri Sep 14 15:02:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TCb9o-00019j-QP
	for mharc-commit-inetutils@gnu.org; Fri, 14 Sep 2012 15:02:28 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41401)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCb9i-00018b-EC
	for commit-inetutils@gnu.org; Fri, 14 Sep 2012 15:02:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCb9Y-0000dm-9w
	for commit-inetutils@gnu.org; Fri, 14 Sep 2012 15:02:22 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:52232)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCb9Y-0000dh-6j
	for commit-inetutils@gnu.org; Fri, 14 Sep 2012 15:02:12 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1TCb9X-0004kA-Cn
	for commit-inetutils@gnu.org; Fri, 14 Sep 2012 19:02:11 +0000
Date: Fri, 14 Sep 2012 19:02:11 +0000
Message-Id: <E1TCb9X-0004kA-Cn@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-171-g2425fa8
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: e28334cfec659d6d7ac064ecffbc7948bc91fd54
X-Git-Newrev: 2425fa8d7d7b0e58e8913fe02fa985d344c5ee70
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Sep 2012 19:02:27 -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  2425fa8d7d7b0e58e8913fe02fa985d344c5ee70 (commit)
      from  e28334cfec659d6d7ac064ecffbc7948bc91fd54 (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=2425fa8d7d7b0e58e8913fe02fa985d344c5ee70


commit 2425fa8d7d7b0e58e8913fe02fa985d344c5ee70
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Sep 14 20:58:21 2012 +0200

    libinetutils: Compiler warnings.

diff --git a/ChangeLog b/ChangeLog
index 21f93ea..78978e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,34 @@
 2012-09-14  Mats Erik Andersson  <gnu@gisladisker.se>
 
+	libinetutils: Compiler warnings.
+
+	* libinetutils/argcv.c (argcv_get): Cast element as int.
+	* libinetutils/cleansess.c [HAVE_UTMP_H && HAVE_LIBUTIL_H]:
+	Include <libutil.h>.
+	* libinetutils/daemon.c: Include <unused-parameter.h>.
+	(waitdaemon_timeout): Add _GL_UNUSED_PARAMETER.
+	* libinetutils/kcmd.c (kcmd): Cast strlen() as ssize_t.
+	Add parantheses in logical expression.
+	[SHISHI]: Declare SIN_LEN as socklen_t.  Trivial use of
+	parameter service.
+	* libinetutils/logwtmp.c (OUR_WTMP): New macro.
+	(_logwtmp): Call open() with OUR_WTMP.
+	* libinetutils/shishi.c (shishi_auth): Cast sizeof() as
+	ssize_t.  Cast sname as `char *' in assignment of P.
+	(senderror): Remove function, keeping as comment.
+	(gat_auth): Remove variables I and AUTH_CORRECT.  Cast
+	size expression as int.
+	* libinetutils/utmp_init.c [HAVE_UTMP_H && HAVE_LIBUTIL_H]:
+	Include <libutil.h>.
+	(utmp_init) [!HAVE_UTMPX_H && !HAVE_PUTUTLINE && HAVE_LOGIN]:
+	Trivially use parameter id.
+	* libinetutils/utmp_logout.c [HAVE_UTMP_H && HAVE_LIBUTIL_H]:
+	Include <libutil.h>.
+	(utmp_logout) [!HAVE_UTMPX_H && HAVE_PUTUTLINE]: Protect
+	declaration of UT.
+
+2012-09-14  Mats Erik Andersson  <gnu@gisladisker.se>
+
 	telnetd: More compiler warnings.
 
 	* am/libcurses.m4 (IU_LIB_TERMCAP): Use AC_LINK_IFELSE
diff --git a/libinetutils/argcv.c b/libinetutils/argcv.c
index f8396de..ceab19b 100644
--- a/libinetutils/argcv.c
+++ b/libinetutils/argcv.c
@@ -78,7 +78,7 @@ argcv_get (const char *command, const char *delim, int *argc, char ***argv)
   *argc = 0;
   *argv = NULL;
 
-  while (len > 0 && isspace (command[len - 1]))
+  while (len > 0 && isspace ((int) command[len - 1]))
     len--;
   if (len < 1)
     return 1;
diff --git a/libinetutils/cleansess.c b/libinetutils/cleansess.c
index 5fa811d..5be83ce 100644
--- a/libinetutils/cleansess.c
+++ b/libinetutils/cleansess.c
@@ -27,9 +27,12 @@
 #include <sys/time.h>
 #include <time.h>
 #ifdef HAVE_UTMP_H
-# if HAVE_UTIL_H
+# ifdef HAVE_UTIL_H
 #  include <util.h>
 # endif
+# ifdef HAVE_LIBUTIL_H
+#  include <libutil.h>
+# endif
 # include <utmp.h>
 #else
 # ifdef  HAVE_UTMPX_H
diff --git a/libinetutils/daemon.c b/libinetutils/daemon.c
index 849c86f..5606b10 100644
--- a/libinetutils/daemon.c
+++ b/libinetutils/daemon.c
@@ -55,6 +55,7 @@
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#include <unused-parameter.h>
 
 /*
   According to Unix-FAQ maintained by Andrew Gierth:
@@ -103,7 +104,7 @@
 #define MAXFD 64
 
 void
-waitdaemon_timeout (int signo)
+waitdaemon_timeout (int signo _GL_UNUSED_PARAMETER)
 {
   int left;
 
@@ -147,8 +148,10 @@ waitdaemon (int nochdir, int noclose, int maxwait)
   if (setsid () == -1)
     return -1;
 
-  /* SIGHUP is ignore because when the session leader terminates
-     all process in the session (the second child) are sent the SIGHUP.  */
+  /* SIGHUP must be ignored, because when the session leader terminates,
+     then SIGHUP is sent to all process belonging to the same session,
+     i.e., also to the second child.
+   */
   signal (SIGHUP, SIG_IGN);
 
   switch (fork ())
diff --git a/libinetutils/kcmd.c b/libinetutils/kcmd.c
index 7edca38..26ee739 100644
--- a/libinetutils/kcmd.c
+++ b/libinetutils/kcmd.c
@@ -373,7 +373,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short rport, char *locuser,
 	}
       listen (s2, 1);
       sprintf (num, "%d", lport);
-      if (write (s, num, strlen (num) + 1) != strlen (num) + 1)
+      if (write (s, num, strlen (num) + 1) != (ssize_t) strlen (num) + 1)
 	{
 	  perror ("kcmd(write): setting up stderr");
 	  close (s2);
@@ -395,7 +395,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short rport, char *locuser,
 	     : ntohs (((struct sockaddr_in *) &from)->sin_port);
 
       if (port >= IPPORT_RESERVED
-          || from.ss_family != AF_INET && from.ss_family != AF_INET6)
+          || (from.ss_family != AF_INET && from.ss_family != AF_INET6))
 	{
 	  fprintf (stderr,
 		   "kcmd(socket): protocol failure in circuit setup.\n");
@@ -437,7 +437,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short rport, char *locuser,
 # elif defined(SHISHI)
   if (authopts & SHISHI_APOPTIONS_MUTUAL_REQUIRED)
     {
-      int sin_len;
+      socklen_t sin_len;
 
       *faddr = sin;
 
@@ -450,6 +450,8 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short rport, char *locuser,
 	}
     }
 
+  (void) service;	/* Silence warning.  XXX: Implicit use?  */
+
   if ((status =
        shishi_auth (h, 0, remuser, *ahost, s, cmd, rport, key,
 		    realm)) != SHISHI_OK)
diff --git a/libinetutils/logwtmp.c b/libinetutils/logwtmp.c
index 4f676f9..e8a0965 100644
--- a/libinetutils/logwtmp.c
+++ b/libinetutils/logwtmp.c
@@ -39,9 +39,10 @@
 #  define __USE_GNU 1
 # endif
 # include <utmpx.h>
+# define OUR_WTMP PATH_WTMPX
 #elif defined HAVE_UTMP_H
 # include <utmp.h>
-# define PATH_WTMPX PATH_WTMP	/* Simplifies file referencing.  */
+# define OUR_WTMP PATH_WTMP
 #endif
 #include <string.h>
 
@@ -61,9 +62,9 @@ _logwtmp (struct utmp *ut)
   static int fd = -1;
 
   if (fd < 0)
-    fd = open (PATH_WTMPX, O_WRONLY | O_APPEND, 0);
+    fd = open (OUR_WTMP, O_WRONLY | O_APPEND, 0);
 #else
-  int fd = open (PATH_WTMPX, O_WRONLY | O_APPEND, 0);
+  int fd = open (OUR_WTMP, O_WRONLY | O_APPEND, 0);
 #endif
 
   if (fd >= 0)
diff --git a/libinetutils/shishi.c b/libinetutils/shishi.c
index 98f3662..1df3195 100644
--- a/libinetutils/shishi.c
+++ b/libinetutils/shishi.c
@@ -98,7 +98,7 @@ shishi_auth (Shishi ** handle, int verbose, char **cname,
       errormsg[0] = '\0';
       n = read (sock, errormsg, sizeof (errormsg) - 1);
 
-      if (n >= 0 && n < sizeof (errormsg))
+      if (n >= 0 && n < (ssize_t) sizeof (errormsg))
 	errormsg[n] = '\0';
       else
 	errormsg[sizeof (errormsg) -1] = '\0';
@@ -136,7 +136,7 @@ shishi_auth (Shishi ** handle, int verbose, char **cname,
   if (!realm)
     {
       if (!p)
-	p = sname;
+	p = (char *) sname;
       else if (*p == '/')
 	++p;
 
@@ -260,12 +260,16 @@ shishi_auth (Shishi ** handle, int verbose, char **cname,
 
 }
 
+/*
+ * XXX: Is this ever needed?
+ *
 static void
 senderror (int s, char type, char *buf)
 {
   write (s, &type, sizeof (char));
   write (s, buf, strlen (buf));
 }
+*/
 
 /* shishi authentication, server side */
 int
@@ -280,14 +284,12 @@ get_auth (int infd, Shishi ** handle, Shishi_ap ** ap,
   int buflen;
   int len;
   int rc;
-  int i;
   int error;
   /* KERBEROS 5 SENDAUTH MESSAGE */
   char krb5sendauth[] = "KRB5_SENDAUTH_V1.0";
   /* PROTOCOL VERSION */
   char krb5kcmd1[] = "KCMDV0.1";
   char krb5kcmd2[] = "KCMDV0.2";
-  int auth_correct = 0;
   char *servername, *server, *realm;
 
   *err_msg = NULL;
@@ -526,7 +528,7 @@ get_auth (int infd, Shishi ** handle, Shishi_ap ** ap,
 	}
 
       rc = write (infd, out, ntohl (len));
-      if (rc != ntohl (len))
+      if (rc != (int) ntohl (len))
 	{
 	  *err_msg = "Error sending AP-REP";
 	  free (out);
diff --git a/libinetutils/utmp_init.c b/libinetutils/utmp_init.c
index a15781c..b598a9f 100644
--- a/libinetutils/utmp_init.c
+++ b/libinetutils/utmp_init.c
@@ -53,9 +53,12 @@
 # endif
 # include <utmpx.h>
 #else /* !HAVE_UTMPX_H */
-# if HAVE_UTIL_H
+# ifdef HAVE_UTIL_H
 #  include <util.h>
 # endif
+# ifdef HAVE_LIBUTIL_H
+#  include <libutil.h>
+# endif
 # include <utmp.h>
 #endif
 #include <string.h>
@@ -148,6 +151,7 @@ utmp_init (char *line, char *user, char *id, char *host)
 #  endif /* wtmp updating */
   endutent ();
 # elif defined HAVE_LOGIN /* !HAVE_PUTUTLINE */
+  (void) id;		/* Silence warnings.  */
   login (&utx);
 # endif /* HAVE_LOGIN && !HAVE_PUTUTLINE */
 #endif /* !HAVE_UTMPX_H */
diff --git a/libinetutils/utmp_logout.c b/libinetutils/utmp_logout.c
index 1cab5b8..3ef74d6 100644
--- a/libinetutils/utmp_logout.c
+++ b/libinetutils/utmp_logout.c
@@ -52,9 +52,12 @@
 # endif
 # include <utmpx.h>
 #else /* !HAVE_UTMPX_H */
-# if HAVE_UTIL_H
+# ifdef HAVE_UTIL_H
 #  include <util.h>
 # endif
+# ifdef HAVE_LIBUTIL_H
+#  include <libutil.h>
+# endif
 # include <utmp.h>
 #endif
 #include <string.h>
@@ -113,7 +116,9 @@ utmp_logout (char *line)
 
 #else /* !HAVE_UTMPX_H */
   struct utmp utx;
+# ifdef HAVE_PUTUTLINE
   struct utmp *ut;
+# endif
 
   strncpy (utx.ut_line, line, sizeof (utx.ut_line));
 

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

Summary of changes:
 ChangeLog                  |   29 +++++++++++++++++++++++++++++
 libinetutils/argcv.c       |    2 +-
 libinetutils/cleansess.c   |    5 ++++-
 libinetutils/daemon.c      |    9 ++++++---
 libinetutils/kcmd.c        |    8 +++++---
 libinetutils/logwtmp.c     |    7 ++++---
 libinetutils/shishi.c      |   12 +++++++-----
 libinetutils/utmp_init.c   |    6 +++++-
 libinetutils/utmp_logout.c |    7 ++++++-
 9 files changed, 67 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Fri Sep 14 20:03:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TCfr1-0006Aq-Eb
	for mharc-commit-inetutils@gnu.org; Fri, 14 Sep 2012 20:03:23 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51598)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCfqw-0006Ac-Ov
	for commit-inetutils@gnu.org; Fri, 14 Sep 2012 20:03:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCfqs-00062y-VY
	for commit-inetutils@gnu.org; Fri, 14 Sep 2012 20:03:18 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:40498)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCfqs-00062s-RQ
	for commit-inetutils@gnu.org; Fri, 14 Sep 2012 20:03:14 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1TCfqs-0001lz-8s
	for commit-inetutils@gnu.org; Sat, 15 Sep 2012 00:03:14 +0000
Date: Sat, 15 Sep 2012 00:03:14 +0000
Message-Id: <E1TCfqs-0001lz-8s@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-172-g8d5332f
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2425fa8d7d7b0e58e8913fe02fa985d344c5ee70
X-Git-Newrev: 8d5332fe7a1d95efbc1f647d5859d6723a58520e
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 15 Sep 2012 00:03:22 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  8d5332fe7a1d95efbc1f647d5859d6723a58520e (commit)
      from  2425fa8d7d7b0e58e8913fe02fa985d344c5ee70 (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=8d5332fe7a1d95efbc1f647d5859d6723a58520e


commit 8d5332fe7a1d95efbc1f647d5859d6723a58520e
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sat Sep 15 01:21:01 2012 +0200

    Missing values in initialization.

diff --git a/ChangeLog b/ChangeLog
index 78978e4..fe16473 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,41 @@
+2012-09-15  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	Add missing values in option lists, and in similar
+	lists.  All were detected as compiler warnings.
+
+	* ftp/cmds.c (types): Add missing values.
+	* ftp/cmdtab.c (cmdtab): Likewise.
+	* ftp/main.c (argp, argp_options): Likewise.
+
+	* src/dnsdomainname.c (argp): Likewise.
+	* src/hostname.c (argp, argp_options): Likewise.
+	* src/logger.c (arpg): Likewise
+	(argp_options): Likewise.  New macro GRP.
+
+	Collect Kerberos options into a group where relevant.
+
+	* src/rcp.c (options): Add missing values.
+	* src/rexec.c (argp): Likewise
+	(options): Likewise.  New macro GRP.
+	* src/rexecd.c (options): Likewise
+	* src/rlogin.c (argp, argp_options): Likewise.
+	* src/rlogind.c (argp): Likewise.
+	(options): Likewise.  New macro GRP.
+	* src/rsh.c (argp, options): Likewise
+	* src/rshd.c (argp, options): Likewise
+
+	* telnet/commands.c (Togglelist, Setlist, ModeList)
+	(SlcList, EnvList, AuthList, EncryptList, cmdtab)
+	(cmdtab2): Add missing values.
+	* telnet/main.c (argp, argp_options): Likewise.
+	* telnet/network.c (timeout): Likewise.
+	* telnet/sys_bsd.c (TimeValue): Likewise.
+
+	* whois/whois.c (gwhois_argp, gwhois_argp_children)
+	(ripe_argp): Add missing values.
+	(gwhois_arpg_options, ripe_argp_options): Likewise.
+	New macro GRP.
+
 2012-09-14  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	libinetutils: Compiler warnings.
diff --git a/ftp/cmds.c b/ftp/cmds.c
index c163e37..62fed74 100644
--- a/ftp/cmds.c
+++ b/ftp/cmds.c
@@ -330,7 +330,7 @@ struct types
     {"image", "I", TYPE_I, 0},
     {"ebcdic", "E", TYPE_E, 0},
     {"tenex", "L", TYPE_L, bytename},
-    {NULL}
+    {NULL, NULL, 0, NULL}
   };
 
 /*
diff --git a/ftp/cmdtab.c b/ftp/cmdtab.c
index 743921d..0905ea7 100644
--- a/ftp/cmdtab.c
+++ b/ftp/cmdtab.c
@@ -207,7 +207,7 @@ static struct cmd cmdtab[] = {
   {"umask", umaskhelp, 0, 1, 1, do_umask},
   {"verbose", verbosehelp, 0, 0, 0, setverbose},
   {"?", helphelp, 0, 0, 1, help},
-  {0},
+  {NULL, NULL, 0, 0, 0, NULL},
 };
 
 #define NCMDS (sizeof (cmdtab) / sizeof (cmdtab[0]) - 1)
diff --git a/ftp/main.c b/ftp/main.c
index 2b6e92a..5af6187 100644
--- a/ftp/main.c
+++ b/ftp/main.c
@@ -108,7 +108,7 @@ static struct argp_option argp_options[] = {
   {"ipv4", '4', NULL, 0, "contact IPv4 hosts", GRP+1},
   {"ipv6", '6', NULL, 0, "contact IPv6 hosts", GRP+1},
 #undef GRP
-  {NULL}
+  {NULL, 0, NULL, 0, NULL, 0}
 };
 
 static error_t
@@ -168,7 +168,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp = {argp_options, parse_opt, args_doc, doc};
+static struct argp argp =
+  {argp_options, parse_opt, args_doc, doc, NULL, NULL, NULL};
 
 
 int
diff --git a/src/dnsdomainname.c b/src/dnsdomainname.c
index 554eef3..6b8912e 100644
--- a/src/dnsdomainname.c
+++ b/src/dnsdomainname.c
@@ -40,7 +40,7 @@ const char *program_authors[] = {
   NULL
 };
 
-static struct argp argp = { NULL, NULL, NULL, doc };
+static struct argp argp = { NULL, NULL, NULL, doc, NULL, NULL, NULL };
 
 void
 dnsdomainname (void)
diff --git a/src/hostname.c b/src/hostname.c
index 5202b42..ed89d7f 100644
--- a/src/hostname.c
+++ b/src/hostname.c
@@ -69,7 +69,7 @@ static struct argp_option argp_options[] = {
   {"yp", 'y', NULL, 0, "NIS/YP domain name", GRP+1},
   {"nis", 0, NULL, OPTION_ALIAS, NULL, GRP+1},
 #undef GRP
-  {NULL}
+  {NULL, 0, NULL, 0, NULL, 0}
 };
 
 static error_t
@@ -129,7 +129,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp = {argp_options, parse_opt, args_doc, doc};
+static struct argp argp =
+  {argp_options, parse_opt, args_doc, doc, NULL, NULL, NULL};
 
 static void get_name (const hostname_arguments *const args);
 static void set_name (const hostname_arguments *const args);
diff --git a/src/logger.c b/src/logger.c
index 7271f4b..9f60f1c 100644
--- a/src/logger.c
+++ b/src/logger.c
@@ -383,23 +383,25 @@ const char args_doc[] = "[MESSAGE]";
 const char doc[] = "Send messages to syslog";
 
 static struct argp_option argp_options[] = {
-  {"ipv4", '4', NULL, 0, "use IPv4 for logging to host" },
-  {"ipv6", '6', NULL, 0, "use IPv6 with a host target" },
+#define GRP 10
+  {"ipv4", '4', NULL, 0, "use IPv4 for logging to host", GRP },
+  {"ipv6", '6', NULL, 0, "use IPv6 with a host target", GRP },
   { "host", 'h', "HOST", 0,
-    "log to HOST instead of to the default " PATH_LOG },
+    "log to HOST instead of to the default " PATH_LOG, GRP },
   { "unix", 'u', "SOCK", 0,
-    "log to UNIX socket SOCK instead of " PATH_LOG },
+    "log to UNIX socket SOCK instead of " PATH_LOG, GRP },
   { "source", 'S', "IP", 0,
-    "set source IP address" },
+    "set source IP address", GRP },
   { "id", 'i', "PID", OPTION_ARG_OPTIONAL,
-    "log the process id with every line" },
+    "log the process id with every line", GRP },
 #ifdef LOG_PERROR
-  { "stderr", 's', NULL, 0, "copy the message to stderr" },
+  { "stderr", 's', NULL, 0, "copy the message to stderr", GRP },
 #endif
-  { "file", 'f', "FILE", 0, "log the content of FILE" },
-  { "priority", 'p', "PRI", 0, "log with priority PRI" },
-  { "tag", 't', "TAG", 0, "prepend every line with TAG" },
-  {NULL}
+  { "file", 'f', "FILE", 0, "log the content of FILE", GRP },
+  { "priority", 'p', "PRI", 0, "log with priority PRI", GRP },
+  { "tag", 't', "TAG", 0, "prepend every line with TAG", GRP },
+#undef GRP
+  {NULL, 0, NULL, 0, NULL, 0 }
 };
 
 static error_t
@@ -476,7 +478,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp = {argp_options, parse_opt, args_doc, doc};
+static struct argp argp =
+  {argp_options, parse_opt, args_doc, doc, NULL, NULL, NULL};
 
 const char *program_authors[] = {
   "Sergey Poznyakoff",
diff --git a/src/rcp.c b/src/rcp.c
index 823638b..08d57fa 100644
--- a/src/rcp.c
+++ b/src/rcp.c
@@ -161,19 +161,6 @@ static struct argp_option options[] = {
     "attempt to preserve (duplicate) in its copies the"
     " modification times and modes of the source files",
     GRID+1 },
-#if defined KERBEROS || defined SHISHI
-  { "kerberos", 'K', NULL, 0,
-    "turns off all Kerberos authentication",
-    GRID+1 },
-  { "realm", 'k', "REALM", 0,
-    "obtain tickets for a remote host in REALM instead of the remote host's realm",
-    GRID+1 },
-#endif
-#ifdef ENCRYPTION
-  { "encrypt", 'x', NULL, 0,
-    "encrypt all data transfer",
-    GRID+1 },
-#endif
   { "target-directory", 'd', "DIRECTORY", 0,
     "copy all SOURCE arguments into DIRECTORY",
     GRID+1 },
@@ -191,7 +178,23 @@ static struct argp_option options[] = {
     "use only IPv6",
     GRID+1 },
 #endif /* WITH_ORCMD_AF || WITH_RCMD_AF || SHISHI */
-  { NULL }
+#undef GRID
+#if defined KERBEROS || defined SHISHI
+# define GRID 10
+  { "kerberos", 'K', NULL, 0,
+    "turns off all Kerberos authentication",
+    GRID+1 },
+  { "realm", 'k', "REALM", 0,
+    "obtain tickets for a remote host in REALM instead of the remote host's realm",
+    GRID+1 },
+# ifdef ENCRYPTION
+  { "encrypt", 'x', NULL, 0,
+    "encrypt all data transfer",
+    GRID+1 },
+# endif
+# undef GRID
+#endif
+  { NULL, 0, NULL, 0, NULL, 0 }
 };
 
 static error_t
diff --git a/src/rexec.c b/src/rexec.c
index ebba784..03d8ea9 100644
--- a/src/rexec.c
+++ b/src/rexec.c
@@ -59,16 +59,18 @@ const char *program_authors[] =
   };
 
 static struct argp_option options[] = {
-  {"user",  'u', "user", 0, "Specify the user"},
-  {"host",  'h', "host", 0, "Specify the host"},
-  {"password",  'p', "password", 0, "Specify the password"},
-  {"port",  'P', "port", 0, "Specify the port to connect to"},
-  {"noerr", 'n', NULL, 0, "Disable the stderr stream"},
-  {"error",  'e', "error", 0, "Specify a TCP port to use for stderr"},
-  {"ipv4",  '4', NULL, 0, "Use IPv4 address space."},
-  {"ipv6",  '6', NULL, 0, "Use IPv6 address space."},
-  {"ipany",  'a', NULL, 0, "Allow any address family. (default)"},
-  { 0 }
+#define GRP 10
+  {"user",  'u', "user", 0, "Specify the user", GRP},
+  {"host",  'h', "host", 0, "Specify the host", GRP},
+  {"password",  'p', "password", 0, "Specify the password", GRP},
+  {"port",  'P', "port", 0, "Specify the port to connect to", GRP},
+  {"noerr", 'n', NULL, 0, "Disable the stderr stream", GRP},
+  {"error",  'e', "error", 0, "Specify a TCP port to use for stderr", GRP},
+  {"ipv4",  '4', NULL, 0, "Use IPv4 address space.", GRP},
+  {"ipv6",  '6', NULL, 0, "Use IPv6 address space.", GRP},
+  {"ipany",  'a', NULL, 0, "Allow any address family. (default)", GRP},
+#undef GRP
+  { NULL, 0, NULL, 0, NULL, 0 }
 };
 
 struct arguments
@@ -125,7 +127,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp = {options, parse_opt, args_doc, doc};
+static struct argp argp =
+  {options, parse_opt, args_doc, doc, NULL, NULL, NULL};
 
 static void do_rexec (struct arguments *arguments);
 
diff --git a/src/rexecd.c b/src/rexecd.c
index f8b1c55..ea79c24 100644
--- a/src/rexecd.c
+++ b/src/rexecd.c
@@ -130,8 +130,8 @@ static struct pam_conv pam_conv = { rexec_conv, NULL };
 static int logging = 0;
 
 static struct argp_option options[] = {
-  { "logging", 'l', NULL, 0, "logging of requests and errors" },
-  { NULL }
+  { "logging", 'l', NULL, 0, "logging of requests and errors", 1 },
+  { NULL, 0, NULL, 0, NULL, 0 }
 };
 
 static error_t
diff --git a/src/rlogin.c b/src/rlogin.c
index 12d3eae..a2ab0bf 100644
--- a/src/rlogin.c
+++ b/src/rlogin.c
@@ -236,7 +236,13 @@ static struct argp_option argp_options[] = {
   {"no-escape", 'E', NULL, 0, "stops any character from being recognized as "
    "an escape character", GRP+1},
   {"user", 'l', "USER", 0, "run as USER on the remote system", GRP+1},
+#if defined WITH_ORCMD_AF || defined WITH_RCMD_AF || defined SHISHI
+  { "ipv4", '4', NULL, 0, "use only IPv4", GRP+1 },
+  { "ipv6", '6', NULL, 0, "use only IPv6", GRP+1 },
+#endif
+#undef GRP
 #if defined KERBEROS || defined SHISHI
+# define GRP 10
 # ifdef ENCRYPTION
   {"encrypt", 'x', NULL, 0, "turns on encryption for all data passed via "
    "the rlogin session", GRP+1},
@@ -244,13 +250,9 @@ static struct argp_option argp_options[] = {
   {"kerberos", 'K', NULL, 0, "turns off all Kerberos authentication", GRP+1},
   {"realm", 'k', "REALM", 0, "obtain tickets for the remote host in REALM "
    "realm instead of the remote's realm", GRP+1},
+# undef GRP
 #endif /* KERBEROS || SHISHI */
-#if defined WITH_ORCMD_AF || defined WITH_RCMD_AF || defined SHISHI
-  { "ipv4", '4', NULL, 0, "use only IPv4" },
-  { "ipv6", '6', NULL, 0, "use only IPv6" },
-#endif
-#undef GRP
-  {NULL}
+  {NULL, 0, NULL, 0, NULL, 0}
 };
 
 static error_t
@@ -325,7 +327,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp = {argp_options, parse_opt, args_doc, doc};
+static struct argp argp =
+  {argp_options, parse_opt, args_doc, doc, NULL, NULL, NULL};
 
 int
 main (int argc, char *argv[])
diff --git a/src/rlogind.c b/src/rlogind.c
index 3d2f987..2d42271 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -277,37 +277,41 @@ const char *program_authors[] = {
 };
 
 static struct argp_option options[] = {
+#define GRP 10
   { "allow-root", 'o', NULL, 0,
-    "allow uid == 0 to login, disabled by default" },
+    "allow uid == 0 to login, disabled by default", GRP },
   { "verify-hostname", 'a', NULL, 0,
-    "ask hostname for verification" },
+    "ask hostname for verification", GRP },
   { "daemon", 'd', NULL, 0,
-    "daemon mode" },
+    "daemon mode", GRP },
 #ifdef HAVE___CHECK_RHOSTS_FILE
   { "no-rhosts", 'l', NULL, 0,
-    "ignore .rhosts file" },
+    "ignore .rhosts file", GRP },
 #endif
   { "no-keepalive", 'n', NULL, 0,
-    "do not set SO_KEEPALIVE" },
+    "do not set SO_KEEPALIVE", GRP },
   { "local-domain", 'L', "NAME", 0,
-    "set local domain name" },
+    "set local domain name", GRP },
+  { "debug", 'D', "LEVEL", OPTION_ARG_OPTIONAL,
+    "set debug level", GRP },
+  { "port", 'p', "PORT", 0,
+    "listen on given port (valid only in daemon mode)", GRP },
+  { "reverse-required", 'r', NULL, 0,
+    "require reverse resolving of a remote host IP", GRP },
+#undef GRP
 #if defined KERBEROS || defined SHISHI
+# define GRP 20
   { "kerberos", 'k', NULL, 0,
-    "use kerberos IV/V authentication" },
+    "use kerberos IV/V authentication", GRP },
   { "server-principal", 'S', "NAME", 0,
-    "set Kerberos server name, overriding canonical hostname" },
-#endif
-#if defined ENCRYPTION
+    "set Kerberos server name, overriding canonical hostname", GRP },
+# if defined ENCRYPTION
   { "encrypt", 'x', NULL, 0,
-    "use DES encryption" },
+    "use DES encryption", GRP },
+# endif
+# undef GRP
 #endif
-  { "debug", 'D', "LEVEL", OPTION_ARG_OPTIONAL,
-    "set debug level" },
-  { "port", 'p', "PORT", 0,
-    "listen on given port (valid only in daemon mode)" },
-  { "reverse-required", 'r', NULL, 0,
-    "require reverse resolving of a remote host IP" },
-  { NULL }
+  { NULL, 0, NULL, 0, NULL, 0 }
 };
 
 static error_t
@@ -389,7 +393,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp = { options, parse_opt, NULL, doc};
+static struct argp argp = { options, parse_opt, NULL, doc, NULL, NULL, NULL};
 
 
 
diff --git a/src/rsh.c b/src/rsh.c
index 5875dd1..1621fa2 100644
--- a/src/rsh.c
+++ b/src/rsh.c
@@ -137,32 +137,37 @@ const char args_doc[] = "[USER@]HOST [COMMAND [ARG...]]";
 const char doc[] = "remote shell";
 
 static struct argp_option options[] = {
+#define GRP 10
   { "debug", 'd', NULL, 0,
-    "turns on socket debugging (see setsockopt(2))" },
+    "turns on socket debugging (see setsockopt(2))", GRP },
   { "user", 'l', "USER", 0,
-    "run as USER on the remote system" },
+    "run as USER on the remote system", GRP },
   { "escape", 'e', "CHAR", 0,
-    "allows user specification of the escape character (``~'' by default)" },
+    "allows user specification of the escape "
+    "character (``~'' by default)", GRP },
   { "8-bit", '8', NULL, 0,
-    "allows an eight-bit input data path at all times" },
+    "allows an eight-bit input data path at all times", GRP },
   { "no-input", 'n', NULL, 0,
-    "use /dev/null as input" },
+    "use /dev/null as input", GRP },
+#if defined WITH_ORCMD_AF || defined WITH_RCMD_AF || defined SHISHI
+  { "ipv4", '4', NULL, 0, "use only IPv4", GRP },
+  { "ipv6", '6', NULL, 0, "use only IPv6", GRP },
+#endif
+#undef GRP
 #if defined KERBEROS || defined SHISHI
+# define GRP 20
   { "kerberos", 'K', NULL, 0,
-    "turns off all Kerberos authentication" },
+    "turns off all Kerberos authentication", GRP },
   { "realm", 'k', "REALM", 0,
     "obtain tickets for a remote host in REALM, "
-    "instead of the remote host's default realm" },
+    "instead of the remote host's default realm", GRP },
 # ifdef ENCRYPTION
   { "encrypt", 'x', NULL, 0,
-    "encrypt all data transfer" },
+    "encrypt all data transfer", GRP },
 # endif /* ENCRYPTION */
+# undef GRP
 #endif /* KERBEROS || SHISHI */
-#if defined WITH_ORCMD_AF || defined WITH_RCMD_AF || defined SHISHI
-  { "ipv4", '4', NULL, 0, "use only IPv4" },
-  { "ipv6", '6', NULL, 0, "use only IPv6" },
-#endif
-  { NULL }
+  { NULL, 0, NULL, 0, NULL, 0 }
 };
 
 static error_t
@@ -222,7 +227,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
   return 0;
 }
 
-static struct argp argp = { options, parse_opt, args_doc, doc };
+static struct argp argp =
+  { options, parse_opt, args_doc, doc, NULL, NULL, NULL };
 
 
 int
diff --git a/src/rshd.c b/src/rshd.c
index 03965eb..9a8c6ae 100644
--- a/src/rshd.c
+++ b/src/rshd.c
@@ -207,27 +207,31 @@ char *servername = NULL;
 #endif /* KERBEROS || SHISHI */
 
 static struct argp_option options[] = {
+#define GRP 10
   { "verify-hostname", 'a', NULL, 0,
-    "ask hostname for verification" },
+    "ask hostname for verification", GRP },
 #ifdef HAVE___CHECK_RHOSTS_FILE
   { "no-rhosts", 'l', NULL, 0,
-    "ignore .rhosts file" },
+    "ignore .rhosts file", GRP },
 #endif
   { "no-keepalive", 'n', NULL, 0,
-    "do not set SO_KEEPALIVE" },
+    "do not set SO_KEEPALIVE", GRP },
   { "log-sessions", 'L', NULL, 0,
-    "log successful logins" },
+    "log successful logins", GRP },
+#undef GRP
 #if defined KERBEROS || defined SHISHI
+# define GRP 20
   /* FIXME: The option semantics does not match that of other r* utilities */
   { "kerberos", 'k', NULL, 0,
-    "use kerberos authentication" },
+    "use kerberos authentication", GRP },
   /* FIXME: Option name is misleading */
   { "vacuous", 'v', NULL, 0,
-    "fail for non-Kerberos authentication" },
+    "fail for non-Kerberos authentication", GRP },
   { "server-principal", 'S', "NAME", 0,
-    "set Kerberos server name, overriding canonical hostname" },
+    "set Kerberos server name, overriding canonical hostname", GRP },
+# undef GRP
 #endif /* KERBEROS */
-  { NULL }
+  { NULL, 0, NULL, 0, NULL, 0 }
 };
 
 #ifdef HAVE___CHECK_RHOSTS_FILE
@@ -298,7 +302,7 @@ const char doc[] =
 #else /* !WITH_PAM */
 		   "Remote shell server.";
 #endif
-static struct argp argp = { options, parse_opt, NULL, doc};
+static struct argp argp = { options, parse_opt, NULL, doc, NULL, NULL, NULL};
 
 
 /* Remote shell server. We're invoked by the rcmd(3) function. */
diff --git a/telnet/commands.c b/telnet/commands.c
index b511e4c..09b17f4 100644
--- a/telnet/commands.c
+++ b/telnet/commands.c
@@ -819,7 +819,7 @@ static struct togglelist Togglelist[] = {
    lclchars,
    &localchars,
    "recognize certain control characters"},
-  {" ", "", 0},			/* empty line */
+  {" ", "", 0, NULL, NULL},			/* empty line */
 #if defined unix && defined TN3270
   {"apitrace",
    "(debugging) toggle tracing of API transactions",
@@ -859,11 +859,11 @@ static struct togglelist Togglelist[] = {
    "print hexadecimal representation of terminal traffic"},
   {"?",
    0,
-   togglehelp},
+   togglehelp, NULL, NULL},
   {"help",
    0,
-   togglehelp},
-  {0}
+   togglehelp, NULL, NULL},
+  {NULL, NULL, 0, NULL, NULL}
 };
 
 static int
@@ -982,13 +982,13 @@ static struct setlist Setlist[] = {
   {"rlogin", "rlogin escape character", 0, &rlogin},
   {"tracefile", "file to write trace information to", SetNetTrace,
    (cc_t *) NetTraceFile},
-  {" ", ""},
+  {" ", "", 0, NULL},
   {" ", "The following need 'localchars' to be toggled true", 0, 0},
   {"flushoutput", "character to cause an Abort Output", 0, termFlushCharp},
   {"interrupt", "character to cause an Interrupt Process", 0, termIntCharp},
   {"quit", "character to cause an Abort process", 0, termQuitCharp},
   {"eof", "character to cause an EOF ", 0, termEofCharp},
-  {" ", ""},
+  {" ", "", 0, NULL},
   {" ", "The following are for local editing in linemode", 0, 0},
   {"erase", "character to use to erase a character", 0, termEraseCharp},
   {"kill", "character to use to erase a line", 0, termKillCharp},
@@ -1001,7 +1001,7 @@ static struct setlist Setlist[] = {
   {"forw1", "alternate end of line character", 0, termForw1Charp},
   {"forw2", "alternate end of line character", 0, termForw2Charp},
   {"ayt", "alternate AYT character", 0, termAytCharp},
-  {0}
+  {NULL, NULL, 0, NULL}
 };
 
 #if defined CRAY && !defined __STDC__
@@ -1314,16 +1314,16 @@ struct modelist
 extern int modehelp (void);
 
 static struct modelist ModeList[] = {
-  {"character", "Disable LINEMODE option", docharmode, 1},
+  {"character", "Disable LINEMODE option", docharmode, 1, 0},
 #ifdef	KLUDGELINEMODE
-  {"", "(or disable obsolete line-by-line mode)", 0},
+  {"", "(or disable obsolete line-by-line mode)", NULL, 0, 0},
 #endif
-  {"line", "Enable LINEMODE option", dolinemode, 1},
+  {"line", "Enable LINEMODE option", dolinemode, 1, 0},
 #ifdef	KLUDGELINEMODE
-  {"", "(or enable obsolete line-by-line mode)", 0},
+  {"", "(or enable obsolete line-by-line mode)", NULL, 0, 0},
 #endif
-  {"", "", 0},
-  {"", "These require the LINEMODE option to be enabled", 0},
+  {"", "", NULL, 0, 0},
+  {"", "These require the LINEMODE option to be enabled", NULL, 0, 0},
   {"isig", "Enable signal trapping", set_mode, 1, MODE_TRAPSIG},
   {"+isig", 0, set_mode, 1, MODE_TRAPSIG},
   {"-isig", "Disable signal trapping", clear_mode, 1, MODE_TRAPSIG},
@@ -1337,13 +1337,13 @@ static struct modelist ModeList[] = {
   {"+litecho", 0, set_mode, 1, MODE_LIT_ECHO},
   {"-litecho", "Disable literal character echo", clear_mode, 1,
    MODE_LIT_ECHO},
-  {"help", 0, modehelp, 0},
+  {"help", 0, modehelp, 0, 0},
 #ifdef	KLUDGELINEMODE
-  {"kludgeline", 0, dokludgemode, 1},
+  {"kludgeline", 0, dokludgemode, 1, 0},
 #endif
-  {"", "", 0},
-  {"?", "Print help information", modehelp, 0},
-  {0},
+  {"", "", NULL, 0, 0},
+  {"?", "Print help information", modehelp, 0, 0},
+  {NULL, NULL, NULL, 0, 0},
 };
 
 
@@ -1678,7 +1678,7 @@ struct slclist SlcList[] = {
    slc_mode_import, 0},
   {"help", 0, slc_help, 0},
   {"?", "Print help information", slc_help, 0},
-  {0},
+  {NULL, NULL, NULL, 0},
 };
 
 static void
@@ -1775,7 +1775,7 @@ struct envlist EnvList[] = {
 #endif
   {"help", 0, env_help, 0},
   {"?", "Print help information", env_help, 0},
-  {0},
+  {NULL, NULL, NULL, 0},
 };
 
 static void
@@ -2113,7 +2113,7 @@ struct authlist AuthList[] = {
    auth_enable, 1},
   {"help", 0, auth_help, 0},
   {"?", "Print help information", auth_help, 0},
-  {0},
+  {NULL, NULL, NULL, 0},
 };
 
 static int
@@ -2222,7 +2222,7 @@ struct encryptlist EncryptList[] = {
    EncryptStatus, 0, 0, 0},
   {"help", 0, EncryptHelp, 0, 0, 0},
   {"?", "Print help information", EncryptHelp, 0, 0, 0},
-  {0},
+  {NULL, NULL, NULL, 0, 0, 0},
 };
 
 static int
@@ -2831,7 +2831,7 @@ static Command cmdtab[] = {
 #endif
   {"environ", envhelp, env_cmd, 0},
   {"?", helphelp, help, 0},
-  {0}
+  {NULL, NULL, NULL, 0}
 };
 
 static char crmodhelp[] = "deprecated command -- use 'toggle crmod' instead";
@@ -2841,7 +2841,7 @@ static Command cmdtab2[] = {
   {"help", 0, help, 0},
   {"escape", escapehelp, setescape, 0},
   {"crmod", crmodhelp, togcrmod, 0},
-  {0}
+  {NULL, NULL, NULL, 0}
 };
 
 
diff --git a/telnet/main.c b/telnet/main.c
index 0c5b219..5a679ac 100644
--- a/telnet/main.c
+++ b/telnet/main.c
@@ -190,7 +190,7 @@ static struct argp_option argp_options[] = {
   { "noasyncnet", OPTION_NOASYNCNET, NULL, 0, "", GRID+1 },
 # undef GRID
 #endif
-  { NULL }
+  { NULL, 0, NULL, 0, NULL, 0 }
 };
 
 static error_t
@@ -319,7 +319,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
 const char args_doc[] = "[HOST [PORT]]";
 const char doc[] = "Login to remote system HOST "
                    "(optionally, on service port PORT)";
-static struct argp argp = { argp_options, parse_opt, args_doc, doc};
+static struct argp argp =
+  { argp_options, parse_opt, args_doc, doc, NULL, NULL, NULL };
 
 
 
diff --git a/telnet/network.c b/telnet/network.c
index 8b5b327..3640ffb 100644
--- a/telnet/network.c
+++ b/telnet/network.c
@@ -95,7 +95,7 @@ init_network (void)
 int
 stilloob (void)
 {
-  static struct timeval timeout = { 0 };
+  static struct timeval timeout = { 0, 0 };
   fd_set excepts;
   int value;
 
diff --git a/telnet/sys_bsd.c b/telnet/sys_bsd.c
index 58df0ef..2973114 100644
--- a/telnet/sys_bsd.c
+++ b/telnet/sys_bsd.c
@@ -1068,7 +1068,7 @@ process_rings (int netin, int netout, int netex, int ttyin, int ttyout,
    * time (TN3270 mode only).
    */
   int returnValue = 0;
-  static struct timeval TimeValue = { 0 };
+  static struct timeval TimeValue = { 0, 0 };
   int nfds = 0;
 
   if (netout)
diff --git a/whois/whois.c b/whois/whois.c
index 07e1f7d..23a90d7 100644
--- a/whois/whois.c
+++ b/whois/whois.c
@@ -61,40 +61,42 @@ const char *port = NULL;
 int nopar = 0;
 
 static struct argp_option ripe_argp_options[] = {
+#define GRP 10
   { NULL, 'a', NULL, 0,
-    "search all databases" },
+    "search all databases", GRP },
   { NULL, 'F', NULL, 0,
-    "fast raw output (implies -r)" },
+    "fast raw output (implies -r)", GRP },
   { NULL, 'g', "SOURCE:FIRST-LAST", 0,
-    "find updates from SOURCE from serial FIRST to LAST" },
+    "find updates from SOURCE from serial FIRST to LAST", GRP },
   { NULL, 'i', "ATTR[,ATTR]...", 0,
-    "do an inverse lookup for specified ATTRibutes" },
+    "do an inverse lookup for specified ATTRibutes", GRP },
   { NULL, 'l', NULL, 0,
-    "one level less specific lookup (RPSL only)" },
+    "one level less specific lookup (RPSL only)", GRP },
   { NULL, 'L', NULL, 0,
-    "find all Less specific matches" },
+    "find all Less specific matches", GRP },
   { NULL, 'M', NULL, 0,
-    "find all More specific matches" },
+    "find all More specific matches", GRP },
   { NULL, 'm', NULL, 0,
-    "find first level more specific matches" },
+    "find first level more specific matches", GRP },
   { NULL, 'r', NULL, 0,
-    "turn off recursive lookups" },
+    "turn off recursive lookups", GRP },
   { NULL, 'R', NULL, 0,
     "force to show local copy of the domain object even "
-    "if it contains referral" },
+    "if it contains referral", GRP },
   { NULL, 'S', NULL, 0,
-    "tell server to leave out syntactic sugar" },
+    "tell server to leave out syntactic sugar", GRP },
   { NULL, 's', "SOURCE[,SOURCE]...", 0,
-    "search the database from SOURCE" },
+    "search the database from SOURCE", GRP },
   { NULL, 'T', "TYPE[,TYPE]...", 0,
-    "only look for objects of TYPE" },
+    "only look for objects of TYPE", GRP },
   { NULL, 'q', "version|sources", 0,
-    "query specified server info (RPSL only)" },
+    "query specified server info (RPSL only)", GRP },
   { NULL, 't', "TYPE", 0,
-    "requests template for object of TYPE ('all' for a list)" },
+    "requests template for object of TYPE ('all' for a list)", GRP },
   { NULL, 'x', NULL, 0,
-    "exact match only (RPSL only)" },
-  { NULL }
+    "exact match only (RPSL only)", GRP },
+#undef GRP
+  { NULL, 0, NULL, 0, NULL, 0 }
 };
 
 static error_t
@@ -117,18 +119,21 @@ ripe_argp_parser (int key, char *arg, struct argp_state *state)
   return ARGP_ERR_UNKNOWN;
 }
 
-static struct argp ripe_argp = { ripe_argp_options, ripe_argp_parser };
+static struct argp ripe_argp =
+  { ripe_argp_options, ripe_argp_parser, NULL, NULL, NULL, NULL, NULL };
 
 static struct argp_option gwhois_argp_options[] = {
+#define GRP 10
   { "verbose", 'V', NULL, 0,
-    "explain what is being done" },
+    "explain what is being done", GRP },
   { "server", 'h', "HOST", 0,
-    "connect to server HOST"},
+    "connect to server HOST", GRP},
   { "port", 'p', "PORT", 0,
-    "connect to PORT" },
+    "connect to PORT", GRP },
   { NULL, 'H', NULL, 0,
-    "hide legal disclaimers" },
-  { NULL }
+    "hide legal disclaimers", GRP },
+#undef GRP
+  { NULL, 0, NULL, 0, NULL, 0 }
 };
 
 static error_t
@@ -170,7 +175,7 @@ struct argp_child gwhois_argp_children[] = {
     "RIPE-specific options",
     0
     },
-  { NULL }
+  { NULL, 0, NULL, 0 }
 };
 
 static struct argp gwhois_argp = {
@@ -178,7 +183,9 @@ static struct argp gwhois_argp = {
   gwhois_argp_parser,
   "OBJECT...",
   "client for the whois directory service",
-  gwhois_argp_children
+  gwhois_argp_children,
+  NULL,
+  NULL
 };
 
 const char *program_authors[] =

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

Summary of changes:
 ChangeLog           |   38 ++++++++++++++++++++++++++++++++++
 ftp/cmds.c          |    2 +-
 ftp/cmdtab.c        |    2 +-
 ftp/main.c          |    5 ++-
 src/dnsdomainname.c |    2 +-
 src/hostname.c      |    5 ++-
 src/logger.c        |   27 +++++++++++++----------
 src/rcp.c           |   31 +++++++++++++++------------
 src/rexec.c         |   25 ++++++++++++---------
 src/rexecd.c        |    4 +-
 src/rlogin.c        |   17 +++++++++------
 src/rlogind.c       |   42 ++++++++++++++++++++-----------------
 src/rsh.c           |   34 +++++++++++++++++------------
 src/rshd.c          |   22 +++++++++++--------
 telnet/commands.c   |   48 +++++++++++++++++++++---------------------
 telnet/main.c       |    5 ++-
 telnet/network.c    |    2 +-
 telnet/sys_bsd.c    |    2 +-
 whois/whois.c       |   57 ++++++++++++++++++++++++++++----------------------
 19 files changed, 222 insertions(+), 148 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Sat Sep 15 05:45:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TCovr-0000El-Vw
	for mharc-commit-inetutils@gnu.org; Sat, 15 Sep 2012 05:44:59 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43970)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCovn-0000BD-RC
	for commit-inetutils@gnu.org; Sat, 15 Sep 2012 05:44:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCovl-00081t-7X
	for commit-inetutils@gnu.org; Sat, 15 Sep 2012 05:44:55 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:36743)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TCovl-00081p-2w
	for commit-inetutils@gnu.org; Sat, 15 Sep 2012 05:44:53 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1TCovk-0000M3-9D
	for commit-inetutils@gnu.org; Sat, 15 Sep 2012 09:44:52 +0000
Date: Sat, 15 Sep 2012 09:44:52 +0000
Message-Id: <E1TCovk-0000M3-9D@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-173-gae05f1f
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 8d5332fe7a1d95efbc1f647d5859d6723a58520e
X-Git-Newrev: ae05f1f506836b7e8b4dc769232937eb0b2cdcfe
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 15 Sep 2012 09:44:58 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  ae05f1f506836b7e8b4dc769232937eb0b2cdcfe (commit)
      from  8d5332fe7a1d95efbc1f647d5859d6723a58520e (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=ae05f1f506836b7e8b4dc769232937eb0b2cdcfe


commit ae05f1f506836b7e8b4dc769232937eb0b2cdcfe
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sat Sep 15 11:42:19 2012 +0200

    Mark unused parameters.

diff --git a/ChangeLog b/ChangeLog
index fe16473..0230592 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,43 @@
 2012-09-15  Mats Erik Andersson  <gnu@gisladisker.se>
 
+	Mark unused parameters as such.
+
+	* ftp/cmds.c (setbinary, setascii, settenex, setftmode)
+	(setform, setstruct, status, setbell, settrace, sethash)
+	(setverbose, setipany, setipv4, setipv6, setepsv4, setport)
+	(setprompt, setglob, shell, pwd, quit, disconnect, proxabort)
+	(setcase, setcr, setpassive, setsunique, setrunique, cdup)
+	(syst): Add _GL_UNUSED_PARAMETER.
+	* ftp/ftp.c (abortsend, abortrecv, psabort, abortpt, reset):
+	Likewise.
+	* ftp/main.c (parse_opt): Likewise.
+
+	Header file and parse_opt() are common treatments.
+
+	* src/logger.c: Include <unused-parameter.h>.
+	(parse_opt): Add _GL_UNUSED_PARAMETER.
+	* src/rcp.c: Likewise.
+	(lostconn): Likewise
+	* src/rexecd.c: Likewise.
+	* src/rlogind.c (parse_opt): Likewise
+	(do_shishi_login): Remove variable IV.
+	* src/rshd.c: Likewise.
+
+	* telnet/commands.c: Include <unused-parameter.h>.
+	(shell): Add _GL_UNUSED_PARAMETER.
+	* telnet/main.c: Likewise.
+	(parse_opt): Likewise.
+	* telnet/sys_bsd.c: Likewise.
+	(deadpeer, intr, intr2, susp, sendwin): Likewise.
+
+	* tests/localhost.c: Likewise.
+	(main): Likewise.
+
+	* whois/whois.c: Likewise.
+	(ripe_argp_parser, gwhois_argp_parser): Likewise.
+
+2012-09-15  Mats Erik Andersson  <gnu@gisladisker.se>
+
 	Add missing values in option lists, and in similar
 	lists.  All were detected as compiler warnings.
 
diff --git a/ftp/cmds.c b/ftp/cmds.c
index 62fed74..3e1328f 100644
--- a/ftp/cmds.c
+++ b/ftp/cmds.c
@@ -427,7 +427,7 @@ char *stype[] = {
  * Set binary transfer type.
  */
 void
-setbinary (int argc, char **argv)
+setbinary (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   stype[1] = "binary";
@@ -438,7 +438,7 @@ setbinary (int argc, char **argv)
  * Set ascii transfer type.
  */
 void
-setascii (int argc, char **argv)
+setascii (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   stype[1] = "ascii";
@@ -449,7 +449,7 @@ setascii (int argc, char **argv)
  * Set tenex transfer type.
  */
 void
-settenex (int argc, char **argv)
+settenex (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   stype[1] = "tenex";
@@ -460,7 +460,7 @@ settenex (int argc, char **argv)
  * Set file transfer mode.
  */
 void
-setftmode (int argc, char **argv)
+setftmode (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   printf ("We only support %s mode, sorry.\n", modename);
@@ -471,7 +471,7 @@ setftmode (int argc, char **argv)
  * Set file transfer format.
  */
 void
-setform (int argc, char **argv)
+setform (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   printf ("We only support %s format, sorry.\n", formname);
@@ -482,7 +482,7 @@ setform (int argc, char **argv)
  * Set file transfer structure.
  */
 void
-setstruct (int argc, char **argv)
+setstruct (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   printf ("We only support %s structure, sorry.\n", structname);
@@ -1055,7 +1055,7 @@ onoff (int bool)
  * Show status.
  */
 void
-status (int argc, char **argv)
+status (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
   int i;
 
@@ -1120,7 +1120,7 @@ status (int argc, char **argv)
  * Set beep on cmd completed mode.
  */
 void
-setbell (int argc, char **argv)
+setbell (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   bell = !bell;
@@ -1132,7 +1132,7 @@ setbell (int argc, char **argv)
  * Turn on packet tracing.
  */
 void
-settrace (int argc, char **argv)
+settrace (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   trace = !trace;
@@ -1144,7 +1144,7 @@ settrace (int argc, char **argv)
  * Toggle hash mark printing during transfers.
  */
 void
-sethash (int argc, char **argv)
+sethash (int argc _GL_UNUSED_PARAMETER, char **argv)
 {
   if (argv[1] != NULL)
     sscanf (argv[1], "%d", &hashbytes);
@@ -1162,7 +1162,7 @@ sethash (int argc, char **argv)
  * Turn on printing of server echo's.
  */
 void
-setverbose (int argc, char **argv)
+setverbose (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   verbose = !verbose;
@@ -1174,7 +1174,7 @@ setverbose (int argc, char **argv)
  * Allow any address family.
  */
 void
-setipany (int argc, char **argv)
+setipany (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
   usefamily = AF_UNSPEC;
   printf ("Selecting addresses: %s.\n", "any");
@@ -1185,7 +1185,7 @@ setipany (int argc, char **argv)
  * Restrict to IPv4 addresses.
  */
 void
-setipv4 (int argc, char **argv)
+setipv4 (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
   usefamily = AF_INET;
   printf ("Selecting addresses: %s.\n", "IPv4");
@@ -1196,7 +1196,7 @@ setipv4 (int argc, char **argv)
  * Restrict to IPv6 addresses.
  */
 void
-setipv6 (int argc, char **argv)
+setipv6 (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
   usefamily = AF_INET6;
   printf ("Selecting addresses: %s.\n", "IPv6");
@@ -1207,7 +1207,7 @@ setipv6 (int argc, char **argv)
  * Toggle use of EPRT/EPRT for IPv4.
  */
 void
-setepsv4 (int argc, char **argv)
+setepsv4 (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   doepsv4 = !doepsv4;
@@ -1219,7 +1219,7 @@ setepsv4 (int argc, char **argv)
  * Toggle PORT cmd use before each data connection.
  */
 void
-setport (int argc, char **argv)
+setport (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   sendport = !sendport;
@@ -1232,7 +1232,7 @@ setport (int argc, char **argv)
  * during mget, mput, and mdelete.
  */
 void
-setprompt (int argc, char **argv)
+setprompt (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   interactive = !interactive;
@@ -1245,7 +1245,7 @@ setprompt (int argc, char **argv)
  * on local file names.
  */
 void
-setglob (int argc, char **argv)
+setglob (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   doglob = !doglob;
@@ -1549,7 +1549,7 @@ mls (int argc, char **argv)
  * Do a shell escape
  */
 void
-shell (int argc, char **argv)
+shell (int argc, char **argv _GL_UNUSED_PARAMETER)
 {
   pid_t pid;
   sighandler_t old1, old2;
@@ -1659,7 +1659,7 @@ user (int argc, char **argv)
  * Print working directory.
  */
 void
-pwd (int argc, char **argv)
+pwd (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
   int oldverbose = verbose;
 
@@ -1832,7 +1832,7 @@ rmthelp (int argc, char **argv)
  * Terminate session and exit.
  */
 void
-quit (int argc, char **argv)
+quit (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   if (connected)
@@ -1849,7 +1849,7 @@ quit (int argc, char **argv)
  * Terminate session, but don't exit.
  */
 void
-disconnect (int argc, char **argv)
+disconnect (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   if (!connected)
@@ -1952,7 +1952,7 @@ account (int argc, char **argv)
 jmp_buf abortprox;
 
 void
-proxabort (int sig)
+proxabort (int sig _GL_UNUSED_PARAMETER)
 {
 
   if (!proxy)
@@ -2035,7 +2035,7 @@ doproxy (int argc, char **argv)
 }
 
 void
-setcase (int argc, char **argv)
+setcase (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   mcase = !mcase;
@@ -2044,7 +2044,7 @@ setcase (int argc, char **argv)
 }
 
 void
-setcr (int argc, char **argv)
+setcr (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   crflag = !crflag;
@@ -2109,7 +2109,7 @@ dotrans (char *name)
 }
 
 void
-setpassive (int argc, char **argv)
+setpassive (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   passivemode = !passivemode;
@@ -2338,7 +2338,7 @@ domap (char *name)
 }
 
 void
-setsunique (int argc, char **argv)
+setsunique (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   sunique = !sunique;
@@ -2347,7 +2347,7 @@ setsunique (int argc, char **argv)
 }
 
 void
-setrunique (int argc, char **argv)
+setrunique (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   runique = !runique;
@@ -2357,7 +2357,7 @@ setrunique (int argc, char **argv)
 
 /* change directory to parent directory */
 void
-cdup (int argc, char **argv)
+cdup (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   if (command ("CDUP") == ERROR && code == 500)
@@ -2385,7 +2385,7 @@ restart (int argc, char **argv)
 
 /* show remote system type */
 void
-syst (int argc, char **argv)
+syst (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
 
   command ("SYST");
diff --git a/ftp/ftp.c b/ftp/ftp.c
index 3317055..43dbb36 100644
--- a/ftp/ftp.c
+++ b/ftp/ftp.c
@@ -522,7 +522,7 @@ empty (fd_set *mask, int sec)
 jmp_buf sendabort;
 
 void
-abortsend (int sig)
+abortsend (int sig _GL_UNUSED_PARAMETER)
 {
 
   mflag = 0;
@@ -825,7 +825,7 @@ abort:
 jmp_buf recvabort;
 
 void
-abortrecv (int sig)
+abortrecv (int sig _GL_UNUSED_PARAMETER)
 {
 
   mflag = 0;
@@ -1550,7 +1550,7 @@ tvsub (struct timeval *tdiff, struct timeval *t1, struct timeval *t0)
 }
 
 void
-psabort (int sig)
+psabort (int sig _GL_UNUSED_PARAMETER)
 {
 
   abrtflag++;
@@ -1663,7 +1663,7 @@ pswitch (int flag)
 }
 
 void
-abortpt (int sig)
+abortpt (int sig _GL_UNUSED_PARAMETER)
 {
 
   printf ("\n");
@@ -1805,7 +1805,7 @@ abort:
 }
 
 void
-reset (int argc, char **argv)
+reset (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
 {
   fd_set mask;
   int nfnd = 1;
diff --git a/ftp/main.c b/ftp/main.c
index 5af6187..1c0cdec 100644
--- a/ftp/main.c
+++ b/ftp/main.c
@@ -112,7 +112,7 @@ static struct argp_option argp_options[] = {
 };
 
 static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
+parse_opt (int key, char *arg, struct argp_state *state _GL_UNUSED_PARAMETER)
 {
   switch (key)
     {
diff --git a/src/logger.c b/src/logger.c
index 9f60f1c..5b003f1 100644
--- a/src/logger.c
+++ b/src/logger.c
@@ -40,6 +40,7 @@
 #include <error.h>
 #include <xalloc.h>
 #include <inttostr.h>
+#include <unused-parameter.h>
 
 #define SYSLOG_NAMES
 #include <syslog.h>
@@ -405,7 +406,7 @@ static struct argp_option argp_options[] = {
 };
 
 static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
+parse_opt (int key, char *arg, struct argp_state *state _GL_UNUSED_PARAMETER)
 {
   switch (key)
     {
diff --git a/src/rcp.c b/src/rcp.c
index 08d57fa..71949a1 100644
--- a/src/rcp.c
+++ b/src/rcp.c
@@ -82,6 +82,7 @@
 # include <utime.h>		/* If we don't have utimes(), use utime(). */
 #endif
 #include <progname.h>
+#include <unused-parameter.h>
 #include <libinetutils.h>
 #include <argp.h>
 #include <error.h>
@@ -198,7 +199,7 @@ static struct argp_option options[] = {
 };
 
 static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
+parse_opt (int key, char *arg, struct argp_state *state _GL_UNUSED_PARAMETER)
 {
   switch (key)
     {
@@ -1370,7 +1371,7 @@ allocbuf (BUF * bp, int fd, int blksize)
 }
 
 void
-lostconn (int signo)
+lostconn (int signo _GL_UNUSED_PARAMETER)
 {
   if (!iamremote)
     error (0, 0, "lost connection");
diff --git a/src/rexecd.c b/src/rexecd.c
index ea79c24..ce61cc9 100644
--- a/src/rexecd.c
+++ b/src/rexecd.c
@@ -111,6 +111,7 @@
 #include <progname.h>
 #include <argp.h>
 #include <error.h>
+#include <unused-parameter.h>
 #include "libinetutils.h"
 
 void die (int code, const char *fmt, ...);
@@ -135,7 +136,8 @@ static struct argp_option options[] = {
 };
 
 static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
+parse_opt (int key, char *arg _GL_UNUSED_PARAMETER,
+	   struct argp_state *state _GL_UNUSED_PARAMETER)
 {
   switch (key)
     {
diff --git a/src/rlogind.c b/src/rlogind.c
index 2d42271..cb9a541 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -315,7 +315,8 @@ static struct argp_option options[] = {
 };
 
 static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
+parse_opt (int key, char *arg,
+	   struct argp_state *state _GL_UNUSED_PARAMETER)
 {
   switch (key)
     {
@@ -1249,7 +1250,6 @@ do_shishi_login (int infd, struct auth_data *ad, const char **err_msg)
   if (encrypt_io)
     {
       int i;
-      char *iv;
 
       ad->ivtab[0] = &ad->iv1;
       ad->ivtab[1] = &ad->iv2;
diff --git a/src/rshd.c b/src/rshd.c
index 9a8c6ae..a927342 100644
--- a/src/rshd.c
+++ b/src/rshd.c
@@ -142,6 +142,7 @@
 #include <error.h>
 #include <progname.h>
 #include <argp.h>
+#include <unused-parameter.h>
 #include <libinetutils.h>
 #include "xalloc.h"
 
@@ -246,7 +247,7 @@ extern int iruserok (uint32_t raddr, int superuser,
 #endif /* WITH_PAM */
 
 static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
+parse_opt (int key, char *arg, struct argp_state *state _GL_UNUSED_PARAMETER)
 {
   switch (key)
     {
diff --git a/telnet/commands.c b/telnet/commands.c
index 09b17f4..e6b73d5 100644
--- a/telnet/commands.c
+++ b/telnet/commands.c
@@ -73,6 +73,7 @@
 #include <arpa/inet.h>
 #include <arpa/telnet.h>
 
+#include <unused-parameter.h>
 #include <libinetutils.h>
 
 #include "general.h"
@@ -1554,7 +1555,7 @@ suspend (void)
 
 #if !defined TN3270
 int
-shell (int argc, char *argv[])
+shell (int argc, char *argv[] _GL_UNUSED_PARAMETER)
 {
   long oldrows, oldcols, newrows, newcols, err;
 
diff --git a/telnet/main.c b/telnet/main.c
index 5a679ac..912090b 100644
--- a/telnet/main.c
+++ b/telnet/main.c
@@ -60,6 +60,7 @@
 #include <progname.h>
 #include <error.h>
 #include <argp.h>
+#include <unused-parameter.h>
 #include <libinetutils.h>
 
 #include <arpa/telnet.h>
@@ -194,7 +195,7 @@ static struct argp_option argp_options[] = {
 };
 
 static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
+parse_opt (int key, char *arg, struct argp_state *state _GL_UNUSED_PARAMETER)
 {
   switch (key)
     {
diff --git a/telnet/sys_bsd.c b/telnet/sys_bsd.c
index 2973114..e133cce 100644
--- a/telnet/sys_bsd.c
+++ b/telnet/sys_bsd.c
@@ -63,6 +63,7 @@
 #include <errno.h>
 #include <arpa/telnet.h>
 #include <sys/select.h>
+#include <unused-parameter.h>
 
 #include "ring.h"
 
@@ -940,7 +941,7 @@ NetSetPgrp (int fd)
  */
 
 void
-deadpeer (int sig)
+deadpeer (int sig _GL_UNUSED_PARAMETER)
 {
   setcommandmode ();
   longjmp (peerdied, -1);
@@ -948,7 +949,7 @@ deadpeer (int sig)
 
 
 void
-intr (int sig)
+intr (int sig _GL_UNUSED_PARAMETER)
 {
   if (localchars)
     {
@@ -961,7 +962,7 @@ intr (int sig)
 
 
 void
-intr2 (int sig)
+intr2 (int sig _GL_UNUSED_PARAMETER)
 {
   if (localchars)
     {
@@ -977,7 +978,7 @@ intr2 (int sig)
 
 #ifdef	SIGTSTP
 void
-susp (int sig)
+susp (int sig _GL_UNUSED_PARAMETER)
 {
   if ((rlogin != _POSIX_VDISABLE) && rlogin_susp ())
     return;
@@ -988,7 +989,7 @@ susp (int sig)
 
 #ifdef	SIGWINCH
 void
-sendwin (int sig)
+sendwin (int sig _GL_UNUSED_PARAMETER)
 {
   if (connected)
     {
diff --git a/tests/localhost.c b/tests/localhost.c
index d65dd71..19d5fb8 100644
--- a/tests/localhost.c
+++ b/tests/localhost.c
@@ -22,10 +22,11 @@
 #include "libinetutils.h"
 
 #include <stdio.h>
+#include <unused-parameter.h>
 #include <progname.h>
 
 int
-main (int argc, char **argv)
+main (int argc _GL_UNUSED_PARAMETER, char **argv)
 {
   const char *p = localhost ();
   set_program_name (argv[0]);
diff --git a/whois/whois.c b/whois/whois.c
index 23a90d7..5af351b 100644
--- a/whois/whois.c
+++ b/whois/whois.c
@@ -40,6 +40,7 @@
 #define obstack_chunk_free free
 #include <obstack.h>
 #include <error.h>
+#include <unused-parameter.h>
 #include <libinetutils.h>
 
 /* Application-specific */
@@ -100,7 +101,8 @@ static struct argp_option ripe_argp_options[] = {
 };
 
 static error_t
-ripe_argp_parser (int key, char *arg, struct argp_state *state)
+ripe_argp_parser (int key, char *arg,
+		  struct argp_state *state _GL_UNUSED_PARAMETER)
 {
   if (key > 0 && (unsigned) key < 128)
     {
@@ -137,7 +139,8 @@ static struct argp_option gwhois_argp_options[] = {
 };
 
 static error_t
-gwhois_argp_parser (int key, char *arg, struct argp_state *state)
+gwhois_argp_parser (int key, char *arg,
+		    struct argp_state *state _GL_UNUSED_PARAMETER)
 {
   char *p, *q;
 

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

Summary of changes:
 ChangeLog         |   38 +++++++++++++++++++++++++++++++++
 ftp/cmds.c        |   60 ++++++++++++++++++++++++++--------------------------
 ftp/ftp.c         |   10 ++++----
 ftp/main.c        |    2 +-
 src/logger.c      |    3 +-
 src/rcp.c         |    5 ++-
 src/rexecd.c      |    4 ++-
 src/rlogind.c     |    4 +-
 src/rshd.c        |    3 +-
 telnet/commands.c |    3 +-
 telnet/main.c     |    3 +-
 telnet/sys_bsd.c  |   11 +++++----
 tests/localhost.c |    3 +-
 whois/whois.c     |    7 ++++-
 14 files changed, 103 insertions(+), 53 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Tue Sep 18 15:57:55 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TE3vf-0003Oo-Aq
	for mharc-commit-inetutils@gnu.org; Tue, 18 Sep 2012 15:57:55 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47914)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TE3vc-0003OG-Jr
	for commit-inetutils@gnu.org; Tue, 18 Sep 2012 15:57:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TE3vY-0002c9-M4
	for commit-inetutils@gnu.org; Tue, 18 Sep 2012 15:57:52 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:42188)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TE3vY-0002c4-G0
	for commit-inetutils@gnu.org; Tue, 18 Sep 2012 15:57:48 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1TE3vX-0003b4-KZ
	for commit-inetutils@gnu.org; Tue, 18 Sep 2012 19:57:48 +0000
Date: Tue, 18 Sep 2012 19:57:47 +0000
Message-Id: <E1TE3vX-0003b4-KZ@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-174-g92cabdc
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: ae05f1f506836b7e8b4dc769232937eb0b2cdcfe
X-Git-Newrev: 92cabdc297bae52dc8c7d63647d8fce8dfba30b4
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 18 Sep 2012 19:57: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  92cabdc297bae52dc8c7d63647d8fce8dfba30b4 (commit)
      from  ae05f1f506836b7e8b4dc769232937eb0b2cdcfe (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=92cabdc297bae52dc8c7d63647d8fce8dfba30b4


commit 92cabdc297bae52dc8c7d63647d8fce8dfba30b4
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Mon Sep 17 23:30:57 2012 +0200

    talk, talkd: User interface and security.

diff --git a/ChangeLog b/ChangeLog
index 0230592..31c3092 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2012-09-17  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	talk: Delay start of curses interface until
+	the other party has established a connection.
+
+	* talk/init_disp.c (init_display): Remove assignment
+	of `current_state'.
+	* talk/io.h (p_error): Execute curses function calls
+	only if `curses_initialized' is true.  Otherwise call
+	perror().
+	(message): Likewise, placing a call to printf() for
+	non-empty message strings only.
+	* talk/talk.c (main): Delay call to init_display() until
+	after end_msgs().  New messages set in `current_state'.
+
+	talkd: Enforce access rights on `~/.talkrc'.
+
+	* talkd/acl.c (read_acl): Site-wide file uses `system > 0'.
+	New code block for the parameter case `system < 0', pushing
+	a single, deny-all rule.
+	(open_users_acl): New variables LEVEL, RC and ST.  Check
+	properties of ACL file using stat().  Enforce a deny rule
+	if they are too permissive.
+	* doc/inetutils.texi <talkd invocation>: Updated.
+
 2012-09-15  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	Mark unused parameters as such.
diff --git a/doc/inetutils.texi b/doc/inetutils.texi
index 56eb184..942178a 100644
--- a/doc/inetutils.texi
+++ b/doc/inetutils.texi
@@ -3762,7 +3762,11 @@ length, or as an explicit address mask.
 
 The actual evaluation is run separately for the site-wide ACL,
 and the requested local user ACL contained in the private file
-@file{.talkrc} of this user.
+@file{.talkrc} of this user.  This latter file must be a regular
+file and must be owned by the very same user, have his primary
+group ownership, and not be group or world writeable.  Should
+any of these prerequisites be violated, the user's ACL is replaced
+by a single deny-all rule.
 
 All rules in each set are evaluated, in the sense that whenever
 an expression @code{net-exp} matches the incoming IPv4 address,
diff --git a/talk/init_disp.c b/talk/init_disp.c
index dc58226..a878222 100644
--- a/talk/init_disp.c
+++ b/talk/init_disp.c
@@ -128,8 +128,6 @@ init_display (void)
   line_win = newwin (1, COLS, my_win.x_nlines, 0);
   box (line_win, '-', '-');
   wrefresh (line_win);
-  /* let them know we are working on it */
-  current_state = "No connection yet";
 
   return 0;
 }
diff --git a/talk/io.c b/talk/io.c
index e720573..7502de0 100644
--- a/talk/io.c
+++ b/talk/io.c
@@ -141,33 +141,46 @@ talk (void)
 
 /*
  * p_error prints the system error message on the standard location
- * on the screen and then exits. (i.e. a curses version of perror)
+ * on the screen and then exits, i.e., a curses version of perror.
  */
 int
 p_error (char *string)
 {
-  wmove (my_win.x_win, current_line % my_win.x_nlines, 0);
-  wprintw (my_win.x_win, "[%s : %s (%d)]\n", string, strerror (errno), errno);
-  wrefresh (my_win.x_win);
-  move (LINES - 1, 0);
-  refresh ();
+  if (curses_initialized)
+    {
+      wmove (my_win.x_win, current_line % my_win.x_nlines, 0);
+      wprintw (my_win.x_win, "[%s : %s (%d)]\n",
+	       string, strerror (errno), errno);
+      wrefresh (my_win.x_win);
+      move (LINES - 1, 0);
+      refresh ();
+    }
+  else
+    perror (string);
+
   quit ();
 
   return 0;
 }
 
 /*
- * Display string in the standard location
+ * Display string in the standard location.
  */
 int
 message (char *string)
 {
-  wmove (my_win.x_win, current_line % my_win.x_nlines, 0);
-  wprintw (my_win.x_win, "[%s]", string);
-  wclrtoeol (my_win.x_win);
-  current_line++;
-  wmove (my_win.x_win, current_line % my_win.x_nlines, 0);
-  wrefresh (my_win.x_win);
+  if (curses_initialized)
+    {
+      wmove (my_win.x_win, current_line % my_win.x_nlines, 0);
+      wprintw (my_win.x_win, "[%s]", string);
+      wclrtoeol (my_win.x_win);
+      current_line++;
+      wmove (my_win.x_win, current_line % my_win.x_nlines, 0);
+      wrefresh (my_win.x_win);
+    }
+  else
+    if (string && string[0])
+      printf ("[%s]\n", string);
 
   return 0;
 }
diff --git a/talk/talk.c b/talk/talk.c
index ff7311e..cd6379b 100644
--- a/talk/talk.c
+++ b/talk/talk.c
@@ -79,7 +79,7 @@ const char *program_authors[] =
     NULL
   };
 
-const char doc[] = "talk to another user";
+const char doc[] = "Talk to another user.";
 const char args_doc[] = "person [ttyname]";
 static struct argp argp = { NULL, NULL, args_doc, doc, NULL, NULL, NULL};
 
@@ -102,19 +102,28 @@ main (int argc, char *argv[])
     }
   if (!isatty (0))
     {
-      printf ("Standard input must be a tty, not a pipe or a file\n");
+      printf ("Standard input must be a tty, not a pipe, nor a file.\n");
       exit (-1);
     }
 
   get_names (argc, argv);
-  init_display ();
+
+  /* Let them know we are working on connections.  */
+  current_state = "No connection yet.";
+
   open_ctl ();
   open_sockt ();
+  current_state = "Service connection established.";
+
   start_msgs ();
   if (!check_local ())
     invite_remote ();
   end_msgs ();
+
+  /* Our party is responding.  Upgrade user interface.  */
+  init_display ();
   set_edit_chars ();
+
   talk ();
 }
 
@@ -129,5 +138,5 @@ static const char usage_str[] =
 void
 usage (void)
 {
-  printf ("%s\n" "Send bug reports to <%s>\n", usage_str, PACKAGE_BUGREPORT);
+  printf ("%s\n" "Send bug reports to <%s>.\n", usage_str, PACKAGE_BUGREPORT);
 }
diff --git a/talkd/acl.c b/talkd/acl.c
index e3c7ac3..493541e 100644
--- a/talkd/acl.c
+++ b/talkd/acl.c
@@ -136,13 +136,13 @@ read_acl (char *config_file, int system)
   char buf[128];
   char *ptr;
 
-  if (!config_file)
+  if (!config_file || !config_file[0])
     return;
 
   fp = fopen (config_file, "r");
   if (!fp)
     {
-      if (system)
+      if (system > 0)
 	{
 	  /* A missing, yet specified, site-wide ACL is a serious error.
 	   * Abort execution whenever this happens.
@@ -153,6 +153,53 @@ read_acl (char *config_file, int system)
       return;	/* User setting may fail to exist.  Just ignore.  */
     }
 
+  if (system < 0)
+    {
+      /* Alarmed state, violating file access policy.
+       * Insert a single, general denial equivalent to
+       * a rule reading `deny .* any'.
+       */
+      const char any_user[] = "^.*$";
+      char any_host[] = "any";
+      acl_t *acl;
+      regex_t re;
+      netdef_t *cur;
+
+      fclose (fp);
+      acl = malloc (sizeof *acl);
+
+      if (!acl)
+	{
+	  syslog (LOG_ERR, "Out of memory");
+	  exit (EXIT_FAILURE);
+	}
+      if (regcomp (&re, any_user, 0) != 0)
+	{
+	  syslog (LOG_ERR, "Bad regexp '%s'.", any_user);
+	  exit (EXIT_FAILURE);
+	}
+      cur = netdef_parse (any_host);
+      if (!cur)
+	{
+	  syslog (LOG_ERR, "Cannot parse netdef '%s'.", any_host);
+	  exit (EXIT_FAILURE);
+	}
+
+      acl->next = NULL;
+      acl->action = ACL_DENY;
+      acl->system = 0;
+      acl->re = re;
+      acl->netlist = cur;
+
+      if (!acl_tail)
+	acl_head = acl;
+      else
+	acl_tail->next = acl;
+      acl_tail = acl;
+
+      return;
+    }
+
   line = 0;
   while ((ptr = fgets (buf, sizeof buf, fp)))
     {
@@ -244,8 +291,11 @@ read_acl (char *config_file, int system)
 static acl_t *
 open_users_acl (char *name)
 {
+  int level = 0;	/* Private file, not mandatory.  */
+  int rc;
   char *filename;
   struct passwd *pw;
+  struct stat st;
   acl_t *mark;
 
   pw = getpwnam (name);
@@ -263,8 +313,27 @@ open_users_acl (char *name)
 
   sprintf (filename, "%s/%s", pw->pw_dir, USER_ACL_NAME);
 
+  /* The location must be a file, and must be owned by the
+   * indicated user and his corresponding group.  No write
+   * access by group or world.  Record a syslog warning,
+   * should either of these not be true.
+   */
+  rc = stat (filename, &st);
+  if (rc < 0)
+    return NULL;
+  if (!S_ISREG(st.st_mode)
+      || st.st_uid != pw->pw_uid
+      || st.st_gid != pw->pw_gid
+      || st.st_mode & S_IWGRP
+      || st.st_mode & S_IWOTH)
+    {
+      if (logging || debug)
+	syslog (LOG_WARNING, "Discarding '%s': insecure access.", filename);
+      level = -1;	/* Enforce a deny rule.  */
+    }
+
   mark = acl_tail;
-  read_acl (filename, 0);	/* Private file, not mandatory.  */
+  read_acl (filename, level);
   free (filename);
 
   return mark;

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

Summary of changes:
 ChangeLog          |   25 +++++++++++++++++
 doc/inetutils.texi |    6 +++-
 talk/init_disp.c   |    2 -
 talk/io.c          |   39 ++++++++++++++++++---------
 talk/talk.c        |   17 +++++++++---
 talkd/acl.c        |   75 +++++++++++++++++++++++++++++++++++++++++++++++++--
 6 files changed, 141 insertions(+), 23 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed Sep 19 06:17:55 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TEHLv-0003Nj-Cz
	for mharc-commit-inetutils@gnu.org; Wed, 19 Sep 2012 06:17:55 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54236)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TEHLr-0003Mt-C4
	for commit-inetutils@gnu.org; Wed, 19 Sep 2012 06:17:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TEHLl-0002at-Oa
	for commit-inetutils@gnu.org; Wed, 19 Sep 2012 06:17:51 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:46469)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1TEHLl-0002an-Ko
	for commit-inetutils@gnu.org; Wed, 19 Sep 2012 06:17:45 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1TEHLk-0001Am-RZ
	for commit-inetutils@gnu.org; Wed, 19 Sep 2012 10:17:45 +0000
Date: Wed, 19 Sep 2012 10:17:44 +0000
Message-Id: <E1TEHLk-0001Am-RZ@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-175-gfc8280b
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 92cabdc297bae52dc8c7d63647d8fce8dfba30b4
X-Git-Newrev: fc8280bc58b5575e7187eec77fadfffcc28fde1a
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Sep 2012 10:17:53 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  fc8280bc58b5575e7187eec77fadfffcc28fde1a (commit)
      from  92cabdc297bae52dc8c7d63647d8fce8dfba30b4 (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=fc8280bc58b5575e7187eec77fadfffcc28fde1a


commit fc8280bc58b5575e7187eec77fadfffcc28fde1a
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed Sep 19 12:14:55 2012 +0200

    Consistency checks.

diff --git a/ChangeLog b/ChangeLog
index 31c3092..a1208d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2012-09-19  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	* configure.ac <libwrap check>: Call AC_CHECK_DECLS
+	with hosts_ctl.
+	* ftpd/server_mode.c (hosts_ctl)
+	[WITH_WRAP && !HAVE_DECL_HOSTS_CTL]: Add external
+	prototype whenever undeclared.
+
+	* ftpd/ftpd.c (complete_login): Cast pid_t as int
+	in formatted print.
+	* src/inetd.c (run_service, readchild, print_service)
+	(main): Likewise.
+	* src/syslogd.c (main): Likewise.
+	* src/uucpd.c (dologout, dologin): Likewise.
+	(dologout) [PATH_LASTLOG && HAVE_STRUCT_LASTLOG]:
+	Declare F conditionally.
+
+	* ifconfig/changeif.c: Access `HAVE_DECL_*' using `#if',
+	not using `#ifdef' constructs.
+	* libinetutils/kcmd.c, libinetutils/localhost.c: Likewise.
+	* src/rlogind.c, src/rshd.c: Likewise.
+
 2012-09-17  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	talk: Delay start of curses interface until
diff --git a/configure.ac b/configure.ac
index 2ad090b..63f84dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -550,6 +550,7 @@ if test "$with_wrap" = yes; then
 # for the wrap lib you have to define some global variables.
 #AC_CHECK_LIB(wrap, hosts_ctl, LIBWRAP=-lwrap)
   AC_CHECK_HEADERS([tcpd.h])
+  AC_CHECK_DECLS([hosts_ctl], , , [#include <tcpd.h>])
   AC_MSG_CHECKING(hosts_ctl in -lwrap);
   save_LIBS=$LIBS
   LIBS="$save_LIBS -lwrap"
diff --git a/ftpd/ftpd.c b/ftpd/ftpd.c
index d796fc0..d8a63d9 100644
--- a/ftpd/ftpd.c
+++ b/ftpd/ftpd.c
@@ -656,7 +656,7 @@ complete_login (struct credentials *pcred)
 #endif
 
   /* open wtmp before chroot */
-  snprintf (ttyline, sizeof (ttyline), "ftp%d", getpid ());
+  snprintf (ttyline, sizeof (ttyline), "ftp%d", (int) getpid ());
   logwtmp_keep_open (ttyline, pcred->name, pcred->remotehost);
 
   if (pcred->guest)
diff --git a/ftpd/server_mode.c b/ftpd/server_mode.c
index 7b7771e..113ee79 100644
--- a/ftpd/server_mode.c
+++ b/ftpd/server_mode.c
@@ -54,6 +54,10 @@ static void reapchild (int);
 
 #ifdef WITH_WRAP
 
+# if !HAVE_DECL_HOSTS_CTL
+extern int hosts_ctl (char *, char *, char *, char *);
+# endif
+
 int allow_severity = LOG_INFO;
 int deny_severity = LOG_NOTICE;
 
@@ -204,7 +208,7 @@ server_mode (const char *pidfile, struct sockaddr *phis_addr,
       syslog (LOG_ERR, "can't open %s: %m", PATH_FTPDPID);
     else
       {
-	fprintf (pid_fp, "%d\n", getpid ());
+	fprintf (pid_fp, "%d\n", (int) getpid ());
 	fchmod (fileno (pid_fp), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 	fclose (pid_fp);
       }
diff --git a/ifconfig/changeif.c b/ifconfig/changeif.c
index c474883..1f1f6a8 100644
--- a/ifconfig/changeif.c
+++ b/ifconfig/changeif.c
@@ -52,7 +52,7 @@
       return -1;							\
     }
 
-#ifndef HAVE_DECL_GETADDRINFO
+#if !HAVE_DECL_GETADDRINFO
 extern void herror (const char *pfx);
 #endif
 
@@ -67,7 +67,7 @@ set_address (int sfd, struct ifreq *ifr, char *address)
 	   "don't know how to set an interface address on this system");
   return -1;
 #else
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
   int rc;
   char addr[INET_ADDRSTRLEN];
   struct addrinfo hints, *ai, *res;
diff --git a/libinetutils/kcmd.c b/libinetutils/kcmd.c
index 26ee739..0e280fe 100644
--- a/libinetutils/kcmd.c
+++ b/libinetutils/kcmd.c
@@ -120,7 +120,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short rport, char *locuser,
 # else
   int lport = START_PORT;
 # endif
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
   struct addrinfo hints, *ai, *res;
   char portstr[8], fqdn[NI_MAXHOST];
 # else /* !HAVE_DECL_GETADDRINFO */
@@ -143,7 +143,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short rport, char *locuser,
   else
     host = *ahost;
 
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
   memset (&hints, 0, sizeof (hints));
   hints.ai_family = af;
   hints.ai_socktype = SOCK_STREAM;
@@ -227,7 +227,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short rport, char *locuser,
 # endif /* !HAVE_SIGACTION */
   for (;;)
     {
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
       s = getport (&lport, ai->ai_family);
 # else /* !HAVE_DECL_GETADDRINFO */
       s = getport (&lport, hp->h_addrtype);
@@ -247,7 +247,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short rport, char *locuser,
 	}
       fcntl (s, F_SETOWN, pid);
 
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
       len = ai->ai_addrlen;
       memcpy (&sin, ai->ai_addr, ai->ai_addrlen);
 # else /* !HAVE_DECL_GETADDRINFO */
@@ -293,7 +293,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short rport, char *locuser,
 	  continue;
 	}
 # if ! defined ultrix || defined sun
-#  ifdef HAVE_DECL_GETADDRINFO
+#  if HAVE_DECL_GETADDRINFO
       if (ai->ai_next)
 #  else /* !HAVE_DECL_GETADDRINFO */
       if (hp->h_addr_list[1] != NULL)
@@ -302,7 +302,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short rport, char *locuser,
 	  int oerrno = errno;
 	  char addrstr[INET6_ADDRSTRLEN];
 
-#  ifdef HAVE_DECL_GETADDRINFO
+#  if HAVE_DECL_GETADDRINFO
 	  getnameinfo (ai->ai_addr, ai->ai_addrlen,
 		       addrstr, sizeof (addrstr), NULL, 0,
 		       NI_NUMERICHOST);
@@ -328,7 +328,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short rport, char *locuser,
 	  continue;
 	}
 # endif	/* !(defined(ultrix) || defined(sun)) */
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
       if (errno != ECONNREFUSED)
 	perror (res->ai_canonname);
 
@@ -347,7 +347,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short rport, char *locuser,
 
       return (-1);
     }
-# ifdef HAVE_DECL_GETADDRINFO
+# if HAVE_DECL_GETADDRINFO
   if (res)
     freeaddrinfo (res);
 #endif
diff --git a/libinetutils/localhost.c b/libinetutils/localhost.c
index 1228e08..14e17d6 100644
--- a/libinetutils/localhost.c
+++ b/libinetutils/localhost.c
@@ -78,7 +78,7 @@ localhost (void)
   else
     /* Determine FQDN.  */
     {
-#ifdef HAVE_DECL_GETADDRINFO
+#if HAVE_DECL_GETADDRINFO
       int rc;
       struct addrinfo hints, *res;
       char fqdn[NI_MAXHOST];
diff --git a/src/inetd.c b/src/inetd.c
index bb1181c..51b812b 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -426,7 +426,7 @@ run_service (int ctrl, struct servtab *sep)
   else
     {
       if (debug)
-	fprintf (stderr, "%d execl %s\n", getpid (), sep->se_server);
+	fprintf (stderr, "%d execl %s\n", (int) getpid (), sep->se_server);
       dup2 (ctrl, 0);
       close (ctrl);
       dup2 (0, 1);
@@ -505,7 +505,7 @@ reapchild (int signo _GL_UNUSED_PARAMETER)
       if (pid <= 0)
 	break;
       if (debug)
-	fprintf (stderr, "%d reaped, status %#x\n", pid, status);
+	fprintf (stderr, "%d reaped, status %#x\n", (int) pid, status);
       for (sep = servtab; sep; sep = sep->se_next)
 	if (sep->se_wait == pid)
 	  {
@@ -564,13 +564,15 @@ void
 print_service (const char *action, struct servtab *sep)
 {
   fprintf (stderr,
-	   "%s:%d: %s: %s:%s proto=%s, wait=%d, max=%u, user=%s group=%s builtin=%s server=%s\n",
+	   "%s:%d: %s: %s:%s proto=%s, wait=%d, max=%u, "
+	   "user=%s group=%s builtin=%s server=%s\n",
 	   sep->se_file, sep->se_line,
 	   action,
 	   ISMUX (sep) ? (ISMUXPLUS (sep) ? "tcpmuxplus" : "tcpmux")
 		      : (sep->se_node ? sep->se_node : "*"),
 	   sep->se_service, sep->se_proto,
-	   sep->se_wait, sep->se_max, sep->se_user, sep->se_group,
+	   (int) sep->se_wait, sep->se_max,
+	   sep->se_user, sep->se_group,
 	   sep->se_bi ? sep->se_bi->bi_service : "no",
 	   sep->se_server);
 }
@@ -1947,7 +1949,7 @@ main (int argc, char *argv[], char *envp[])
       {
 	if (debug)
 	  fprintf(stderr, "Using pid-file at \"%s\".\n", pid_file);
-	fprintf (fp, "%d\n", getpid ());
+	fprintf (fp, "%d\n", (int) getpid ());
 	fclose (fp);
       }
     else
diff --git a/src/rlogind.c b/src/rlogind.c
index cb9a541..6e2847c 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -554,7 +554,7 @@ rlogin_daemon (int maxchildren, int port)
 int
 rlogind_auth (int fd, struct auth_data *ap)
 {
-#if defined HAVE_DECL_GETNAMEINFO && defined HAVE_DECL_GETADDRINFO
+#if HAVE_DECL_GETNAMEINFO && HAVE_DECL_GETADDRINFO
   int rc;
   char hoststr[NI_MAXHOST];
 #else
@@ -584,7 +584,7 @@ rlogind_auth (int fd, struct auth_data *ap)
   confirmed = 0;
 
   /* Check the remote host name */
-#ifdef HAVE_DECL_GETNAMEINFO
+#if HAVE_DECL_GETNAMEINFO
   rc = getnameinfo ((struct sockaddr *) &ap->from, ap->fromlen,
 		    hoststr, sizeof (hoststr), NULL, 0, NI_NAMEREQD);
   if (!rc)
@@ -617,7 +617,7 @@ rlogind_auth (int fd, struct auth_data *ap)
   if (verify_hostname || in_local_domain (ap->hostname))
     {
       int match = 0;
-#if defined HAVE_DECL_GETADDRINFO && defined HAVE_DECL_GETNAMEINFO
+#if HAVE_DECL_GETADDRINFO && HAVE_DECL_GETNAMEINFO
       struct addrinfo hints, *ai, *res;
       char astr[INET6_ADDRSTRLEN];
 
diff --git a/src/rshd.c b/src/rshd.c
index a927342..27d4017 100644
--- a/src/rshd.c
+++ b/src/rshd.c
@@ -408,7 +408,7 @@ doit (int sockfd, struct sockaddr *fromp, socklen_t fromlen)
   int cc, nfd, pv[2], pid, s = sockfd;
   int rc, one = 1;
   char portstr[8], addrstr[INET6_ADDRSTRLEN];
-#ifdef HAVE_DECL_GETNAMEINFO
+#if HAVE_DECL_GETNAMEINFO
   char addrname[NI_MAXHOST];
 #else /* !HAVE_DECL_GETNAMEINFO */
   struct hostent *hp;
@@ -462,7 +462,7 @@ doit (int sockfd, struct sockaddr *fromp, socklen_t fromlen)
   }
 #endif
 
-#ifdef HAVE_DECL_GETNAMEINFO
+#if HAVE_DECL_GETNAMEINFO
   rc = getnameinfo (fromp, fromlen,
 		    addrstr, sizeof (addrstr),
 		    portstr, sizeof (portstr),
@@ -661,7 +661,7 @@ doit (int sockfd, struct sockaddr *fromp, socklen_t fromlen)
    * used for the authentication below.
    */
   errorstr = NULL;
-#ifdef HAVE_DECL_GETNAMEINFO
+#if HAVE_DECL_GETNAMEINFO
   rc = getnameinfo (fromp, fromlen, addrname, sizeof (addrname),
 		    NULL, 0, NI_NAMEREQD);
   if (rc == 0)
diff --git a/src/syslogd.c b/src/syslogd.c
index 01a97de..37dfd8a 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -632,7 +632,7 @@ main (int argc, char *argv[])
   fp = fopen (PidFile, "w");
   if (fp != NULL)
     {
-      fprintf (fp, "%d\n", getpid ());
+      fprintf (fp, "%d\n", (int) getpid ());
       fclose (fp);
     }
 
diff --git a/src/uucpd.c b/src/uucpd.c
index d811682..70b38cd 100644
--- a/src/uucpd.c
+++ b/src/uucpd.c
@@ -229,7 +229,7 @@ dologout (void)
 #endif /* HAVE_WAITPID */
     {
       char line[100];
-      sprintf (line, "uucp%.4d", pid);
+      sprintf (line, "uucp%.4d", (int) pid);
 #ifdef HAVE_LOGWTMPX
       logwtmpx (line, "", "", 0, DEAD_PROCESS);
 #elif defined HAVE_LOGWTMP
@@ -265,7 +265,9 @@ dologin (struct passwd *pw, struct sockaddr_in *sin)
 {
   char line[32];
   char remotehost[32];
+#if defined PATH_LASTLOG && defined HAVE_STRUCT_LASTLOG
   int f;
+#endif
   struct hostent *hp = gethostbyaddr ((char *) &sin->sin_addr,
 				      sizeof (struct in_addr), AF_INET);
 
@@ -277,7 +279,7 @@ dologin (struct passwd *pw, struct sockaddr_in *sin)
   else
     strncpy (remotehost, inet_ntoa (sin->sin_addr), sizeof (remotehost));
 
-  sprintf (line, "uucp%.4d", getpid ());
+  sprintf (line, "uucp%.4d", (int) getpid ());
 
 #ifdef HAVE_LOGWTMPX
   logwtmpx (line, pw->pw_name, remotehost, 0, USER_PROCESS);

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

Summary of changes:
 ChangeLog                |   22 ++++++++++++++++++++++
 configure.ac             |    1 +
 ftpd/ftpd.c              |    2 +-
 ftpd/server_mode.c       |    6 +++++-
 ifconfig/changeif.c      |    4 ++--
 libinetutils/kcmd.c      |   16 ++++++++--------
 libinetutils/localhost.c |    2 +-
 src/inetd.c              |   12 +++++++-----
 src/rlogind.c            |    6 +++---
 src/rshd.c               |    6 +++---
 src/syslogd.c            |    2 +-
 src/uucpd.c              |    6 ++++--
 12 files changed, 58 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Thu Sep 27 18:47:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1THMsB-0000QE-SX
	for mharc-commit-inetutils@gnu.org; Thu, 27 Sep 2012 18:47:59 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44463)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1THMs8-0000Pz-M5
	for commit-inetutils@gnu.org; Thu, 27 Sep 2012 18:47:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1THMs6-0005q2-Kr
	for commit-inetutils@gnu.org; Thu, 27 Sep 2012 18:47:56 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:48871)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1THMs6-0005pv-GX
	for commit-inetutils@gnu.org; Thu, 27 Sep 2012 18:47:54 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1THMs5-0003WX-QK
	for commit-inetutils@gnu.org; Thu, 27 Sep 2012 22:47:53 +0000
Date: Thu, 27 Sep 2012 22:47:53 +0000
Message-Id: <E1THMs5-0003WX-QK@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-177-g108417e
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: fc8280bc58b5575e7187eec77fadfffcc28fde1a
X-Git-Newrev: 108417e11156e3d1c5256bb31d58e893e280f313
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Sep 2012 22:47:58 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  108417e11156e3d1c5256bb31d58e893e280f313 (commit)
       via  63d9bb0f224fd979f79da4204b3083697cf9e31e (commit)
      from  fc8280bc58b5575e7187eec77fadfffcc28fde1a (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=108417e11156e3d1c5256bb31d58e893e280f313


commit 108417e11156e3d1c5256bb31d58e893e280f313
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Thu Sep 27 23:54:36 2012 +0200

    rlogin: Signal protection issues.
    
    Attempt consistent signal handling for all
    supported systems.  Also influencing window
    resizing and its IPC.

diff --git a/ChangeLog b/ChangeLog
index 8b421fa..8df810c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2012-09-27  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	rlogin, rlogind: Signal dispositions.
+	Use a more portable signal API.
+
+	* libinetutils/libinetutils.h: Include <signal.h>.
+	(setsig): New prototype, exposing old function.
+
+	rlogin: Old signal API is inconsistent, even between
+	libc6 versions.
+
+	* src/rlogin.c (setsig): Remove external prototype.
+	(main): New variable SA.  Use STDIN_FILENO, not 0.
+	Call sigaction() with SIGURG, SIGUSR1, not setsig().
+	Pass `&osmask' to doit(), needed for window sizing.
+	(doit): Rename parameter as `osmask' for clarity.
+	New variable SA.  Call sigaction for SIGINT, SIGCHLD.
+	(setsignal): Fully reworked implementation.
+	(writeroob): New variable SA.  Use sigaction().
+	(oob): Use STDOUT_FILENO, not 1.  Offer ioctl TCIOFLUSH
+	for systems lacking TIOCFLUSH.
+	(reader): Rename parameter as `osmask'.  New variable SA.
+	Assume that contemporary getpid() returns positive values.
+	Call fcntl(F_SETOWN) as early as possible.  Use sigaction()
+	for SIGTTOU, SIGURG.
+	(lostpeer): Use input parameter in setsig().
+	(copytochild): Likewise for kill().
+
+	* src/rlogind.c (rlogind_sigchld): Rename parameter.
+	Replace signal() by setsig().
+	(main, rlogin_daemon, rlogind_mainloop, protocol):
+	Replace signal().
+
 2012-09-25  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	Disable incompatible utmpx implementation.
diff --git a/libinetutils/libinetutils.h b/libinetutils/libinetutils.h
index 9286383..5dc329d 100644
--- a/libinetutils/libinetutils.h
+++ b/libinetutils/libinetutils.h
@@ -22,7 +22,9 @@
 #endif
 
 #include "argp-version-etc.h"
+#include <signal.h>
 
+sighandler_t setsig (int sig, sighandler_t handler);
 void utmp_init (char *line, char *user, char *id, char *host);
 char *utmp_ptsid (char *line, char *tag);
 void utmp_logout (char *line);
diff --git a/src/rlogin.c b/src/rlogin.c
index a2ab0bf..569245e 100644
--- a/src/rlogin.c
+++ b/src/rlogin.c
@@ -193,7 +193,7 @@ struct winsize
 };
 
 int get_window_size (int, struct winsize *);
-#else
+#else /* !OLDSUN */
 # define get_window_size(fd, wp)	ioctl (fd, TIOCGWINSZ, wp)
 #endif
 struct winsize winsize;
@@ -221,8 +221,6 @@ void writeroob (int);
 void warning (const char *, ...);
 #endif
 
-extern sighandler_t setsig (int, sighandler_t);
-
 const char args_doc[] = "HOST";
 const char doc[] = "Starts a terminal session on a remote host.";
 
@@ -335,6 +333,7 @@ main (int argc, char *argv[])
 {
   struct passwd *pw;
   struct servent *sp;
+  struct sigaction sa;
   sigset_t smask, osmask;
   uid_t uid;
   int index;
@@ -416,7 +415,7 @@ main (int argc, char *argv[])
      terminal's speed.  The name and the speed are passed to the server
      as the argument "cmd" of the rcmd() function.  This is something like
      "vt100/9600".  */
-  term_speed = speed (0);
+  term_speed = speed (STDIN_FILENO);
   if (term_speed == SPEED_NOTATTY)
     {
       char *p;
@@ -429,13 +428,21 @@ main (int argc, char *argv[])
       snprintf (term, sizeof term, "%s/%d",
 		((p = getenv ("TERM")) ? p : "network"), term_speed);
     }
-  get_window_size (0, &winsize);
+  get_window_size (STDIN_FILENO, &winsize);
 
-  setsig (SIGPIPE, lostpeer);
+  setsig (SIGPIPE, lostpeer);	/* XXX: Replace setsig()?  */
 
-  /* Block SIGURG and SIGUSR1 signals.  These will be handled by the
-     parent and the child after the fork.  */
-  /* Will be using SIGUSR1 for window size hack, so hold it off.  */
+  /*
+   * Block SIGURG and SIGUSR1 signals during connection setup.
+   * These signals will be handled distinctly by parent and child
+   * after completion of process forking.
+   *
+   * SIGUSR1 will be be raise by the child for the parent process,
+   * in order that the client's finding of window size be transmitted
+   * to the remote machine.
+   *
+   * osmask will be passed along as the desired runtime signal mask.
+   */
   sigemptyset (&smask);
   sigemptyset (&osmask);
   sigaddset (&smask, SIGURG);
@@ -443,13 +450,17 @@ main (int argc, char *argv[])
   sigprocmask (SIG_SETMASK, &smask, &osmask);
 
   /*
-   * We set SIGURG and SIGUSR1 below so that an
+   * We set disposition for SIGURG and SIGUSR1 so that an
    * incoming signal will be held pending rather than being
    * discarded. Note that these routines will be ready to get
-   * a signal by the time that they are unblocked below.
+   * a signal by the time that they are unblocked later on.
    */
-  setsig (SIGURG, copytochild);
-  setsig (SIGUSR1, writeroob);
+  sigemptyset (&sa.sa_mask);
+  sa.sa_flags = 0;
+  sa.sa_handler = copytochild;
+  (void) sigaction (SIGURG, &sa, NULL);
+  sa.sa_handler = writeroob;
+  (void) sigaction (SIGUSR1, &sa, NULL);
 
 #if defined KERBEROS || defined SHISHI
 try_connect:
@@ -635,7 +646,7 @@ try_connect:
   seteuid (uid);
   setuid (uid);
 
-  doit (&smask);
+  doit (&osmask);	/* The old mask will activate SIGURG and SIGUSR1!  */
 
   return 0;
 }
@@ -747,9 +758,10 @@ struct termios ixon_state;
 struct termios nott;
 
 void
-doit (sigset_t * smask)
+doit (sigset_t * osmask)
 {
   int i;
+  struct sigaction sa;
 
   for (i = 0; i < NCCS; i++)
     nott.c_cc[i] = _POSIX_VDISABLE;
@@ -757,7 +769,11 @@ doit (sigset_t * smask)
   nott.c_cc[VSTART] = deftt.c_cc[VSTART];
   nott.c_cc[VSTOP] = deftt.c_cc[VSTOP];
 
-  setsig (SIGINT, SIG_IGN);
+  sigemptyset (&sa.sa_mask);
+  sa.sa_flags = SA_RESTART;
+  sa.sa_handler = SIG_IGN;
+  (void) sigaction (SIGINT, &sa, NULL);
+
   setsignal (SIGHUP);
   setsignal (SIGQUIT);
 
@@ -770,7 +786,7 @@ doit (sigset_t * smask)
   if (child == 0)
     {
       mode (1);
-      if (reader (smask) == 0)
+      if (reader (osmask) == 0)
 	{
 	  /* If the reader returns zero, the socket to the server returned
 	     an EOF, meaning the client logged out of the remote system.
@@ -811,9 +827,10 @@ doit (sigset_t * smask)
    * that were set above.
    */
   /* Reenable SIGURG and SIGUSR1.  */
-  sigprocmask (SIG_SETMASK, smask, (sigset_t *) 0);
+  sigprocmask (SIG_SETMASK, osmask, (sigset_t *) 0);
 
-  setsig (SIGCHLD, catch_child);
+  sa.sa_handler = catch_child;
+  (void) sigaction (SIGCHLD, &sa, NULL);
 
   writer ();
 
@@ -843,24 +860,28 @@ doit (sigset_t * smask)
   done (0);
 }
 
-/* Enable a signal handler, unless the signal is already being ignored.
-   This function is called before the fork (), for SIGHUP and SIGQUIT.  */
+/*
+ * Install an exit handler, unless the signal is already being ignored.
+   This function is called before fork () for SIGHUP and SIGQUIT.  */
 void
 setsignal (int sig)
 {
-  sighandler_t handler;
-  sigset_t sigs, osigs;
-
-  sigemptyset (&sigs);
-  sigemptyset (&osigs);
-  sigaddset (&sigs, sig);
-  sigprocmask (SIG_BLOCK, &sigs, &osigs);
-
-  handler = setsig (sig, exit);
-  if (handler == SIG_IGN)
-    setsig (sig, handler);
-
-  sigprocmask (SIG_SETMASK, &osigs, (sigset_t *) 0);
+  int rc;
+  struct sigaction sa;
+
+  /* Query the present disposition of SIG.
+   * This achieves minimal manipulation.  */
+  sa.sa_flags = 0;
+  sa.sa_handler = NULL;
+  sigemptyset (&sa.sa_mask);
+  rc = sigaction (sig, NULL, &sa);
+
+  /* Set action to exit, unless the signal is ignored.  */
+  if (!rc && sa.sa_handler != SIG_IGN)
+    {
+      sa.sa_handler = _exit;
+      (void) sigaction (sig, &sa, NULL);
+    }
 }
 
 /* This function is called by the parent:
@@ -880,7 +901,7 @@ done (int status)
   if (child > 0)
     {
       /* make sure catch_child does not snap it up */
-      setsig (SIGCHLD, SIG_DFL);
+      setsig (SIGCHLD, SIG_DFL);		/* XXX: Replace setsig()?  */
       if (kill (child, SIGKILL) >= 0)
 	while ((w = waitpid (-1, &wstatus, WNOHANG)) > 0 && w != child)
 	  continue;
@@ -894,6 +915,8 @@ int dosigwinch;
  * This is called when the reader process gets the out-of-band (urgent)
  * request to turn on the window-changing protocol.
  *
+ * Input signal is SIGUSR1, but SIGWINCH is being activated.
+ *
  * FIXME: Race condition due to sendwindow() in signal handler?
  */
 void
@@ -901,8 +924,14 @@ writeroob (int signo _GL_UNUSED_PARAMETER)
 {
   if (dosigwinch == 0)
     {
+      struct sigaction sa;
+
       sendwindow ();
-      setsig (SIGWINCH, sigwinch);
+
+      sa.sa_flags = SA_RESTART;
+      sa.sa_handler = sigwinch;
+      sigemptyset (&sa.sa_mask);
+      (void) sigaction (SIGWINCH, &sa, NULL);
     }
   dosigwinch = 1;
 }
@@ -1067,7 +1096,7 @@ void
 stop (char cmdc)
 {
   mode (0);
-  setsig (SIGCHLD, SIG_IGN);
+  setsig (SIGCHLD, SIG_IGN);		/* XXX: Replace setsig()?  */
   kill (cmdc == deftt.c_cc[VSUSP] ? 0 : getpid (), SIGTSTP);
   setsig (SIGCHLD, catch_child);
   mode (1);
@@ -1197,8 +1226,11 @@ oob (int signo _GL_UNUSED_PARAMETER)
     }
   if (mark & TIOCPKT_FLUSHWRITE)
     {
-#ifdef TIOCFLUSH
-      ioctl (1, TIOCFLUSH, (char *) &out);
+#ifdef TIOCFLUSH		/* BSD and Solaris.  */
+      ioctl (STDOUT_FILENO, TIOCFLUSH, (char *) &out);
+#elif defined TCIOFLUSH		/* Glibc, BSD, and Solaris.  */
+      out = TCIOFLUSH;
+      ioctl (STDOUT_FILENO, TCIOFLUSH, &out);
 #endif
       for (;;)
 	{
@@ -1236,25 +1268,27 @@ oob (int signo _GL_UNUSED_PARAMETER)
 
 /* reader: read from remote: line -> 1 */
 int
-reader (sigset_t * smask)
+reader (sigset_t * osmask)
 {
   pid_t pid;
   int n, remaining;
   char *bufp;
+  struct sigaction sa;
 
-#if BSD >= 43 || defined SUNOS4
-  pid = getpid ();		/* modern systems use positives for pid */
-#else
-  pid = -getpid ();		/* old broken systems use negatives */
-#endif
+  pid = getpid ();	/* Modern systems use positive values for pid.  */
+  ppid = getppid ();
 
-  setsig (SIGTTOU, SIG_IGN);
-  setsig (SIGURG, oob);
+  fcntl (rem, F_SETOWN, pid);		/* Get ownership early.  */
+
+  sa.sa_flags = SA_RESTART;
+  sa.sa_handler = SIG_IGN;
+  sigemptyset (&sa.sa_mask);
+  (void) sigaction (SIGTTOU, &sa, NULL);
+  sa.sa_handler = oob;
+  (void) sigaction (SIGURG, &sa, NULL);
 
-  ppid = getppid ();
-  fcntl (rem, F_SETOWN, pid);
   setjmp (rcvtop);
-  sigprocmask (SIG_SETMASK, smask, (sigset_t *) 0);
+  sigprocmask (SIG_SETMASK, osmask, (sigset_t *) 0);
   bufp = rcvbuf;
 
   for (;;)
@@ -1349,18 +1383,18 @@ mode (int f)
 /* FIXME: Race condition due to done() in signal handler?
  */
 void
-lostpeer (int signo _GL_UNUSED_PARAMETER)
+lostpeer (int signo)
 {
-  setsig (SIGPIPE, SIG_IGN);
+  setsig (signo, SIG_IGN);	/* Used with SIGPIPE only.  */
   error (0, 0, "\007Connection to %s lost.\r", host);
   done (1);
 }
 
 /* copy SIGURGs to the child process. */
 void
-copytochild (int signo _GL_UNUSED_PARAMETER)
+copytochild (int signo)
 {
-  kill (child, SIGURG);
+  kill (child, signo);
 }
 
 #if defined KERBEROS || defined SHISHI
diff --git a/src/rlogind.c b/src/rlogind.c
index 6e2847c..f5eda15 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -222,14 +222,14 @@ int do_shishi_login (int infd, struct auth_data *ad, const char **err_msg);
 #endif
 
 void
-rlogind_sigchld (int sig)
+rlogind_sigchld (int signo)
 {
   pid_t pid;
   int status;
 
   while ((pid = waitpid (-1, &status, WNOHANG)) > 0)
     --numchildren;
-  signal (sig, rlogind_sigchld);
+  setsig (signo, rlogind_sigchld);
 }
 
 #if defined KERBEROS && defined ENCRYPTION
@@ -417,7 +417,7 @@ main (int argc, char *argv[])
       exit (EXIT_FAILURE);
     }
 
-  signal (SIGHUP, SIG_IGN);
+  setsig (SIGHUP, SIG_IGN);
 
   if (!local_domain_name)
     {
@@ -479,7 +479,7 @@ rlogin_daemon (int maxchildren, int port)
       fatal (fileno (stderr), "fork failed, exiting", 0);
     }
 
-  signal (SIGCHLD, rlogind_sigchld);
+  setsig (SIGCHLD, rlogind_sigchld);
 
   listenfd = socket (AF_INET, SOCK_STREAM, 0);
 
@@ -921,9 +921,9 @@ rlogind_mainloop (int infd, int outfd)
   ioctl (master, FIONBIO, &true);
   ioctl (master, TIOCPKT, &true);
   netf = infd;			/* Needed for cleanup() */
-  signal (SIGCHLD, cleanup);
+  setsig (SIGCHLD, cleanup);
   protocol (infd, master, &auth_data);
-  signal (SIGCHLD, SIG_IGN);
+  setsig (SIGCHLD, SIG_IGN);
   cleanup (0);
 
 #ifdef SHISHI
@@ -1458,7 +1458,7 @@ protocol (int f, int p, struct auth_data *ap)
    * when we try and set slave pty's window shape
    * (our controlling tty is the master pty).
    */
-  signal (SIGTTOU, SIG_IGN);
+  setsig (SIGTTOU, SIG_IGN);
 #ifdef SHISHI
   if (kerberos && (ap->protocol == 2))
     {

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


commit 63d9bb0f224fd979f79da4204b3083697cf9e31e
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Tue Sep 25 23:00:48 2012 +0200

    Discard strange utmpx.
    
    FreeBSD 9.0 changed to a non-standard utmpx
    interface.  Disable unsupported servers.

diff --git a/ChangeLog b/ChangeLog
index a1208d5..8b421fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-09-25  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	Disable incompatible utmpx implementation.
+
+	* configure.ac <*-freebsd9* || *-freebsd10*>:
+	Disable building of ftpd, rlogind, syslogd,
+	talkd, telnetd, and uucpd.
+
 2012-09-19  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	* configure.ac <libwrap check>: Call AC_CHECK_DECLS
diff --git a/configure.ac b/configure.ac
index 63f84dd..e348aff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -963,6 +963,17 @@ AH_BOTTOM(
 # entry in utmpx.  Also for some OS they are better handled with
 # STREAMS.
 case "$host" in
+*-freebsd9* | *-freebsd10*)
+  # FreeBSD 9.0 has implemented a non-standard and singular
+  # UTMPX interface.  We do not support it, nor does the
+  # readutmp module from GNUlib.
+  enable_ftpd=no  ftpd_BUILD=''
+  enable_rlogind=no  rlogind_BUILD=''
+  enable_syslogd=no  syslogd_BUILD=''
+  enable_talkd=no  talkd_BUILD=''
+  enable_telnetd=no  telnetd_BUILD=''
+  enable_uucpd=no  uucpd_BUILD=''
+  ;;
 *olaris*)
   AC_DEFINE([SOLARIS], 1, [FIXME])
   AC_DEFINE([HAVE_STREAMSPTY], 1, [FIXME])

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

Summary of changes:
 ChangeLog                   |   41 ++++++++++++
 configure.ac                |   11 +++
 libinetutils/libinetutils.h |    2 +
 src/rlogin.c                |  142 ++++++++++++++++++++++++++----------------
 src/rlogind.c               |   14 ++--
 5 files changed, 149 insertions(+), 61 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Fri Sep 28 18:55:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1THjTC-0004yW-Hy
	for mharc-commit-inetutils@gnu.org; Fri, 28 Sep 2012 18:55:42 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33103)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1THjT9-0004yQ-7Z
	for commit-inetutils@gnu.org; Fri, 28 Sep 2012 18:55:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1THjT7-00087x-61
	for commit-inetutils@gnu.org; Fri, 28 Sep 2012 18:55:39 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:39471)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1THjT7-00087r-26
	for commit-inetutils@gnu.org; Fri, 28 Sep 2012 18:55:37 -0400
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1THjT5-0000Gk-Vz
	for commit-inetutils@gnu.org; Fri, 28 Sep 2012 22:55:36 +0000
Date: Fri, 28 Sep 2012 22:55:36 +0000
Message-Id: <E1THjT5-0000Gk-Vz@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-178-g303e246
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 108417e11156e3d1c5256bb31d58e893e280f313
X-Git-Newrev: 303e2467054ace8a8951d42ae28e714a67059295
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Sep 2012 22:55:41 -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  303e2467054ace8a8951d42ae28e714a67059295 (commit)
      from  108417e11156e3d1c5256bb31d58e893e280f313 (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=303e2467054ace8a8951d42ae28e714a67059295


commit 303e2467054ace8a8951d42ae28e714a67059295
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sat Sep 29 00:18:49 2012 +0200

    rlogind: Daemon mode update.
    
    IPv6 capability and a SIGCHLD issue.

diff --git a/ChangeLog b/ChangeLog
index 8df810c..21836c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2012-09-28  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	rlogind: Daemon mode update.
+
+	Reinstalling an identical signal action was needed
+	on legacy systems.  Made obsolete by setsig().
+
+	* src/rlogind.c (rlogind_sigchld): Remove call to
+	setsig() for reactivation.  Use _GL_UNUSED_PARAMETER.
+
+	Make daemon mode able to do IPv4 and IPv6, but only
+	if getaddrinfo() is available.  Use two sockets for
+	better portability.
+
+	* src/rlogind.c (use_af): New variable.
+	(options): New switches `-4/--ipv4' and `-6/--ipv6'.
+	Expose optional argument for `-d/--daemon'.
+	(parse_opt) <'4', '6'>: New cases.
+	(find_listenfd): New function, generating sockets
+	for rlogin_daemon().
+	(rlogin_daemon): Use select() on at most two
+	listening sockets.  Let `use_af' determine IPv4
+	and/or IPv6.  New variables LISTENFD[2], NUMFD,
+	MAXFD, LFDSET.
+
 2012-09-27  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	rlogin, rlogind: Signal dispositions.
@@ -21,8 +46,8 @@
 	for systems lacking TIOCFLUSH.
 	(reader): Rename parameter as `osmask'.  New variable SA.
 	Assume that contemporary getpid() returns positive values.
-	Call fcntl(F_SETOWN) as early as possible.  Use sigaction()
-	for SIGTTOU, SIGURG.
+	Call fcntl(F_SETOWN) as early as possible, and set owner
+	using PID, not PPID.  Use sigaction() for SIGTTOU, SIGURG.
 	(lostpeer): Use input parameter in setsig().
 	(copytochild): Likewise for kill().
 
diff --git a/src/rlogind.c b/src/rlogind.c
index f5eda15..9e16cfc 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -169,6 +169,7 @@ struct auth_data
 #define MODE_DAEMON 1
 int mode = MODE_INETD;
 
+int use_af = AF_UNSPEC;
 int port = 0;
 int maxchildren = DEFMAXCHILDREN;
 int allow_root = 0;
@@ -222,14 +223,13 @@ int do_shishi_login (int infd, struct auth_data *ad, const char **err_msg);
 #endif
 
 void
-rlogind_sigchld (int signo)
+rlogind_sigchld (int signo _GL_UNUSED_PARAMETER)
 {
   pid_t pid;
   int status;
 
   while ((pid = waitpid (-1, &status, WNOHANG)) > 0)
     --numchildren;
-  setsig (signo, rlogind_sigchld);
 }
 
 #if defined KERBEROS && defined ENCRYPTION
@@ -278,12 +278,18 @@ const char *program_authors[] = {
 
 static struct argp_option options[] = {
 #define GRP 10
+  { "ipv4", '4', NULL, 0,
+    "daemon mode only accepts IPv4", GRP },
+#ifdef IPV6
+  { "ipv6", '6', NULL, 0,
+    "only IPv6 in daemon mode", GRP },
+#endif
   { "allow-root", 'o', NULL, 0,
-    "allow uid == 0 to login, disabled by default", GRP },
+    "allow uid 0 to login, disabled by default", GRP },
   { "verify-hostname", 'a', NULL, 0,
     "ask hostname for verification", GRP },
-  { "daemon", 'd', NULL, 0,
-    "daemon mode", GRP },
+  { "daemon", 'd', "MAX", OPTION_ARG_OPTIONAL,
+    "daemon mode, with instance limit", GRP },
 #ifdef HAVE___CHECK_RHOSTS_FILE
   { "no-rhosts", 'l', NULL, 0,
     "ignore .rhosts file", GRP },
@@ -320,6 +326,16 @@ parse_opt (int key, char *arg,
 {
   switch (key)
     {
+    case '4':
+      use_af = AF_INET;
+      break;
+
+#ifdef IPV6
+    case '6':
+      use_af = AF_INET6;
+      break;
+#endif
+
     case 'a':
       verify_hostname = 1;
       break;
@@ -449,15 +465,102 @@ main (int argc, char *argv[])
   return 0;
 }
 
-/* FIXME: Migrate to IPv6 supported listener.  */
+/* Create a listening socket for the indicated
+ * address family and port.  Then bind a wildcard
+ * address to it.
+ */
+int
+find_listenfd (int family, int port)
+{
+  int fd, on = 1;
+  socklen_t size;
+#if HAVE_DECL_GETADDRINFO
+  int rc;
+  struct sockaddr_storage saddr;
+  struct addrinfo hints, *ai, *res;
+  char portstr[16];
+#else /* !HAVE_DECL_GETADDRINFO */
+  struct sockaddr_in saddr;
+
+  /* Enforce IPv4, lacking getaddrinfo().  */
+  if (family != AF_INET)
+    return -1;
+#endif
+
+#if HAVE_DECL_GETADDRINFO
+  memset (&hints, 0, sizeof hints);
+  hints.ai_family = family;
+  hints.ai_flags = AI_PASSIVE;
+  hints.ai_socktype = SOCK_STREAM;
+  snprintf (portstr, sizeof portstr, "%u", port);
+
+  rc = getaddrinfo (NULL, portstr, &hints, &res);
+  if (rc)
+    {
+      syslog (LOG_ERR, "getaddrinfo: %s", gai_strerror (rc));
+      return -1;
+    }
+
+  /* Passive socket, so grab the first relevant answer.  */
+  for (ai = res; ai; ai = ai->ai_next)
+    if (ai->ai_family == family)
+      break;
+
+  if (ai == NULL)
+    {
+      syslog (LOG_ERR, "address family not available");
+      freeaddrinfo (res);
+      return -1;
+    }
+
+  size = ai->ai_addrlen;
+  memcpy (&saddr, ai->ai_addr, ai->ai_addrlen);
+  freeaddrinfo (res);
+
+#else /* !HAVE_DECL_GETADDRINFO */
+  size = sizeof saddr;
+  memset (&saddr, 0, size);
+  saddr.sin_family = family;
+# ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
+  saddr.sin_len = sizeof (struct sockaddr_in);
+# endif
+  saddr.sin_addr.s_addr = htonl (INADDR_ANY);
+  saddr.sin_port = htons (port);
+#endif
+
+  fd = socket (family, SOCK_STREAM, 0);
+  if (fd < 0)
+    return -1;
+
+  (void) setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof on);
+
+#ifdef IPV6
+  /* Make it a single ended socket.  */
+  if (family == AF_INET6)
+    (void) setsockopt (fd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof on);
+#endif
+
+  if (bind (fd, (struct sockaddr *) &saddr, size) == -1)
+    {
+      syslog (LOG_ERR, "bind: %s", strerror (errno));
+      close (fd);
+      return -1;
+    }
+
+  if (listen (fd, 128) == -1)
+    {
+      syslog (LOG_ERR, "listen: %s", strerror (errno));
+      close (fd);
+      return -1;
+    }
+
+  return fd;
+}
 
 void
 rlogin_daemon (int maxchildren, int port)
 {
-  pid_t pid;
-  socklen_t size;
-  struct sockaddr_in saddr;
-  int listenfd, fd;
+  int listenfd[2], fd, numfd, maxfd;
 
   if (port == 0)
     {
@@ -470,9 +573,9 @@ rlogin_daemon (int maxchildren, int port)
 	port = DEFPORT;
     }
 
-  /* Become a daemon. Take care to close inherited fds and to hold
-     first three one, lest master/slave ptys clash with standard
-     in,out,err   */
+  /* Become a daemon. Take care to close inherited fds and reserve
+     the first three, lest master/slave ptys may clash with standard
+     input, output, or error.  */
   if (daemon (0, 0) < 0)
     {
       syslog (LOG_ERR, "failed to become a daemon %s", strerror (errno));
@@ -481,44 +584,39 @@ rlogin_daemon (int maxchildren, int port)
 
   setsig (SIGCHLD, rlogind_sigchld);
 
-  listenfd = socket (AF_INET, SOCK_STREAM, 0);
+  numfd = maxfd = 0;
 
-  if (listenfd == -1)
+  if ((use_af == AF_UNSPEC) || (use_af == AF_INET))
     {
-      syslog (LOG_ERR, "socket: %s", strerror (errno));
-      exit (EXIT_FAILURE);
+      fd = find_listenfd (AF_INET, port);
+      if (fd >= 0)
+	listenfd[numfd++] = maxfd = fd;
     }
 
-  {
-    int on = 1;
-
-    setsockopt (listenfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof on);
-  }
-
-  size = sizeof saddr;
-  memset (&saddr, 0, size);
-  saddr.sin_family = AF_INET;
-#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
-  saddr.sin_len = sizeof (struct sockaddr_in);
-#endif
-  saddr.sin_addr.s_addr = htonl (INADDR_ANY);
-  saddr.sin_port = htons (port);
-
-  size = sizeof saddr;
-  if (bind (listenfd, (struct sockaddr *) &saddr, size) == -1)
+#ifdef IPV6
+  if ((use_af == AF_UNSPEC) || (use_af == AF_INET6))
     {
-      syslog (LOG_ERR, "bind: %s", strerror (errno));
-      exit (EXIT_FAILURE);
+      fd = find_listenfd (AF_INET6, port);
+      if (fd >= 0)
+	{
+	  listenfd[numfd++] = fd;
+	  if (fd > maxfd)
+	    maxfd = fd;
+	}
     }
+#endif
 
-  if (listen (listenfd, 128) == -1)
+  if (numfd == 0)
     {
-      syslog (LOG_ERR, "listen: %s", strerror (errno));
+      syslog (LOG_ERR, "socket creation failed");
       exit (EXIT_FAILURE);
     }
 
   while (1)
     {
+      int n, j;
+      fd_set lfdset;
+
       if (numchildren > maxchildren)
 	{
 	  syslog (LOG_ERR, "too many children (%d)", numchildren);
@@ -526,28 +624,53 @@ rlogin_daemon (int maxchildren, int port)
 	  continue;
 	}
 
-      size = sizeof saddr;
-      fd = accept (listenfd, (struct sockaddr *) &saddr, &size);
+      FD_ZERO (&lfdset);
+      FD_SET (listenfd[0], &lfdset);
+      if (numfd > 1)
+	FD_SET (listenfd[1], &lfdset);
+
+      n = select (maxfd + 1, &lfdset, NULL, NULL, NULL);
+      if (n <= 0)
+	continue;
 
-      if (fd == -1)
+      for (j = 0; j < numfd; j++)
 	{
-	  if (errno == EINTR)
+	  pid_t pid;
+	  socklen_t size;
+#if HAVE_DECL_GETADDRINFO
+	  struct sockaddr_storage saddr;
+#else /* !HAVE_DECL_GETADDRINFO */
+	  struct sockaddr_in saddr;
+#endif
+
+	  if (!FD_ISSET (listenfd[j], &lfdset))
 	    continue;
-	  syslog (LOG_ERR, "accept: %s", strerror (errno));
-	  exit (EXIT_FAILURE);
-	}
 
-      pid = fork ();
-      if (pid == -1)
-	syslog (LOG_ERR, "fork: %s", strerror (errno));
-      else if (pid == 0)	/* child */
-	{
-	  close (listenfd);
-	  exit (rlogind_mainloop (fd, fd));
+	  size = sizeof (saddr);
+	  fd = accept (listenfd[j], (struct sockaddr *) &saddr, &size);
+
+	  if (fd < 0)
+	    {
+	      if (errno == EINTR)
+		continue;
+	      syslog (LOG_ERR, "accept: %s", strerror (errno));
+	      continue;
+	    }
+
+	  pid = fork ();
+	  if (pid == -1)
+	    syslog (LOG_ERR, "fork: %s", strerror (errno));
+	  else if (pid == 0)	/* child */
+	    {
+	      close (listenfd[0]);
+	      if (numfd > 1)
+		close (listenfd[1]);
+	      exit (rlogind_mainloop (fd, fd));
+	    }
+	  /* parent only */
+	  numchildren++;
+	  close (fd);
 	}
-      else
-	numchildren++;
-      close (fd);
     }
 }
 

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

Summary of changes:
 ChangeLog     |   29 +++++++-
 src/rlogind.c |  233 +++++++++++++++++++++++++++++++++++++++++++--------------
 2 files changed, 205 insertions(+), 57 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


