From MAILER-DAEMON Sun Jan 01 13:28:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RhQ8k-0001Dv-Mm
	for mharc-commit-inetutils@gnu.org; Sun, 01 Jan 2012 13:28:14 -0500
Received: from eggs.gnu.org ([140.186.70.92]:56276)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1RhQ8b-0001Do-2p
	for commit-inetutils@gnu.org; Sun, 01 Jan 2012 13:28:12 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ams@gnu.org>) id 1RhQ8T-0003PQ-9B
	for commit-inetutils@gnu.org; Sun, 01 Jan 2012 13:28:05 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:54614)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1RhQ8T-0003PL-4O
	for commit-inetutils@gnu.org; Sun, 01 Jan 2012 13:27:57 -0500
Received: from ams by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <ams@gnu.org>) id 1RhQ8S-0001VG-9M
	for commit-inetutils@gnu.org; Sun, 01 Jan 2012 18:27:56 +0000
Date: Sun, 01 Jan 2012 18:27:56 +0000
Message-Id: <E1RhQ8S-0001VG-9M@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master, updated. inetutils-1_9-1-g99c7114
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 7f8ed19e31d39393ca3a67f52e222f05e875625b
X-Git-Newrev: 99c71142f24033c2027a846df7c68be60f0625ef
From: "Alfred M. Szmidt" <ams@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Jan 2012 18:28:12 -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  99c71142f24033c2027a846df7c68be60f0625ef (commit)
      from  7f8ed19e31d39393ca3a67f52e222f05e875625b (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=99c71142f24033c2027a846df7c68be60f0625ef


commit 99c71142f24033c2027a846df7c68be60f0625ef
Author: Alfred M. Szmidt <ams@gnu.org>
Date:   Sun Jan 1 19:27:00 2012 +0100

    Updated copyright years; happy 2012! (silent change)

diff --git a/ChangeLog b/ChangeLog
index 802c914..16cbaa6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9583,7 +9583,7 @@ russion letters.  Thanks to Vladas Lapinskas <lapinskas@mail.iae.lt>.
 	(main): Add option -V (version).
 
     Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-    2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+    2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ChangeLog.0 b/ChangeLog.0
index ff1eb35..89b5bd6 100644
--- a/ChangeLog.0
+++ b/ChangeLog.0
@@ -2022,7 +2022,7 @@ Sat Dec 30 06:36:41 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
 	disable idle timer.
 
     Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-    2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+    2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
     Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/Makefile.am b/Makefile.am
index b403c41..a34c914 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,7 @@
 #
 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/NEWS b/NEWS
index ea583a0..63585de 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,6 @@
 GNU inetutils NEWS -- history of user-visible changes.
 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 See the end of this file for license conditions.
 
 Please send inetutils bug reports to <bug-inetutils@gnu.org>.
diff --git a/README b/README
index 20d7fce..1af2f26 100644
--- a/README
+++ b/README
@@ -50,7 +50,7 @@ Please send all bug reports to <bug-inetutils@gnu.org>.
 ========================================================================
 
 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
diff --git a/README-alpha b/README-alpha
index 7057b85..16eedf1 100644
--- a/README-alpha
+++ b/README-alpha
@@ -1,6 +1,6 @@
 This is the GNU Inetutils package.
 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 See end of file for copying conditions.
 
 This document describes the actions needed to build the pre-release or
diff --git a/THANKS b/THANKS
index f507f93..f42a136 100644
--- a/THANKS
+++ b/THANKS
@@ -37,7 +37,7 @@ Todd R. Eigenschink <todd@tekinteractive.com>
 ========================================================================
 
 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
diff --git a/am/check_macro.m4 b/am/check_macro.m4
index 6a1dc10..76943bd 100644
--- a/am/check_macro.m4
+++ b/am/check_macro.m4
@@ -1,7 +1,7 @@
 dnl
 dnl Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-dnl Inc.
+dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+dnl Foundation, Inc.
 dnl
 dnl This file is part of GNU Inetutils.
 dnl
diff --git a/am/check_member.m4 b/am/check_member.m4
index f017177..e929ed1 100644
--- a/am/check_member.m4
+++ b/am/check_member.m4
@@ -1,7 +1,7 @@
 dnl
 dnl Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-dnl Inc.
+dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+dnl Foundation, Inc.
 dnl
 dnl This file is part of GNU Inetutils.
 dnl
diff --git a/am/check_weak_refs.m4 b/am/check_weak_refs.m4
index d177aa3..e826503 100644
--- a/am/check_weak_refs.m4
+++ b/am/check_weak_refs.m4
@@ -1,7 +1,7 @@
 dnl
 dnl Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-dnl Inc.
+dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+dnl Foundation, Inc.
 dnl
 dnl This file is part of GNU Inetutils.
 dnl
diff --git a/am/config_paths.m4 b/am/config_paths.m4
index 2ef5f89..0c2fea9 100644
--- a/am/config_paths.m4
+++ b/am/config_paths.m4
@@ -1,7 +1,7 @@
 dnl
 dnl Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-dnl Inc.
+dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+dnl Foundation, Inc.
 dnl
 dnl This file is part of GNU Inetutils.
 dnl
diff --git a/am/enable.m4 b/am/enable.m4
index 2a752b9..217699d 100644
--- a/am/enable.m4
+++ b/am/enable.m4
@@ -1,7 +1,7 @@
 dnl
 dnl Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-dnl Inc.
+dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+dnl Foundation, Inc.
 dnl
 dnl This file is part of GNU Inetutils.
 dnl
diff --git a/am/flushleft.m4 b/am/flushleft.m4
index 752e07a..d6aab91 100644
--- a/am/flushleft.m4
+++ b/am/flushleft.m4
@@ -1,7 +1,7 @@
 dnl
 dnl Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-dnl Inc.
+dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+dnl Foundation, Inc.
 dnl
 dnl This file is part of GNU Inetutils.
 dnl
diff --git a/am/krb5.m4 b/am/krb5.m4
index f39b124..267e86c 100644
--- a/am/krb5.m4
+++ b/am/krb5.m4
@@ -1,7 +1,7 @@
 dnl
 dnl Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-dnl Inc.
+dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+dnl Foundation, Inc.
 dnl
 dnl This file is part of GNU Inetutils.
 dnl
diff --git a/am/libcurses.m4 b/am/libcurses.m4
index fe09781..62c53e7 100644
--- a/am/libcurses.m4
+++ b/am/libcurses.m4
@@ -1,7 +1,7 @@
 dnl
 dnl Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-dnl Inc.
+dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+dnl Foundation, Inc.
 dnl
 dnl This file is part of GNU Inetutils.
 dnl
diff --git a/am/readline.m4 b/am/readline.m4
index 1279c00..e8704bc 100644
--- a/am/readline.m4
+++ b/am/readline.m4
@@ -1,5 +1,6 @@
 # readline.m4 serial 9
-dnl Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2009, 2010, 2011, 2012 Free Software
+dnl Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/am/result.m4 b/am/result.m4
index f1f48c2..9511329 100644
--- a/am/result.m4
+++ b/am/result.m4
@@ -1,7 +1,7 @@
 dnl
 dnl Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-dnl Inc.
+dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+dnl Foundation, Inc.
 dnl
 dnl This file is part of GNU Inetutils.
 dnl
diff --git a/bootstrap.conf b/bootstrap.conf
index 5b9020c..57e4fbd 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -1,6 +1,6 @@
 # bootstrap.conf - Bootstrap configuration.
-# Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+# Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/cfg.mk b/cfg.mk
index 9df6883..102148a 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/configure.ac b/configure.ac
index 1a30bde..eaff443 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 # configure.ac - Configuration for inetutils
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+# Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 6c0df58..b93ebd6 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,6 +1,6 @@
 #
 # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-# 2010, 2011 Free Software Foundation, Inc.
+# 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/doc/inetutils.texi b/doc/inetutils.texi
index 771042b..392d537 100644
--- a/doc/inetutils.texi
+++ b/doc/inetutils.texi
@@ -58,7 +58,7 @@
 This manual documents version @value{VERSION} of the @sc{gnu} networking
 utilities.
 
-Copyright @copyright{} 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+Copyright @copyright{} 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
diff --git a/ftp/Makefile.am b/ftp/Makefile.am
index 6b7c386..9f3cb26 100644
--- a/ftp/Makefile.am
+++ b/ftp/Makefile.am
@@ -1,6 +1,7 @@
 #
 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/ftp/cmds.c b/ftp/cmds.c
index 260cfd0..5f9fa7b 100644
--- a/ftp/cmds.c
+++ b/ftp/cmds.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/ftp/cmdtab.c b/ftp/cmdtab.c
index 65d2096..743921d 100644
--- a/ftp/cmdtab.c
+++ b/ftp/cmdtab.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/ftp/domacro.c b/ftp/domacro.c
index e8a9e46..cc49b88 100644
--- a/ftp/domacro.c
+++ b/ftp/domacro.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/ftp/extern.h b/ftp/extern.h
index 39bff6f..c10e18d 100644
--- a/ftp/extern.h
+++ b/ftp/extern.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/ftp/ftp.c b/ftp/ftp.c
index c8de52c..ee756fb 100644
--- a/ftp/ftp.c
+++ b/ftp/ftp.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/ftp/ftp_var.h b/ftp/ftp_var.h
index 601b0bf..5b95048 100644
--- a/ftp/ftp_var.h
+++ b/ftp/ftp_var.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/ftp/main.c b/ftp/main.c
index 90fe2ef..9ef9f79 100644
--- a/ftp/main.c
+++ b/ftp/main.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/ftp/ruserpass.c b/ftp/ruserpass.c
index 2fc133f..f974cdc 100644
--- a/ftp/ruserpass.c
+++ b/ftp/ruserpass.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/ftpd/Makefile.am b/ftpd/Makefile.am
index 79c1c5a..7e07673 100644
--- a/ftpd/Makefile.am
+++ b/ftpd/Makefile.am
@@ -1,6 +1,7 @@
 #
 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/ftpd/auth.c b/ftpd/auth.c
index 5dfef4b..a6956c9 100644
--- a/ftpd/auth.c
+++ b/ftpd/auth.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-  2009, 2010, 2011 Free Software Foundation, Inc.
+  2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ftpd/conf.c b/ftpd/conf.c
index cc2fd79..731d901 100644
--- a/ftpd/conf.c
+++ b/ftpd/conf.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-  2009, 2010, 2011 Free Software Foundation, Inc.
+  2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ftpd/extern.h b/ftpd/extern.h
index 2aaea27..8fee0a2 100644
--- a/ftpd/extern.h
+++ b/ftpd/extern.h
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-  Foundation, Inc.
+  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
+  Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ftpd/ftpcmd.y b/ftpd/ftpcmd.y
index a9cce3a..879b4c5 100644
--- a/ftpd/ftpcmd.y
+++ b/ftpd/ftpcmd.y
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-  Foundation, Inc.
+  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
+  Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ftpd/ftpd.c b/ftpd/ftpd.c
index b1bc070..f7e945c 100644
--- a/ftpd/ftpd.c
+++ b/ftpd/ftpd.c
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-  Foundation, Inc.
+  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
+  Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ftpd/logwtmp.c b/ftpd/logwtmp.c
index c577911..576763f 100644
--- a/ftpd/logwtmp.c
+++ b/ftpd/logwtmp.c
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ftpd/pam.c b/ftpd/pam.c
index a731c68..9d04c2e 100644
--- a/ftpd/pam.c
+++ b/ftpd/pam.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-  2009, 2010, 2011 Free Software Foundation, Inc.
+  2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ftpd/popen.c b/ftpd/popen.c
index 3240975..83b9dc0 100644
--- a/ftpd/popen.c
+++ b/ftpd/popen.c
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-  Foundation, Inc.
+  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
+  Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ftpd/server_mode.c b/ftpd/server_mode.c
index e5b72e4..d8ca5a6 100644
--- a/ftpd/server_mode.c
+++ b/ftpd/server_mode.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-  2009, 2010, 2011 Free Software Foundation, Inc.
+  2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/Makefile.am b/ifconfig/Makefile.am
index 8c0398c..7268cda 100644
--- a/ifconfig/Makefile.am
+++ b/ifconfig/Makefile.am
@@ -1,6 +1,6 @@
 #
 # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-# 2010, 2011 Free Software Foundation, Inc.
+# 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/ifconfig/changeif.c b/ifconfig/changeif.c
index d245733..2ce3347 100644
--- a/ifconfig/changeif.c
+++ b/ifconfig/changeif.c
@@ -1,6 +1,6 @@
 /* changeif.c -- change the configuration of a network interface
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/flags.c b/ifconfig/flags.c
index 51bb551..230ccb0 100644
--- a/ifconfig/flags.c
+++ b/ifconfig/flags.c
@@ -1,6 +1,6 @@
 /* flags.c -- network interface flag handling
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/flags.h b/ifconfig/flags.h
index 552465a..0662a49 100644
--- a/ifconfig/flags.h
+++ b/ifconfig/flags.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/if_index.c b/ifconfig/if_index.c
index 63d3bf0..b3dc590 100644
--- a/ifconfig/if_index.c
+++ b/ifconfig/if_index.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/if_index.h b/ifconfig/if_index.h
index 07057ad..280eae6 100644
--- a/ifconfig/if_index.h
+++ b/ifconfig/if_index.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/ifconfig.c b/ifconfig/ifconfig.c
index 18375f8..b767628 100644
--- a/ifconfig/ifconfig.c
+++ b/ifconfig/ifconfig.c
@@ -1,6 +1,6 @@
 /* ifconfig.c -- network interface configuration utility
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/ifconfig.h b/ifconfig/ifconfig.h
index c0108a1..35045b7 100644
--- a/ifconfig/ifconfig.h
+++ b/ifconfig/ifconfig.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/options.c b/ifconfig/options.c
index 4bffb2c..7720c8d 100644
--- a/ifconfig/options.c
+++ b/ifconfig/options.c
@@ -1,6 +1,6 @@
 /* options.c -- process the command line options
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/options.h b/ifconfig/options.h
index f21c098..822100b 100644
--- a/ifconfig/options.h
+++ b/ifconfig/options.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/printif.c b/ifconfig/printif.c
index 1b86cf0..19cb290 100644
--- a/ifconfig/printif.c
+++ b/ifconfig/printif.c
@@ -1,6 +1,6 @@
 /* printif.c -- print an interface configuration
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/printif.h b/ifconfig/printif.h
index 5b518fa..7f543c0 100644
--- a/ifconfig/printif.h
+++ b/ifconfig/printif.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/system.c b/ifconfig/system.c
index 79fde8d..525f16e 100644
--- a/ifconfig/system.c
+++ b/ifconfig/system.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/system.h b/ifconfig/system.h
index 6f6aee5..f5ac40f 100644
--- a/ifconfig/system.h
+++ b/ifconfig/system.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/system/Makefile.am b/ifconfig/system/Makefile.am
index 091e797..5b61817 100644
--- a/ifconfig/system/Makefile.am
+++ b/ifconfig/system/Makefile.am
@@ -1,6 +1,6 @@
 #
 # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-# 2010, 2011 Free Software Foundation, Inc.
+# 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/ifconfig/system/generic.c b/ifconfig/system/generic.c
index c94ea3d..7205fe5 100644
--- a/ifconfig/system/generic.c
+++ b/ifconfig/system/generic.c
@@ -1,6 +1,6 @@
 /* generic.c -- generic system code for ifconfig
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/system/generic.h b/ifconfig/system/generic.h
index 8b04cbe..ac546e5 100644
--- a/ifconfig/system/generic.h
+++ b/ifconfig/system/generic.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/system/linux.c b/ifconfig/system/linux.c
index 619d290..c7f3638 100644
--- a/ifconfig/system/linux.c
+++ b/ifconfig/system/linux.c
@@ -1,6 +1,6 @@
 /* linux.c -- Linux specific code for ifconfig
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/system/linux.h b/ifconfig/system/linux.h
index ffa4f81..5fe8906 100644
--- a/ifconfig/system/linux.h
+++ b/ifconfig/system/linux.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/system/qnx.c b/ifconfig/system/qnx.c
index 4ffe1c7..e03e89f 100644
--- a/ifconfig/system/qnx.c
+++ b/ifconfig/system/qnx.c
@@ -1,6 +1,6 @@
 /* qnx.c -- QNX specific code for ifconfig
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/system/qnx.h b/ifconfig/system/qnx.h
index 00c49d9..f814410 100644
--- a/ifconfig/system/qnx.h
+++ b/ifconfig/system/qnx.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/system/solaris.c b/ifconfig/system/solaris.c
index cf6bcfe..0d53694 100644
--- a/ifconfig/system/solaris.c
+++ b/ifconfig/system/solaris.c
@@ -1,6 +1,6 @@
 /* solaris.c -- Solaris specific code for ifconfig
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ifconfig/system/solaris.h b/ifconfig/system/solaris.h
index ba8cdc7..64898ff 100644
--- a/ifconfig/system/solaris.h
+++ b/ifconfig/system/solaris.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libicmp/Makefile.am b/libicmp/Makefile.am
index 257e5bd..7ff2ec2 100644
--- a/libicmp/Makefile.am
+++ b/libicmp/Makefile.am
@@ -1,6 +1,6 @@
 #
 # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-# 2010, 2011 Free Software Foundation, Inc.
+# 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/libicmp/icmp.h b/libicmp/icmp.h
index 6f84674..83a1e70 100644
--- a/libicmp/icmp.h
+++ b/libicmp/icmp.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libicmp/icmp_address.c b/libicmp/icmp_address.c
index 8b7a8ee..b02ad15 100644
--- a/libicmp/icmp_address.c
+++ b/libicmp/icmp_address.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libicmp/icmp_cksum.c b/libicmp/icmp_cksum.c
index 35fba4e..1cc7955 100644
--- a/libicmp/icmp_cksum.c
+++ b/libicmp/icmp_cksum.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libicmp/icmp_echo.c b/libicmp/icmp_echo.c
index 30d0b18..3a0f108 100644
--- a/libicmp/icmp_echo.c
+++ b/libicmp/icmp_echo.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libicmp/icmp_timestamp.c b/libicmp/icmp_timestamp.c
index c21310d..1857252 100644
--- a/libicmp/icmp_timestamp.c
+++ b/libicmp/icmp_timestamp.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/Makefile.am b/libinetutils/Makefile.am
index 929d1ad..01585ce 100644
--- a/libinetutils/Makefile.am
+++ b/libinetutils/Makefile.am
@@ -1,6 +1,7 @@
 #
 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/libinetutils/argcv.c b/libinetutils/argcv.c
index 5a483d6..f8396de 100644
--- a/libinetutils/argcv.c
+++ b/libinetutils/argcv.c
@@ -1,6 +1,6 @@
 /* argcv.c - simple functions for parsing input based on whitespace
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/argcv.h b/libinetutils/argcv.h
index f4230ee..807ad01 100644
--- a/libinetutils/argcv.h
+++ b/libinetutils/argcv.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/cleansess.c b/libinetutils/cleansess.c
index 1866c37..6efff70 100644
--- a/libinetutils/cleansess.c
+++ b/libinetutils/cleansess.c
@@ -1,7 +1,7 @@
 /* cleansess.c - Clean up the pty and frob utmp/wtmp accordingly after logout
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/daemon.c b/libinetutils/daemon.c
index 1efb1f1..849c86f 100644
--- a/libinetutils/daemon.c
+++ b/libinetutils/daemon.c
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/defauthors.c b/libinetutils/defauthors.c
index 141cc6b..34d918f 100644
--- a/libinetutils/defauthors.c
+++ b/libinetutils/defauthors.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+  Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/des_rw.c b/libinetutils/des_rw.c
index a3c3a53..29796b4 100644
--- a/libinetutils/des_rw.c
+++ b/libinetutils/des_rw.c
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-  2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+  Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/kcmd.c b/libinetutils/kcmd.c
index 8bb30bc..c100af7 100644
--- a/libinetutils/kcmd.c
+++ b/libinetutils/kcmd.c
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-  2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+  Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/krcmd.c b/libinetutils/krcmd.c
index 59d0bf7..44e1a4b 100644
--- a/libinetutils/krcmd.c
+++ b/libinetutils/krcmd.c
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-  2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+  Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/libinetutils.h b/libinetutils/libinetutils.h
index 56174e1..7329eba 100644
--- a/libinetutils/libinetutils.h
+++ b/libinetutils/libinetutils.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/libinetutils/localhost.c b/libinetutils/localhost.c
index abb734b..da168bb 100644
--- a/libinetutils/localhost.c
+++ b/libinetutils/localhost.c
@@ -1,7 +1,7 @@
 /* localhost.c - A slightly more convenient wrapper for gethostname
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/logwtmp.c b/libinetutils/logwtmp.c
index b976955..84dc3dc 100644
--- a/libinetutils/logwtmp.c
+++ b/libinetutils/logwtmp.c
@@ -1,6 +1,7 @@
 /* logwtmp.c - A version of BSDs `logwtmp' that should be widely portable
   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-  2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+  Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/logwtmpko.c b/libinetutils/logwtmpko.c
index 3e1d91c..2209b15 100644
--- a/libinetutils/logwtmpko.c
+++ b/libinetutils/logwtmpko.c
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-  2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+  Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/setsig.c b/libinetutils/setsig.c
index 24c57db..10271e8 100644
--- a/libinetutils/setsig.c
+++ b/libinetutils/setsig.c
@@ -1,6 +1,7 @@
 /* setsig.c - Set a signal handler, trying to turning on the SA_RESTART bit
   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-  2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+  Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/shishi.c b/libinetutils/shishi.c
index 39e6d5d..caae9b0 100644
--- a/libinetutils/shishi.c
+++ b/libinetutils/shishi.c
@@ -1,6 +1,6 @@
 /* shishi.c -- functions to use kerberos V with shishi
-  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-  Foundation, Inc.
+  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
+  Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/shishi_def.h b/libinetutils/shishi_def.h
index a5828ec..fe885c4 100644
--- a/libinetutils/shishi_def.h
+++ b/libinetutils/shishi_def.h
@@ -1,6 +1,6 @@
 /*
-  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-  Foundation, Inc.
+  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
+  Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/tftpsubs.c b/libinetutils/tftpsubs.c
index 65ba8cd..141e655 100644
--- a/libinetutils/tftpsubs.c
+++ b/libinetutils/tftpsubs.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-  2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/tftpsubs.h b/libinetutils/tftpsubs.h
index 122bbd1..0296ff2 100644
--- a/libinetutils/tftpsubs.h
+++ b/libinetutils/tftpsubs.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-  2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/ttymsg.c b/libinetutils/ttymsg.c
index e91b056..b25d07a 100644
--- a/libinetutils/ttymsg.c
+++ b/libinetutils/ttymsg.c
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/utmp_init.c b/libinetutils/utmp_init.c
index 9af5ab1..ce30c5f 100644
--- a/libinetutils/utmp_init.c
+++ b/libinetutils/utmp_init.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-  2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libinetutils/utmp_logout.c b/libinetutils/utmp_logout.c
index fed296f..5cc8543 100644
--- a/libinetutils/utmp_logout.c
+++ b/libinetutils/utmp_logout.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-  2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libls/Makefile.am b/libls/Makefile.am
index 02c9313..7d40b2e 100644
--- a/libls/Makefile.am
+++ b/libls/Makefile.am
@@ -1,6 +1,6 @@
 #
 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-# 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/libls/cmp.c b/libls/cmp.c
index 61eb79d..28d4024 100644
--- a/libls/cmp.c
+++ b/libls/cmp.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-  2009, 2010, 2011 Free Software Foundation, Inc.
+  2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libls/extern.h b/libls/extern.h
index 2478add..8f84721 100644
--- a/libls/extern.h
+++ b/libls/extern.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-  2009, 2010, 2011 Free Software Foundation, Inc.
+  2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libls/fts.c b/libls/fts.c
index f5f5bc9..b9736f4 100644
--- a/libls/fts.c
+++ b/libls/fts.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-  2009, 2010, 2011 Free Software Foundation, Inc.
+  2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libls/fts.h b/libls/fts.h
index 01d3468..12fd3b4 100644
--- a/libls/fts.h
+++ b/libls/fts.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-  2009, 2010, 2011 Free Software Foundation, Inc.
+  2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libls/ls.c b/libls/ls.c
index cc6e4bd..f331819 100644
--- a/libls/ls.c
+++ b/libls/ls.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-  2009, 2010, 2011 Free Software Foundation, Inc.
+  2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libls/ls.h b/libls/ls.h
index aa376f8..eda1e90 100644
--- a/libls/ls.h
+++ b/libls/ls.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-  2009, 2010, 2011 Free Software Foundation, Inc.
+  2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libls/print.c b/libls/print.c
index e851244..9537652 100644
--- a/libls/print.c
+++ b/libls/print.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-  2009, 2010, 2011 Free Software Foundation, Inc.
+  2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libls/stat_flags.c b/libls/stat_flags.c
index 82622b5..e47383b 100644
--- a/libls/stat_flags.c
+++ b/libls/stat_flags.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-  2009, 2010, 2011 Free Software Foundation, Inc.
+  2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libls/util.c b/libls/util.c
index 0f670d9..872858c 100644
--- a/libls/util.c
+++ b/libls/util.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-  2009, 2010, 2011 Free Software Foundation, Inc.
+  2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libtelnet/Makefile.am b/libtelnet/Makefile.am
index 00dae4c..fe88c68 100644
--- a/libtelnet/Makefile.am
+++ b/libtelnet/Makefile.am
@@ -1,6 +1,7 @@
 #
 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/libtelnet/auth-proto.h b/libtelnet/auth-proto.h
index eac89f3..1735954 100644
--- a/libtelnet/auth-proto.h
+++ b/libtelnet/auth-proto.h
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libtelnet/auth.c b/libtelnet/auth.c
index eab5458..eaa11f0 100644
--- a/libtelnet/auth.c
+++ b/libtelnet/auth.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
   Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/libtelnet/auth.h b/libtelnet/auth.h
index 88f19d3..4047d2c 100644
--- a/libtelnet/auth.h
+++ b/libtelnet/auth.h
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libtelnet/enc-proto.h b/libtelnet/enc-proto.h
index a3693cf..e78f7ec 100644
--- a/libtelnet/enc-proto.h
+++ b/libtelnet/enc-proto.h
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libtelnet/enc_des.c b/libtelnet/enc_des.c
index 41eca98..c4b5ef2 100644
--- a/libtelnet/enc_des.c
+++ b/libtelnet/enc_des.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
   Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/libtelnet/encrypt.c b/libtelnet/encrypt.c
index 69e3465..8b349a6 100644
--- a/libtelnet/encrypt.c
+++ b/libtelnet/encrypt.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
   Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/libtelnet/encrypt.h b/libtelnet/encrypt.h
index d56c00f..0585aed 100644
--- a/libtelnet/encrypt.h
+++ b/libtelnet/encrypt.h
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libtelnet/forward.c b/libtelnet/forward.c
index ddc28b9..b1c5c2f 100644
--- a/libtelnet/forward.c
+++ b/libtelnet/forward.c
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-  2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+  Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libtelnet/genget.c b/libtelnet/genget.c
index 580c294..d2b77fe 100644
--- a/libtelnet/genget.c
+++ b/libtelnet/genget.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
   Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/libtelnet/genget.h b/libtelnet/genget.h
index 92a2008..7321de3 100644
--- a/libtelnet/genget.h
+++ b/libtelnet/genget.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+  Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libtelnet/getent.c b/libtelnet/getent.c
index c846a60..1853cff 100644
--- a/libtelnet/getent.c
+++ b/libtelnet/getent.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
   Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/libtelnet/kerberos.c b/libtelnet/kerberos.c
index e9d1c29..7d79fd9 100644
--- a/libtelnet/kerberos.c
+++ b/libtelnet/kerberos.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
   Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/libtelnet/kerberos5.c b/libtelnet/kerberos5.c
index 18b61d3..4b4e36f 100644
--- a/libtelnet/kerberos5.c
+++ b/libtelnet/kerberos5.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
   Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/libtelnet/key-proto.h b/libtelnet/key-proto.h
index 709cedc..010fdb3 100644
--- a/libtelnet/key-proto.h
+++ b/libtelnet/key-proto.h
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libtelnet/misc-proto.h b/libtelnet/misc-proto.h
index 6ca475d..96d8d22 100644
--- a/libtelnet/misc-proto.h
+++ b/libtelnet/misc-proto.h
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libtelnet/misc.c b/libtelnet/misc.c
index a3c5d64..cd89460 100644
--- a/libtelnet/misc.c
+++ b/libtelnet/misc.c
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libtelnet/misc.h b/libtelnet/misc.h
index 4acef8c..a463d50 100644
--- a/libtelnet/misc.h
+++ b/libtelnet/misc.h
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libtelnet/read_passwd.c b/libtelnet/read_passwd.c
index 26811dc..1cbce5d 100644
--- a/libtelnet/read_passwd.c
+++ b/libtelnet/read_passwd.c
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-  2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+  Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/libtelnet/shishi.c b/libtelnet/shishi.c
index b5068be..a6bc478 100644
--- a/libtelnet/shishi.c
+++ b/libtelnet/shishi.c
@@ -1,6 +1,6 @@
 /*
-  Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
-  Free Software Foundation, Inc.
+  Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
+  2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/man/Makefile.am b/man/Makefile.am
index 22a9552..5572afa 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/paths b/paths
index 39748f3..8cd8096 100644
--- a/paths
+++ b/paths
@@ -1,7 +1,7 @@
 # paths - Paths for inetutils
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+# Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/ping/Makefile.am b/ping/Makefile.am
index 414034b..5da4782 100644
--- a/ping/Makefile.am
+++ b/ping/Makefile.am
@@ -1,6 +1,7 @@
 #
 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/ping/libping.c b/ping/libping.c
index 6746564..fcb9e22 100644
--- a/ping/libping.c
+++ b/ping/libping.c
@@ -1,5 +1,6 @@
 /*
-  Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+  Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ping/ping.c b/ping/ping.c
index 9135ff6..edfd758 100644
--- a/ping/ping.c
+++ b/ping/ping.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-  2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ping/ping.h b/ping/ping.h
index d576ed6..a6fe6b3 100644
--- a/ping/ping.h
+++ b/ping/ping.h
@@ -1,5 +1,6 @@
 /*
-  Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+  Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ping/ping6.c b/ping/ping6.c
index 2873d15..2ba519a 100644
--- a/ping/ping6.c
+++ b/ping/ping6.c
@@ -1,6 +1,6 @@
 /*
-  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-  Foundation, Inc.
+  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
+  Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ping/ping6.h b/ping/ping6.h
index dad4316..93a1922 100644
--- a/ping/ping6.h
+++ b/ping/ping6.h
@@ -1,6 +1,6 @@
 /*
-  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-  Foundation, Inc.
+  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
+  Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ping/ping_address.c b/ping/ping_address.c
index 2b3dcc1..04574d7 100644
--- a/ping/ping_address.c
+++ b/ping/ping_address.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ping/ping_common.c b/ping/ping_common.c
index c33db22..bd6d65d 100644
--- a/ping/ping_common.c
+++ b/ping/ping_common.c
@@ -1,6 +1,6 @@
 /*
-  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-  Foundation, Inc.
+  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
+  Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ping/ping_common.h b/ping/ping_common.h
index 86ef83b..136c2f1 100644
--- a/ping/ping_common.h
+++ b/ping/ping_common.h
@@ -1,6 +1,6 @@
 /*
-  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-  Foundation, Inc.
+  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
+  Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ping/ping_echo.c b/ping/ping_echo.c
index f4e1176..5d600b6 100644
--- a/ping/ping_echo.c
+++ b/ping/ping_echo.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ping/ping_impl.h b/ping/ping_impl.h
index 1c2e172..a8ebc36 100644
--- a/ping/ping_impl.h
+++ b/ping/ping_impl.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ping/ping_router.c b/ping/ping_router.c
index 9b96f3d..e478ffa 100644
--- a/ping/ping_router.c
+++ b/ping/ping_router.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/ping/ping_timestamp.c b/ping/ping_timestamp.c
index f3955b7..7793840 100644
--- a/ping/ping_timestamp.c
+++ b/ping/ping_timestamp.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/src/Makefile.am b/src/Makefile.am
index a395b89..3df5284 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,7 @@
 #
 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/src/hostname.c b/src/hostname.c
index 3e62df5..5202b42 100644
--- a/src/hostname.c
+++ b/src/hostname.c
@@ -1,5 +1,6 @@
 /*
-   Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+   Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/src/inetd.c b/src/inetd.c
index b04941c..315fa1b 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-  Foundation, Inc.
+  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
+  Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/src/logger.c b/src/logger.c
index d607c58..2bcbdda 100644
--- a/src/logger.c
+++ b/src/logger.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+  Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/src/logprio.h b/src/logprio.h
index 5680749..c9f0b2b 100644
--- a/src/logprio.h
+++ b/src/logprio.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2011 Free Software Foundation, Inc.
+  Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/src/rcp.c b/src/rcp.c
index 9b2f614..534de5b 100644
--- a/src/rcp.c
+++ b/src/rcp.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/src/rexec.c b/src/rexec.c
index 8d28fe5..3cce369 100644
--- a/src/rexec.c
+++ b/src/rexec.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+  Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/src/rexecd.c b/src/rexecd.c
index 487d524..d5a7fc7 100644
--- a/src/rexecd.c
+++ b/src/rexecd.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
   Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/src/rlogin.c b/src/rlogin.c
index c62a56f..298b3b6 100644
--- a/src/rlogin.c
+++ b/src/rlogin.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/src/rlogind.c b/src/rlogind.c
index 2a893ff..98a25c2 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
   Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/src/rsh.c b/src/rsh.c
index 4a50927..4832c00 100644
--- a/src/rsh.c
+++ b/src/rsh.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/src/rshd.c b/src/rshd.c
index 9096d3c..93010d6 100644
--- a/src/rshd.c
+++ b/src/rshd.c
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-  Foundation, Inc.
+  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
+  Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/src/syslogd.c b/src/syslogd.c
index 4b7b87a..faeebac 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -1,6 +1,7 @@
 /* syslogd - log system messages
   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-  2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+  Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/src/tftp.c b/src/tftp.c
index 2c724a9..4332a16 100644
--- a/src/tftp.c
+++ b/src/tftp.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/src/tftpd.c b/src/tftpd.c
index 1a8374c..99ac02b 100644
--- a/src/tftpd.c
+++ b/src/tftpd.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/src/traceroute.c b/src/traceroute.c
index 0814cfa..7918c22 100644
--- a/src/traceroute.c
+++ b/src/traceroute.c
@@ -1,6 +1,6 @@
 /*
-  Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/src/uucpd.c b/src/uucpd.c
index 14bd6d3..e16b995 100644
--- a/src/uucpd.c
+++ b/src/uucpd.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
   Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/talk/Makefile.am b/talk/Makefile.am
index b0b2087..488ff8a 100644
--- a/talk/Makefile.am
+++ b/talk/Makefile.am
@@ -1,6 +1,7 @@
 #
 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/talk/ctl.c b/talk/ctl.c
index ac3854b..29713e9 100644
--- a/talk/ctl.c
+++ b/talk/ctl.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/talk/ctl_transact.c b/talk/ctl_transact.c
index 46a865f..47f03fc 100644
--- a/talk/ctl_transact.c
+++ b/talk/ctl_transact.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/talk/display.c b/talk/display.c
index 48bfa36..6df1ada 100644
--- a/talk/display.c
+++ b/talk/display.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/talk/get_addrs.c b/talk/get_addrs.c
index b2af9a4..3fc5585 100644
--- a/talk/get_addrs.c
+++ b/talk/get_addrs.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/talk/get_names.c b/talk/get_names.c
index 5f458ce..67957f1 100644
--- a/talk/get_names.c
+++ b/talk/get_names.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/talk/init_disp.c b/talk/init_disp.c
index c70cc61..1611e13 100644
--- a/talk/init_disp.c
+++ b/talk/init_disp.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/talk/invite.c b/talk/invite.c
index b985a80..d89f60e 100644
--- a/talk/invite.c
+++ b/talk/invite.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/talk/io.c b/talk/io.c
index ae50f65..e720573 100644
--- a/talk/io.c
+++ b/talk/io.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/talk/look_up.c b/talk/look_up.c
index f7c7665..3a0baab 100644
--- a/talk/look_up.c
+++ b/talk/look_up.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/talk/msgs.c b/talk/msgs.c
index 1c26fa5..4ff3e27 100644
--- a/talk/msgs.c
+++ b/talk/msgs.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/talk/talk.c b/talk/talk.c
index 5fcb8bc..4e95b1d 100644
--- a/talk/talk.c
+++ b/talk/talk.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/talk/talk.h b/talk/talk.h
index 47f1c05..8049f25 100644
--- a/talk/talk.h
+++ b/talk/talk.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/talk/talk_ctl.h b/talk/talk_ctl.h
index 38280f9..d4894e9 100644
--- a/talk/talk_ctl.h
+++ b/talk/talk_ctl.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/talkd/Makefile.am b/talkd/Makefile.am
index fa4f4c7..a3e81b7 100644
--- a/talkd/Makefile.am
+++ b/talkd/Makefile.am
@@ -1,6 +1,7 @@
 #
 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/talkd/acl.c b/talkd/acl.c
index 890a36a..168d5ea 100644
--- a/talkd/acl.c
+++ b/talkd/acl.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/talkd/announce.c b/talkd/announce.c
index 3b2e558..5fce5c3 100644
--- a/talkd/announce.c
+++ b/talkd/announce.c
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-  Foundation, Inc.
+  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
+  Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/talkd/intalkd.h b/talkd/intalkd.h
index 3cd7bec..338e7f8 100644
--- a/talkd/intalkd.h
+++ b/talkd/intalkd.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-  2010, 2011 Free Software Foundation, Inc.
+  2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/talkd/print.c b/talkd/print.c
index 53586eb..6879915 100644
--- a/talkd/print.c
+++ b/talkd/print.c
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/talkd/process.c b/talkd/process.c
index 46d4a5a..f291599 100644
--- a/talkd/process.c
+++ b/talkd/process.c
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/talkd/table.c b/talkd/table.c
index aad408d..b3e9363 100644
--- a/talkd/table.c
+++ b/talkd/table.c
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/talkd/talkd.c b/talkd/talkd.c
index 060fb84..436414b 100644
--- a/talkd/talkd.c
+++ b/talkd/talkd.c
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/telnet/Makefile.am b/telnet/Makefile.am
index 8d10f8c..764f8cd 100644
--- a/telnet/Makefile.am
+++ b/telnet/Makefile.am
@@ -1,6 +1,7 @@
 #
 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/telnet/authenc.c b/telnet/authenc.c
index 1aeb7ba..f53d274 100644
--- a/telnet/authenc.c
+++ b/telnet/authenc.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnet/commands.c b/telnet/commands.c
index 1e9117d..7c2a7f4 100644
--- a/telnet/commands.c
+++ b/telnet/commands.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnet/defines.h b/telnet/defines.h
index f2db604..a24a010 100644
--- a/telnet/defines.h
+++ b/telnet/defines.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnet/externs.h b/telnet/externs.h
index 338c620..d621dbf 100644
--- a/telnet/externs.h
+++ b/telnet/externs.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnet/general.h b/telnet/general.h
index 535c127..dc2150b 100644
--- a/telnet/general.h
+++ b/telnet/general.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnet/krb4-proto.h b/telnet/krb4-proto.h
index 1a252e8..29b2fa4 100644
--- a/telnet/krb4-proto.h
+++ b/telnet/krb4-proto.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnet/main.c b/telnet/main.c
index 906694d..7ca93a7 100644
--- a/telnet/main.c
+++ b/telnet/main.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnet/network.c b/telnet/network.c
index 182881c..8b5b327 100644
--- a/telnet/network.c
+++ b/telnet/network.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnet/ring.c b/telnet/ring.c
index dc02403..20178e4 100644
--- a/telnet/ring.c
+++ b/telnet/ring.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnet/ring.h b/telnet/ring.h
index 517f19f..c22b300 100644
--- a/telnet/ring.h
+++ b/telnet/ring.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnet/sys_bsd.c b/telnet/sys_bsd.c
index cb1343e..58df0ef 100644
--- a/telnet/sys_bsd.c
+++ b/telnet/sys_bsd.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnet/telnet.c b/telnet/telnet.c
index d0e33d3..768e316 100644
--- a/telnet/telnet.c
+++ b/telnet/telnet.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnet/terminal.c b/telnet/terminal.c
index 5a3a6d4..d47bffa 100644
--- a/telnet/terminal.c
+++ b/telnet/terminal.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnet/tn3270.c b/telnet/tn3270.c
index 1c041c7..8488478 100644
--- a/telnet/tn3270.c
+++ b/telnet/tn3270.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnet/types.h b/telnet/types.h
index 9fdfd20..bc1dd79 100644
--- a/telnet/types.h
+++ b/telnet/types.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnet/utilities.c b/telnet/utilities.c
index 97b57f6..60b4b3f 100644
--- a/telnet/utilities.c
+++ b/telnet/utilities.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+  2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
   Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnetd/Makefile.am b/telnetd/Makefile.am
index df497a6..cbbf640 100644
--- a/telnetd/Makefile.am
+++ b/telnetd/Makefile.am
@@ -1,6 +1,7 @@
 #
 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/telnetd/pty.c b/telnetd/pty.c
index 10c57f5..2ec2dac 100644
--- a/telnetd/pty.c
+++ b/telnetd/pty.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-  2011 Free Software Foundation, Inc.
+  2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/telnetd/slc.c b/telnetd/slc.c
index 98b292c..c930931 100644
--- a/telnetd/slc.c
+++ b/telnetd/slc.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
   Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnetd/state.c b/telnetd/state.c
index 3aa4063..6c8a59a 100644
--- a/telnetd/state.c
+++ b/telnetd/state.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
   Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c
index a3095b9..22f1a96 100644
--- a/telnetd/telnetd.c
+++ b/telnetd/telnetd.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
   Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnetd/telnetd.h b/telnetd/telnetd.h
index b5b4a5b..8a275ec 100644
--- a/telnetd/telnetd.h
+++ b/telnetd/telnetd.h
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/telnetd/term.c b/telnetd/term.c
index d97fc37..6ee845e 100644
--- a/telnetd/term.c
+++ b/telnetd/term.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-  2011 Free Software Foundation, Inc.
+  2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/telnetd/termstat.c b/telnetd/termstat.c
index 44445eb..d9a72a2 100644
--- a/telnetd/termstat.c
+++ b/telnetd/termstat.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
   Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/telnetd/utility.c b/telnetd/utility.c
index 0101331..cdd1d9a 100644
--- a/telnetd/utility.c
+++ b/telnetd/utility.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+  2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
   Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 16b901a..38a0c04 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,6 @@
 #
-# Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+# Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/tests/addrpeek.c b/tests/addrpeek.c
index 811dc9b..dbac011 100644
--- a/tests/addrpeek.c
+++ b/tests/addrpeek.c
@@ -1,5 +1,5 @@
 /* addrpeek - testing service for Inetd: remote address, environment vars
-  Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+  Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index b0470d3..2eec944 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/tests/hostname.sh b/tests/hostname.sh
index cddddf5..cde7e03 100755
--- a/tests/hostname.sh
+++ b/tests/hostname.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/tests/localhost.c b/tests/localhost.c
index 12e690f..d65dd71 100644
--- a/tests/localhost.c
+++ b/tests/localhost.c
@@ -1,6 +1,6 @@
 /*
-  Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-  Inc.
+  Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+  Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/tests/ping-localhost.sh b/tests/ping-localhost.sh
index fa4e567..8f0b87a 100755
--- a/tests/ping-localhost.sh
+++ b/tests/ping-localhost.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index 0c95574..8b9004d 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/tests/tftp.sh b/tests/tftp.sh
index a99b16e..9df2aac 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/tests/traceroute-localhost.sh b/tests/traceroute-localhost.sh
index 364d323..9003c0f 100755
--- a/tests/traceroute-localhost.sh
+++ b/tests/traceroute-localhost.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/whois/Makefile.am b/whois/Makefile.am
index 7270be8..3a5a233 100644
--- a/whois/Makefile.am
+++ b/whois/Makefile.am
@@ -1,6 +1,6 @@
 #
 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/whois/as_del_list b/whois/as_del_list
index 764c458..3311648 100644
--- a/whois/as_del_list
+++ b/whois/as_del_list
@@ -1,5 +1,5 @@
 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/whois/data.h b/whois/data.h
index 6a1bc81..148e437 100644
--- a/whois/data.h
+++ b/whois/data.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+  Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/whois/ip_del_list b/whois/ip_del_list
index e03fe6f..a93e530 100644
--- a/whois/ip_del_list
+++ b/whois/ip_del_list
@@ -1,5 +1,5 @@
 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/whois/make_as_del.pl b/whois/make_as_del.pl
index 74a0ba8..c0cedef 100755
--- a/whois/make_as_del.pl
+++ b/whois/make_as_del.pl
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/whois/make_ip_del.pl b/whois/make_ip_del.pl
index 89ffaa5..6bfb925 100755
--- a/whois/make_ip_del.pl
+++ b/whois/make_ip_del.pl
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/whois/make_tld_serv.pl b/whois/make_tld_serv.pl
index af19968..d86f820 100755
--- a/whois/make_tld_serv.pl
+++ b/whois/make_tld_serv.pl
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/whois/tld_serv_list b/whois/tld_serv_list
index 6c1cb48..8da590c 100644
--- a/whois/tld_serv_list
+++ b/whois/tld_serv_list
@@ -1,5 +1,5 @@
 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Inetutils.
 #
diff --git a/whois/whois.c b/whois/whois.c
index 88d5a75..9960773 100644
--- a/whois/whois.c
+++ b/whois/whois.c
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-  2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 
diff --git a/whois/whois.h b/whois/whois.h
index c83b04d..76e07ca 100644
--- a/whois/whois.h
+++ b/whois/whois.h
@@ -1,6 +1,6 @@
 /*
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-  2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+  2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 
   This file is part of GNU Inetutils.
 

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

Summary of changes:
 ChangeLog                     |    2 +-
 ChangeLog.0                   |    2 +-
 Makefile.am                   |    3 ++-
 NEWS                          |    2 +-
 README                        |    2 +-
 README-alpha                  |    2 +-
 THANKS                        |    2 +-
 am/check_macro.m4             |    4 ++--
 am/check_member.m4            |    4 ++--
 am/check_weak_refs.m4         |    4 ++--
 am/config_paths.m4            |    4 ++--
 am/enable.m4                  |    4 ++--
 am/flushleft.m4               |    4 ++--
 am/krb5.m4                    |    4 ++--
 am/libcurses.m4               |    4 ++--
 am/readline.m4                |    3 ++-
 am/result.m4                  |    4 ++--
 bootstrap.conf                |    4 ++--
 cfg.mk                        |    2 +-
 configure.ac                  |    4 ++--
 doc/Makefile.am               |    2 +-
 doc/inetutils.texi            |    2 +-
 ftp/Makefile.am               |    3 ++-
 ftp/cmds.c                    |    2 +-
 ftp/cmdtab.c                  |    2 +-
 ftp/domacro.c                 |    2 +-
 ftp/extern.h                  |    2 +-
 ftp/ftp.c                     |    2 +-
 ftp/ftp_var.h                 |    2 +-
 ftp/main.c                    |    2 +-
 ftp/ruserpass.c               |    2 +-
 ftpd/Makefile.am              |    3 ++-
 ftpd/auth.c                   |    2 +-
 ftpd/conf.c                   |    2 +-
 ftpd/extern.h                 |    4 ++--
 ftpd/ftpcmd.y                 |    4 ++--
 ftpd/ftpd.c                   |    4 ++--
 ftpd/logwtmp.c                |    4 ++--
 ftpd/pam.c                    |    2 +-
 ftpd/popen.c                  |    4 ++--
 ftpd/server_mode.c            |    2 +-
 ifconfig/Makefile.am          |    2 +-
 ifconfig/changeif.c           |    2 +-
 ifconfig/flags.c              |    2 +-
 ifconfig/flags.h              |    2 +-
 ifconfig/if_index.c           |    2 +-
 ifconfig/if_index.h           |    2 +-
 ifconfig/ifconfig.c           |    2 +-
 ifconfig/ifconfig.h           |    2 +-
 ifconfig/options.c            |    2 +-
 ifconfig/options.h            |    2 +-
 ifconfig/printif.c            |    2 +-
 ifconfig/printif.h            |    2 +-
 ifconfig/system.c             |    2 +-
 ifconfig/system.h             |    2 +-
 ifconfig/system/Makefile.am   |    2 +-
 ifconfig/system/generic.c     |    2 +-
 ifconfig/system/generic.h     |    2 +-
 ifconfig/system/linux.c       |    2 +-
 ifconfig/system/linux.h       |    2 +-
 ifconfig/system/qnx.c         |    2 +-
 ifconfig/system/qnx.h         |    2 +-
 ifconfig/system/solaris.c     |    2 +-
 ifconfig/system/solaris.h     |    2 +-
 libicmp/Makefile.am           |    2 +-
 libicmp/icmp.h                |    2 +-
 libicmp/icmp_address.c        |    2 +-
 libicmp/icmp_cksum.c          |    2 +-
 libicmp/icmp_echo.c           |    2 +-
 libicmp/icmp_timestamp.c      |    2 +-
 libinetutils/Makefile.am      |    3 ++-
 libinetutils/argcv.c          |    2 +-
 libinetutils/argcv.h          |    2 +-
 libinetutils/cleansess.c      |    4 ++--
 libinetutils/daemon.c         |    4 ++--
 libinetutils/defauthors.c     |    2 +-
 libinetutils/des_rw.c         |    3 ++-
 libinetutils/kcmd.c           |    3 ++-
 libinetutils/krcmd.c          |    3 ++-
 libinetutils/libinetutils.h   |    2 +-
 libinetutils/localhost.c      |    4 ++--
 libinetutils/logwtmp.c        |    3 ++-
 libinetutils/logwtmpko.c      |    3 ++-
 libinetutils/setsig.c         |    3 ++-
 libinetutils/shishi.c         |    4 ++--
 libinetutils/shishi_def.h     |    4 ++--
 libinetutils/tftpsubs.c       |    2 +-
 libinetutils/tftpsubs.h       |    2 +-
 libinetutils/ttymsg.c         |    4 ++--
 libinetutils/utmp_init.c      |    2 +-
 libinetutils/utmp_logout.c    |    2 +-
 libls/Makefile.am             |    2 +-
 libls/cmp.c                   |    2 +-
 libls/extern.h                |    2 +-
 libls/fts.c                   |    2 +-
 libls/fts.h                   |    2 +-
 libls/ls.c                    |    2 +-
 libls/ls.h                    |    2 +-
 libls/print.c                 |    2 +-
 libls/stat_flags.c            |    2 +-
 libls/util.c                  |    2 +-
 libtelnet/Makefile.am         |    3 ++-
 libtelnet/auth-proto.h        |    4 ++--
 libtelnet/auth.c              |    2 +-
 libtelnet/auth.h              |    4 ++--
 libtelnet/enc-proto.h         |    4 ++--
 libtelnet/enc_des.c           |    2 +-
 libtelnet/encrypt.c           |    2 +-
 libtelnet/encrypt.h           |    4 ++--
 libtelnet/forward.c           |    3 ++-
 libtelnet/genget.c            |    2 +-
 libtelnet/genget.h            |    2 +-
 libtelnet/getent.c            |    2 +-
 libtelnet/kerberos.c          |    2 +-
 libtelnet/kerberos5.c         |    2 +-
 libtelnet/key-proto.h         |    4 ++--
 libtelnet/misc-proto.h        |    4 ++--
 libtelnet/misc.c              |    4 ++--
 libtelnet/misc.h              |    4 ++--
 libtelnet/read_passwd.c       |    3 ++-
 libtelnet/shishi.c            |    4 ++--
 man/Makefile.am               |    2 +-
 paths                         |    4 ++--
 ping/Makefile.am              |    3 ++-
 ping/libping.c                |    3 ++-
 ping/ping.c                   |    2 +-
 ping/ping.h                   |    3 ++-
 ping/ping6.c                  |    4 ++--
 ping/ping6.h                  |    4 ++--
 ping/ping_address.c           |    2 +-
 ping/ping_common.c            |    4 ++--
 ping/ping_common.h            |    4 ++--
 ping/ping_echo.c              |    2 +-
 ping/ping_impl.h              |    2 +-
 ping/ping_router.c            |    2 +-
 ping/ping_timestamp.c         |    2 +-
 src/Makefile.am               |    3 ++-
 src/hostname.c                |    3 ++-
 src/inetd.c                   |    4 ++--
 src/logger.c                  |    2 +-
 src/logprio.h                 |    2 +-
 src/rcp.c                     |    2 +-
 src/rexec.c                   |    2 +-
 src/rexecd.c                  |    2 +-
 src/rlogin.c                  |    2 +-
 src/rlogind.c                 |    2 +-
 src/rsh.c                     |    2 +-
 src/rshd.c                    |    4 ++--
 src/syslogd.c                 |    3 ++-
 src/tftp.c                    |    2 +-
 src/tftpd.c                   |    2 +-
 src/traceroute.c              |    4 ++--
 src/uucpd.c                   |    2 +-
 talk/Makefile.am              |    3 ++-
 talk/ctl.c                    |    2 +-
 talk/ctl_transact.c           |    2 +-
 talk/display.c                |    2 +-
 talk/get_addrs.c              |    2 +-
 talk/get_names.c              |    2 +-
 talk/init_disp.c              |    2 +-
 talk/invite.c                 |    2 +-
 talk/io.c                     |    2 +-
 talk/look_up.c                |    2 +-
 talk/msgs.c                   |    2 +-
 talk/talk.c                   |    2 +-
 talk/talk.h                   |    2 +-
 talk/talk_ctl.h               |    2 +-
 talkd/Makefile.am             |    3 ++-
 talkd/acl.c                   |    2 +-
 talkd/announce.c              |    4 ++--
 talkd/intalkd.h               |    2 +-
 talkd/print.c                 |    4 ++--
 talkd/process.c               |    4 ++--
 talkd/table.c                 |    4 ++--
 talkd/talkd.c                 |    4 ++--
 telnet/Makefile.am            |    3 ++-
 telnet/authenc.c              |    2 +-
 telnet/commands.c             |    2 +-
 telnet/defines.h              |    2 +-
 telnet/externs.h              |    2 +-
 telnet/general.h              |    2 +-
 telnet/krb4-proto.h           |    2 +-
 telnet/main.c                 |    2 +-
 telnet/network.c              |    2 +-
 telnet/ring.c                 |    2 +-
 telnet/ring.h                 |    2 +-
 telnet/sys_bsd.c              |    2 +-
 telnet/telnet.c               |    2 +-
 telnet/terminal.c             |    2 +-
 telnet/tn3270.c               |    2 +-
 telnet/types.h                |    2 +-
 telnet/utilities.c            |    2 +-
 telnetd/Makefile.am           |    3 ++-
 telnetd/pty.c                 |    2 +-
 telnetd/slc.c                 |    2 +-
 telnetd/state.c               |    2 +-
 telnetd/telnetd.c             |    2 +-
 telnetd/telnetd.h             |    4 ++--
 telnetd/term.c                |    2 +-
 telnetd/termstat.c            |    2 +-
 telnetd/utility.c             |    2 +-
 tests/Makefile.am             |    4 ++--
 tests/addrpeek.c              |    2 +-
 tests/ftp-localhost.sh        |    2 +-
 tests/hostname.sh             |    2 +-
 tests/localhost.c             |    4 ++--
 tests/ping-localhost.sh       |    2 +-
 tests/syslogd.sh              |    2 +-
 tests/tftp.sh                 |    2 +-
 tests/traceroute-localhost.sh |    2 +-
 whois/Makefile.am             |    2 +-
 whois/as_del_list             |    2 +-
 whois/data.h                  |    2 +-
 whois/ip_del_list             |    2 +-
 whois/make_as_del.pl          |    2 +-
 whois/make_ip_del.pl          |    2 +-
 whois/make_tld_serv.pl        |    2 +-
 whois/tld_serv_list           |    2 +-
 whois/whois.c                 |    2 +-
 whois/whois.h                 |    2 +-
 220 files changed, 291 insertions(+), 267 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Mon Jan 02 19:31:53 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RhsID-0005rV-9L
	for mharc-commit-inetutils@gnu.org; Mon, 02 Jan 2012 19:31:53 -0500
Received: from eggs.gnu.org ([140.186.70.92]:33309)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RhsI7-0005qs-Rr
	for commit-inetutils@gnu.org; Mon, 02 Jan 2012 19:31:50 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RhsI5-00069e-0T
	for commit-inetutils@gnu.org; Mon, 02 Jan 2012 19:31:47 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:42582)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RhsI4-00069a-PN
	for commit-inetutils@gnu.org; Mon, 02 Jan 2012 19:31:44 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RhsI5-0000yS-1m
	for commit-inetutils@gnu.org; Tue, 03 Jan 2012 00:31:45 +0000
Date: Tue, 03 Jan 2012 00:31:45 +0000
Message-Id: <E1RhsI5-0000yS-1m@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master, updated. inetutils-1_9-3-g01dd21c
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 99c71142f24033c2027a846df7c68be60f0625ef
X-Git-Newrev: 01dd21c666c3fdaf16b1c9d01ac9ae6c03f0297b
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, 03 Jan 2012 00:31:50 -0000

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

The branch, master has been updated
       via  01dd21c666c3fdaf16b1c9d01ac9ae6c03f0297b (commit)
       via  ed4ff5db997369d08959501dbad771ba08dbe795 (commit)
      from  99c71142f24033c2027a846df7c68be60f0625ef (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=01dd21c666c3fdaf16b1c9d01ac9ae6c03f0297b


commit 01dd21c666c3fdaf16b1c9d01ac9ae6c03f0297b
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Tue Jan 3 00:45:44 2012 +0100

    ftpd: Internal address family independence.

diff --git a/ChangeLog b/ChangeLog
index 6135e5d..ed413e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2012-01-03  Mats Erik Andersson <gnu@gisladisker.se>
+
+	Internal address structure rewrite for `ftpd'.
+
+	* ftpd/extern.h (data_dest, his_addr): Change to `struct sockaddr_storage'.
+	(server_mode): New prototype: second argument `struct sockaddr *'.
+	* ftpd/ftpcmd.y (cmd): Use casts to `struct sockaddr_in' to evaluate
+	sub case `host_port'.
+	(yylex) [HAVE_SETPROCTITLE]: Compare to numeric naught, not NULL.
+	* ftpd/ftpd.c (data_dest, his_addr, ctrl_addr, data_source, pasv_addr):
+	Change to `struct sockaddr_storage'.
+	(main): Apply updated server_mode().
+	(main, getdatasock, dataconn): Set IP_TOS only for AF_INET.
+	(dataconn, passive): Copy addresses using memcpy().
+	(statfilecmd): Change SIN to `struct sockaddr_storage'.
+	(statcmd): Casts as `struct sockaddr_in' needed for A and P.
+	(passive): Clear port number depending on address family.
+	Reply with 229 for EPSV/IPv6 and 227 for PASV.
+	* ftpd/server_mode.c (check_host): Activate AF_INET6 case.
+	(server_mode): Second argument is 'struct sockaddr *', must be
+	initiated before call, and returns actual address length.
+	New variable SAVED_ADDRLEN.  Changed call due to these two.
+
 2012-01-02  Mats Erik Andersson <gnu@gisladisker.se>
 
 	Initial address family abstraction for `ftpd'.
diff --git a/ftpd/extern.h b/ftpd/extern.h
index 758e553..d9103fb 100644
--- a/ftpd/extern.h
+++ b/ftpd/extern.h
@@ -89,9 +89,9 @@ extern char *sgetsave (const char *);
 
 /* Exported from ftpd.c.  */
 jmp_buf errcatch;
-extern struct sockaddr_in data_dest;
+extern struct sockaddr_storage data_dest;
 extern socklen_t data_dest_len;
-extern struct sockaddr_in his_addr;
+extern struct sockaddr_storage his_addr;
 extern socklen_t his_addrlen;
 extern int logged_in;
 extern struct passwd *pw;
@@ -113,7 +113,7 @@ extern char tmpline[];
 extern off_t restart_point;
 
 /* Exported from server_mode.c.  */
-extern int server_mode (const char *pidfile, struct sockaddr_in *phis_addr,
+extern int server_mode (const char *pidfile, struct sockaddr *phis_addr,
 			socklen_t *phis_addrlen, char *argv[]);
 
 /* Credential for the request.  */
diff --git a/ftpd/ftpcmd.y b/ftpd/ftpcmd.y
index 3f27a53..62bbcbc 100644
--- a/ftpd/ftpcmd.y
+++ b/ftpd/ftpcmd.y
@@ -182,10 +182,10 @@ cmd
 				pdata = -1;
 			}
 			if ($2) {
-				if (memcmp (&his_addr.sin_addr,
-					&data_dest.sin_addr,
-					sizeof (data_dest.sin_addr)) == 0 &&
-					ntohs (data_dest.sin_port) >
+				if (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) {
 					reply (200, "PORT command successful.");
 				}
@@ -995,7 +995,7 @@ yylex(void)
 			}
 			 alarm(0);
 #ifdef HAVE_SETPROCTITLE
-			if (strncasecmp(cbuf, "PASS", 4) != NULL)
+			if (strncasecmp(cbuf, "PASS", 4) != 0)
 				setproctitle("%s: %s", proctitle, cbuf);
 #endif /* HAVE_SETPROCTITLE */
 			if ((cp = strchr(cbuf, '\r'))) {
diff --git a/ftpd/ftpd.c b/ftpd/ftpd.c
index f483131..dfba2fe 100644
--- a/ftpd/ftpd.c
+++ b/ftpd/ftpd.c
@@ -122,9 +122,9 @@ extern int fclose (FILE *);
 #endif
 
 /* Exported to ftpcmd.h.  */
-struct sockaddr_in data_dest;	/* Data port.  */
+struct sockaddr_storage data_dest;	/* Data port.  */
 socklen_t data_dest_len;
-struct sockaddr_in his_addr;	/* Peer address.  */
+struct sockaddr_storage his_addr;	/* Peer address.  */
 socklen_t his_addrlen;
 int logging;			/* Enable log to syslog.  */
 int type = TYPE_A;		/* Default TYPE_A.  */
@@ -143,11 +143,11 @@ char portstr[8];		/* Numeric port as string.  */
 /* Requester credentials.  */
 struct credentials cred;
 
-static struct sockaddr_in ctrl_addr;	/* Control address.  */
+static struct sockaddr_storage ctrl_addr;	/* Control address.  */
 static socklen_t ctrl_addrlen;
-static struct sockaddr_in data_source;	/* Port address.  */
+static struct sockaddr_storage data_source;	/* Port address.  */
 static socklen_t data_source_len;
-static struct sockaddr_in pasv_addr;	/* Pasv address.  */
+static struct sockaddr_storage pasv_addr;	/* Pasv address.  */
 static socklen_t pasv_addrlen;
 
 static int data = -1;		/* Port data connection socket.  */
@@ -457,7 +457,9 @@ main (int argc, char *argv[], char **envp)
 	    argv[--argc] = NULL;
 	  }
 #endif
-      if (server_mode (pid_file, &his_addr, &his_addrlen, argv) < 0)
+      his_addrlen = sizeof (his_addr);
+      if (server_mode (pid_file, (struct sockaddr *) &his_addr,
+			&his_addrlen, argv) < 0)
 	exit (EXIT_FAILURE);
     }
   else
@@ -493,12 +495,13 @@ main (int argc, char *argv[], char **envp)
 
 #if defined IP_TOS && defined IPTOS_LOWDELAY && defined IPPROTO_IP
   /* To  minimize delays for interactive traffic.  */
-  {
-    int tos = IPTOS_LOWDELAY;
-    if (setsockopt (STDIN_FILENO, IPPROTO_IP, IP_TOS,
+  if (ctrl_addr.ss_family == AF_INET)
+    {
+      int tos = IPTOS_LOWDELAY;
+      if (setsockopt (STDIN_FILENO, IPPROTO_IP, IP_TOS,
 		    (char *) &tos, sizeof (int)) < 0)
-      syslog (LOG_WARNING, "setsockopt (IP_TOS): %m");
-  }
+	syslog (LOG_WARNING, "setsockopt (IP_TOS): %m");
+    }
 #endif
 
 #ifdef SO_OOBINLINE
@@ -1022,7 +1025,7 @@ getdatasock (const char *mode)
   if (data >= 0)
     return fdopen (data, mode);
   seteuid ((uid_t) 0);
-  s = socket (ctrl_addr.sin_family, SOCK_STREAM, 0);
+  s = socket (ctrl_addr.ss_family, SOCK_STREAM, 0);
   if (s < 0)
     goto bad;
 
@@ -1049,11 +1052,12 @@ getdatasock (const char *mode)
   seteuid ((uid_t) cred.uid);
 
 #if defined IP_TOS && defined IPTOS_THROUGHPUT && defined IPPROTO_IP
-  {
-    int on = IPTOS_THROUGHPUT;
-    if (setsockopt (s, IPPROTO_IP, IP_TOS, (char *) &on, sizeof (int)) < 0)
-      syslog (LOG_WARNING, "setsockopt (IP_TOS): %m");
-  }
+  if (ctrl_addr.ss_family == AF_INET)
+    {
+      int on = IPTOS_THROUGHPUT;
+      if (setsockopt (s, IPPROTO_IP, IP_TOS, (char *) &on, sizeof (int)) < 0)
+	syslog (LOG_WARNING, "setsockopt (IP_TOS): %m");
+    }
 #endif
 
   return (fdopen (s, mode));
@@ -1100,10 +1104,11 @@ dataconn (const char *name, off_t size, const char *mode)
       pdata = s;
 #if defined IP_TOS && defined IPTOS_THROUGHPUT && defined IPPROTO_IP
       /* Optimize throughput.  */
-      {
-	int tos = IPTOS_THROUGHPUT;
-	setsockopt (s, IPPROTO_IP, IP_TOS, (char *) &tos, sizeof (int));
-      }
+      if (from.ss_family == AF_INET)
+	{
+	  int tos = IPTOS_THROUGHPUT;
+	  setsockopt (s, IPPROTO_IP, IP_TOS, (char *) &tos, sizeof (int));
+	}
 #endif
 #ifdef SO_KEEPALIVE
       /* Set keepalives on the socket to detect dropped conns.  */
@@ -1126,7 +1131,7 @@ dataconn (const char *name, off_t size, const char *mode)
     }
   if (usedefault)
     {
-      data_dest = his_addr;
+      memcpy (&data_dest, &his_addr, sizeof (data_dest));
       data_dest_len = his_addrlen;
     }
   usedefault = 1;
@@ -1428,7 +1433,7 @@ statfilecmd (const char *filename)
 void
 statcmd (void)
 {
-  struct sockaddr_in *sin;
+  struct sockaddr_storage *sin;
   unsigned char *a, *p;
 
   lreply (211, "%s FTP server status:", hostname);
@@ -1479,8 +1484,8 @@ statcmd (void)
       printf ("     PORT");
       sin = &data_dest;
     printaddr:
-      a = (unsigned char *) & sin->sin_addr;
-      p = (unsigned char *) & sin->sin_port;
+      a = (unsigned char *) & ((struct sockaddr_in *) sin)->sin_addr;
+      p = (unsigned char *) & ((struct sockaddr_in *) sin)->sin_port;
 #define UC(b) (((int) b) & 0xff)
       printf (" (%d,%d,%d,%d,%d,%d)\r\n", UC (a[0]),
 	      UC (a[1]), UC (a[2]), UC (a[3]), UC (p[0]), UC (p[1]));
@@ -1734,15 +1739,20 @@ passive (void)
 {
   char *p, *a;
 
-  pdata = socket (ctrl_addr.sin_family, SOCK_STREAM, 0);
+  pdata = socket (ctrl_addr.ss_family, SOCK_STREAM, 0);
   if (pdata < 0)
     {
       perror_reply (425, "Can't open passive connection");
       return;
     }
-  pasv_addr = ctrl_addr;
+  memcpy (&pasv_addr, &ctrl_addr, sizeof (pasv_addr));
   pasv_addrlen = ctrl_addrlen;
-  pasv_addr.sin_port = 0;
+  /* Erase the port number.  */
+  if (pasv_addr.ss_family == AF_INET6)
+    ((struct sockaddr_in6 *) &pasv_addr)->sin6_port = 0;
+  else	/* !AF_INET6 */
+    ((struct sockaddr_in *) &pasv_addr)->sin_port = 0;
+
   seteuid ((uid_t) 0);
   if (bind (pdata, (struct sockaddr *) &pasv_addr, pasv_addrlen) < 0)
     {
@@ -1755,14 +1765,24 @@ passive (void)
     goto pasv_error;
   if (listen (pdata, 1) < 0)
     goto pasv_error;
-  a = (char *) &pasv_addr.sin_addr;
-  p = (char *) &pasv_addr.sin_port;
+
+  if (pasv_addr.ss_family == AF_INET6)
+    {
+      reply (229, "Extended Passive Mode OK (|||%u|)",
+	     ((struct sockaddr_in6 *) &pasv_addr)->sin6_port);
+      return;
+    }
+  else
+    {
+      a = (char *) &((struct sockaddr_in *) &pasv_addr)->sin_addr;
+      p = (char *) &((struct sockaddr_in *) &pasv_addr)->sin_port;
 
 #define UC(b) (((int) b) & 0xff)
 
-  reply (227, "Entering Passive Mode (%d,%d,%d,%d,%d,%d)", UC (a[0]),
-	 UC (a[1]), UC (a[2]), UC (a[3]), UC (p[0]), UC (p[1]));
-  return;
+      reply (227, "Entering Passive Mode (%d,%d,%d,%d,%d,%d)", UC (a[0]),
+	     UC (a[1]), UC (a[2]), UC (a[3]), UC (p[0]), UC (p[1]));
+      return;
+    }
 
 pasv_error:
   close (pdata);
diff --git a/ftpd/server_mode.c b/ftpd/server_mode.c
index 84820d0..6ef6ef4 100644
--- a/ftpd/server_mode.c
+++ b/ftpd/server_mode.c
@@ -57,7 +57,7 @@ check_host (struct sockaddr *sa, socklen_t len)
   char name[NI_MAXHOST];
 
   if (sa->sa_family != AF_INET
-      /* && sa->sa_family != AF_INET6 */)
+      && sa->sa_family != AF_INET6)
     return 1;
 
   (void) getnameinfo(sa, len, addr, sizeof (addr), NULL, 0, NI_NUMERICHOST);
@@ -93,14 +93,18 @@ reapchild (int signo _GL_UNUSED_PARAMETER)
   errno = save_errno;
 }
 
+/* The parameter '*phis_addrlen' must be initiated
+   with the space available at calling time.
+   The actually used space will then be returned.  */
 int
-server_mode (const char *pidfile, struct sockaddr_in *phis_addr,
+server_mode (const char *pidfile, struct sockaddr *phis_addr,
 	     socklen_t *phis_addrlen, char *argv[])
 {
   int ctl_sock, fd;
   struct servent *sv;
   int port, err;
   char portstr[8];
+  socklen_t saved_addrlen = *phis_addrlen;
   struct addrinfo hints, *res, *ai;
 
   /* Become a daemon.  */
@@ -189,8 +193,8 @@ server_mode (const char *pidfile, struct sockaddr_in *phis_addr,
      children to handle them.  */
   while (1)
     {
-      *phis_addrlen = sizeof (*phis_addr);
-      fd = accept (ctl_sock, (struct sockaddr *) phis_addr, phis_addrlen);
+      *phis_addrlen = saved_addrlen;
+      fd = accept (ctl_sock, phis_addr, phis_addrlen);
       if (fork () == 0)		/* child */
 	{
 	  dup2 (fd, 0);
@@ -203,7 +207,7 @@ server_mode (const char *pidfile, struct sockaddr_in *phis_addr,
 
 #ifdef WITH_WRAP
   /* In the child.  */
-  if (!check_host ((struct sockaddr *) phis_addr, *phis_addrlen))
+  if (!check_host (phis_addr, *phis_addrlen))
     return -1;
 #endif
 

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


commit ed4ff5db997369d08959501dbad771ba08dbe795
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Mon Jan 2 22:29:14 2012 +0100

    ftpd: First step for address independence.

diff --git a/ChangeLog b/ChangeLog
index 16cbaa6..6135e5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2012-01-02  Mats Erik Andersson <gnu@gisladisker.se>
+
+	Initial address family abstraction for `ftpd'.
+
+	* ftpd/extern.h: Include <netinet/in.h>.
+	(data_dest_len, his_addr_len): New socklen_t variables.
+	(server_mode): Use a socklen_t argument.
+	* ftpd/ftpcmd.y: Include <netdb.h>.
+	(cmd) [unix || __unix__]: SYS_TYPE must recognize __unix__.
+	(host_port): Use getaddrinfo to initiate DATA_DEST.
+	* ftpd/ftpd.c (data_set_len, his_addrlen, addrstr, portstr,
+	ctrl_addrlen, data_source_len, pasv_addrlen): New variables.
+	[HAVE_LIBWRAP] (check_host): Prototype extended with socklen_t.
+	(dolog): Likewise.
+	(main): Use HIS_ADDRLEN, CTRL_ADDRLEN instead of local ADDRLEN.
+	Changed calls to server_mode and dolog due to new prototypes.
+	(getdatasock): Address family determined by CTRL_ADDR.  Inherit
+	fields in DATA_SOURCE from CTRL_ADDR, and DATA_SOURCE_LEN from
+	CTRL_ADDRLEN.  Dynamic address length to bind().
+	(dataconn): Use FROM as `struct sockaddr_storage.  Change socket
+	descriptor S to be `int'.  Assign DATA_DEST and DATA_DEST_LEN
+	in a block.  Use getnameinfo for error message.  Dynamic socket
+	length in connect().
+	(statcmd): Lookup using getnameinfo().
+	(dolog): New prototype, extended by `socklen_t'.  Likewise.
+	(passive): Removed variable LEN, now using length and family stored
+	in address variables, which are global.
+	* ftpd/server_mode.c (check_host): New prototype: adding `socklen_t'.
+	Removed SIN, HP. New variables ERR, NAME.  Lookup uses getnameinfo().
+	(server_mode): New prototype: adding `socklen_t'.  Delete SERVER_ADDR.
+	New varables ERR, PORTSTR, HINTS, RES, AI.  Lookup uses getaddrinfo
+	and a loop to get listener.  Server loop removes ADDRLEN, now setting
+	address length by use of PHIS_ADDRLEN.
+
 2011-12-31  Alfred M. Szmidt  <ams@gnu.org>
 
 	inetutils 1.9
diff --git a/ftpd/extern.h b/ftpd/extern.h
index 8fee0a2..758e553 100644
--- a/ftpd/extern.h
+++ b/ftpd/extern.h
@@ -51,6 +51,7 @@
 #include <setjmp.h>
 #include <getopt.h>
 #include <sys/types.h>
+#include <netinet/in.h>
 
 extern void cwd (const char *);
 extern int checkuser (const char *filename, const char *name);
@@ -89,7 +90,9 @@ extern char *sgetsave (const char *);
 /* Exported from ftpd.c.  */
 jmp_buf errcatch;
 extern struct sockaddr_in data_dest;
+extern socklen_t data_dest_len;
 extern struct sockaddr_in his_addr;
+extern socklen_t his_addrlen;
 extern int logged_in;
 extern struct passwd *pw;
 extern int guest;
@@ -111,7 +114,7 @@ extern off_t restart_point;
 
 /* Exported from server_mode.c.  */
 extern int server_mode (const char *pidfile, struct sockaddr_in *phis_addr,
-			char *argv[]);
+			socklen_t *phis_addrlen, char *argv[]);
 
 /* Credential for the request.  */
 struct credentials
diff --git a/ftpd/ftpcmd.y b/ftpd/ftpcmd.y
index 879b4c5..3f27a53 100644
--- a/ftpd/ftpcmd.y
+++ b/ftpd/ftpcmd.y
@@ -62,6 +62,7 @@
 #include <sys/stat.h>
 
 #include <netinet/in.h>
+#include <netdb.h>
 #include <arpa/ftp.h>
 
 #include <ctype.h>
@@ -493,7 +494,7 @@ cmd
 #endif
 #endif
 
-#ifdef unix
+#if defined unix || defined __unix__
 			sys_type = "UNIX";
 #else
 			sys_type = "UNKNOWN";
@@ -608,16 +609,29 @@ host_port
 	: NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA
 		NUMBER COMMA NUMBER
 		{
-			char *a, *p;
-
-			a = (char *)&data_dest.sin_addr;
-			a[0] = $1; a[1] = $3; a[2] = $5; a[3] = $7;
-			p = (char *)&data_dest.sin_port;
-			p[0] = $9; p[1] = $11;
-			data_dest.sin_family = AF_INET;
-#if HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
-			data_dest.sin_len = sizeof (struct sockaddr_in);
+			int err;
+			char a[INET_ADDRSTRLEN], p[8];
+			struct addrinfo hints, *res;
+
+			snprintf (a, sizeof (a), "%u.%u.%u.%u",
+				$1 & 0xff, $3 & 0xff, $5 & 0xff, $7 & 0xff);
+			snprintf (p, sizeof (p), "%u",
+				(($9 & 0xff) << 8) + ($11 & 0xff));
+			memset (&hints, 0, sizeof (hints));
+			hints.ai_family = AF_INET;
+			hints.ai_socktype = SOCK_STREAM;
+#ifdef AI_ADDRCONFIG
+			hints.ai_flags = AI_ADDRCONFIG;
 #endif
+			err = getaddrinfo (a, p, &hints, &res);
+			if (err)
+			  reply (550, "Address failure: %s,%s", a, p);
+			else
+			  {
+			    memcpy (&data_dest, res->ai_addr, res->ai_addrlen);
+			    data_dest_len = res->ai_addrlen;
+			    freeaddrinfo (res);
+			  }
 		}
 	;
 
diff --git a/ftpd/ftpd.c b/ftpd/ftpd.c
index f7e945c..f483131 100644
--- a/ftpd/ftpd.c
+++ b/ftpd/ftpd.c
@@ -123,7 +123,9 @@ extern int fclose (FILE *);
 
 /* Exported to ftpcmd.h.  */
 struct sockaddr_in data_dest;	/* Data port.  */
+socklen_t data_dest_len;
 struct sockaddr_in his_addr;	/* Peer address.  */
+socklen_t his_addrlen;
 int logging;			/* Enable log to syslog.  */
 int type = TYPE_A;		/* Default TYPE_A.  */
 int form = FORM_N;		/* Default FORM_N.  */
@@ -135,13 +137,18 @@ int pdata = -1;			/* For passive mode.  */
 char *hostname;			/* Who we are.  */
 int usedefault = 1;		/* For data transfers.  */
 char tmpline[7];		/* Temp buffer use in OOB.  */
+char addrstr[NI_MAXHOST];	/* Host name or address string.  */
+char portstr[8];		/* Numeric port as string.  */
 
 /* Requester credentials.  */
 struct credentials cred;
 
 static struct sockaddr_in ctrl_addr;	/* Control address.  */
+static socklen_t ctrl_addrlen;
 static struct sockaddr_in data_source;	/* Port address.  */
+static socklen_t data_source_len;
 static struct sockaddr_in pasv_addr;	/* Pasv address.  */
+static socklen_t pasv_addrlen;
 
 static int data = -1;		/* Port data connection socket.  */
 static jmp_buf urgcatch;
@@ -230,12 +237,12 @@ extern int yyparse (void);
 
 static void ack (const char *);
 #ifdef HAVE_LIBWRAP
-static int check_host (struct sockaddr *sa);
+static int check_host (struct sockaddr *sa, socklen_t len);
 #endif
 static void complete_login (struct credentials *);
 static char *curdir (void);
 static FILE *dataconn (const char *, off_t, const char *);
-static void dolog (struct sockaddr_in *, struct credentials *);
+static void dolog (struct sockaddr *, socklen_t, struct credentials *);
 static void end_login (struct credentials *);
 static FILE *getdatasock (const char *);
 static char *gunique (const char *);
@@ -450,14 +457,14 @@ main (int argc, char *argv[], char **envp)
 	    argv[--argc] = NULL;
 	  }
 #endif
-      if (server_mode (pid_file, &his_addr, argv) < 0)
+      if (server_mode (pid_file, &his_addr, &his_addrlen, argv) < 0)
 	exit (EXIT_FAILURE);
     }
   else
     {
-      socklen_t addrlen = sizeof (his_addr);
+      his_addrlen = sizeof (his_addr);
       if (getpeername (STDIN_FILENO, (struct sockaddr *) &his_addr,
-		       &addrlen) < 0)
+		       &his_addrlen) < 0)
 	{
 	  syslog (LOG_ERR, "getpeername (%s): %m", program_name);
 	  exit (EXIT_FAILURE);
@@ -475,9 +482,9 @@ main (int argc, char *argv[], char **envp)
 
   /* Get info on the ctrl connection.  */
   {
-    socklen_t addrlen = sizeof (ctrl_addr);
+    ctrl_addrlen = sizeof (ctrl_addr);
     if (getsockname (STDIN_FILENO, (struct sockaddr *) &ctrl_addr,
-		     &addrlen) < 0)
+		     &ctrl_addrlen) < 0)
       {
 	syslog (LOG_ERR, "getsockname (%s): %m", program_name);
 	exit (EXIT_FAILURE);
@@ -519,7 +526,7 @@ main (int argc, char *argv[], char **envp)
     syslog (LOG_ERR, "fcntl F_SETOWN: %m");
 #endif
 
-  dolog (&his_addr, &cred);
+  dolog ((struct sockaddr *) &his_addr, his_addrlen, &cred);
 
   /* Deal with login disable.  */
   if (display_file (PATH_NOLOGIN, 530) == 0)
@@ -1015,7 +1022,7 @@ getdatasock (const char *mode)
   if (data >= 0)
     return fdopen (data, mode);
   seteuid ((uid_t) 0);
-  s = socket (AF_INET, SOCK_STREAM, 0);
+  s = socket (ctrl_addr.sin_family, SOCK_STREAM, 0);
   if (s < 0)
     goto bad;
 
@@ -1028,15 +1035,12 @@ getdatasock (const char *mode)
   }
 
   /* anchor socket to avoid multi-homing problems */
-  data_source.sin_family = AF_INET;
-  data_source.sin_addr = ctrl_addr.sin_addr;
-#if HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
-  data_source.sin_len = sizeof (struct sockaddr_in);
-#endif
+  memcpy (&data_source, &ctrl_addr, sizeof (data_source));
+  data_source_len = ctrl_addrlen;
+
   for (tries = 1;; tries++)
     {
-      if (bind (s, (struct sockaddr *) &data_source,
-		sizeof (data_source)) >= 0)
+      if (bind (s, (struct sockaddr *) &data_source, data_source_len) >= 0)
 	break;
       if (errno != EADDRINUSE || tries > 10)
 	goto bad;
@@ -1077,8 +1081,8 @@ dataconn (const char *name, off_t size, const char *mode)
     *sizebuf = '\0';
   if (pdata >= 0)
     {
-      struct sockaddr_in from;
-      socklen_t s;
+      struct sockaddr_storage from;
+      int s;
       socklen_t fromlen = sizeof (from);
 
       signal (SIGALRM, toolong);
@@ -1121,19 +1125,25 @@ dataconn (const char *name, off_t size, const char *mode)
       return fdopen (data, mode);
     }
   if (usedefault)
-    data_dest = his_addr;
+    {
+      data_dest = his_addr;
+      data_dest_len = his_addrlen;
+    }
   usedefault = 1;
   file = getdatasock (mode);
   if (file == NULL)
     {
-      reply (425, "Can't create data socket (%s,%d): %s.",
-	     inet_ntoa (data_source.sin_addr),
-	     ntohs (data_source.sin_port), strerror (errno));
+      int oerrno = errno;
+      (void) getnameinfo ((struct sockaddr *) &data_source, data_source_len,
+			  addrstr, sizeof (addrstr),
+			  portstr, sizeof (portstr),
+			  NI_NUMERICSERV);
+      reply (425, "Can't create data socket (%s,%s): %s.",
+	     addrstr, portstr, strerror (oerrno));
       return NULL;
     }
   data = fileno (file);
-  while (connect (data, (struct sockaddr *) &data_dest,
-		  sizeof (data_dest)) < 0)
+  while (connect (data, (struct sockaddr *) &data_dest, data_dest_len) < 0)
     {
       if (errno == EADDRINUSE && retry < swaitmax)
 	{
@@ -1425,8 +1435,10 @@ statcmd (void)
   if (!no_version)
     printf ("     ftpd (%s) %s\r\n", PACKAGE_NAME, PACKAGE_VERSION);
   printf ("     Connected to %s", cred.remotehost);
+  (void) getnameinfo ((struct sockaddr *) &his_addr, his_addrlen,
+		      addrstr, sizeof (addrstr), NULL, 0, NI_NUMERICHOST);
   if (!isdigit (cred.remotehost[0]))
-    printf (" (%s)", inet_ntoa (his_addr.sin_addr));
+    printf (" (%s)", addrstr);
   printf ("\r\n");
   if (cred.logged_in)
     {
@@ -1645,19 +1657,12 @@ renamecmd (const char *from, const char *to)
 }
 
 static void
-dolog (struct sockaddr_in *sin, struct credentials *pcred)
+dolog (struct sockaddr *sa, socklen_t salen, struct credentials *pcred)
 {
-  const char *name;
-  struct hostent *hp = gethostbyaddr ((char *) &sin->sin_addr,
-				      sizeof (struct in_addr), AF_INET);
-
-  if (hp)
-    name = hp->h_name;
-  else
-    name = inet_ntoa (sin->sin_addr);
+  (void) getnameinfo (sa, salen, addrstr, sizeof (addrstr), NULL, 0, 0);
 
   free (pcred->remotehost);
-  pcred->remotehost = sgetsave (name);
+  pcred->remotehost = sgetsave (addrstr);
 
 #ifdef HAVE_SETPROCTITLE
   snprintf (proctitle, sizeof (proctitle), "%s: connected",
@@ -1727,26 +1732,26 @@ myoob (int signo _GL_UNUSED_PARAMETER)
 void
 passive (void)
 {
-  socklen_t len;
   char *p, *a;
 
-  pdata = socket (AF_INET, SOCK_STREAM, 0);
+  pdata = socket (ctrl_addr.sin_family, SOCK_STREAM, 0);
   if (pdata < 0)
     {
       perror_reply (425, "Can't open passive connection");
       return;
     }
   pasv_addr = ctrl_addr;
+  pasv_addrlen = ctrl_addrlen;
   pasv_addr.sin_port = 0;
   seteuid ((uid_t) 0);
-  if (bind (pdata, (struct sockaddr *) &pasv_addr, sizeof (pasv_addr)) < 0)
+  if (bind (pdata, (struct sockaddr *) &pasv_addr, pasv_addrlen) < 0)
     {
       seteuid ((uid_t) cred.uid);
       goto pasv_error;
     }
   seteuid ((uid_t) cred.uid);
-  len = sizeof (pasv_addr);
-  if (getsockname (pdata, (struct sockaddr *) &pasv_addr, &len) < 0)
+  pasv_addrlen = sizeof (pasv_addr);
+  if (getsockname (pdata, (struct sockaddr *) &pasv_addr, &pasv_addrlen) < 0)
     goto pasv_error;
   if (listen (pdata, 1) < 0)
     goto pasv_error;
diff --git a/ftpd/server_mode.c b/ftpd/server_mode.c
index d8ca5a6..84820d0 100644
--- a/ftpd/server_mode.c
+++ b/ftpd/server_mode.c
@@ -50,25 +50,24 @@ int allow_severity = LOG_INFO;
 int deny_severity = LOG_NOTICE;
 
 static int
-check_host (struct sockaddr *sa)
+check_host (struct sockaddr *sa, socklen_t len)
 {
-  struct sockaddr_in *sin;
-  struct hostent *hp;
-  char *addr;
+  int err;
+  char addr[INET6_ADDRSTRLEN];
+  char name[NI_MAXHOST];
 
-  if (sa->sa_family != AF_INET)
+  if (sa->sa_family != AF_INET
+      /* && sa->sa_family != AF_INET6 */)
     return 1;
 
-  sin = (struct sockaddr_in *) sa;
-  hp = gethostbyaddr ((char *) &sin->sin_addr,
-		      sizeof (struct in_addr), AF_INET);
-  addr = inet_ntoa (sin->sin_addr);
-  if (hp)
+  (void) getnameinfo(sa, len, addr, sizeof (addr), NULL, 0, NI_NUMERICHOST);
+  err = getnameinfo(sa, len, name, sizeof (name), NULL, 0, NI_NAMEREQD);
+  if (!err)
     {
-      if (!hosts_ctl ("ftpd", hp->h_name, addr, STRING_UNKNOWN))
+      if (!hosts_ctl ("ftpd", name, addr, STRING_UNKNOWN))
 	{
 	  syslog (LOG_NOTICE, "tcpwrappers rejected: %s [%s]",
-		  hp->h_name, addr);
+		  name, addr);
 	  return 0;
 	}
     }
@@ -95,12 +94,14 @@ reapchild (int signo _GL_UNUSED_PARAMETER)
 }
 
 int
-server_mode (const char *pidfile, struct sockaddr_in *phis_addr, char *argv[])
+server_mode (const char *pidfile, struct sockaddr_in *phis_addr,
+	     socklen_t *phis_addrlen, char *argv[])
 {
   int ctl_sock, fd;
   struct servent *sv;
-  int port;
-  static struct sockaddr_in server_addr;	/* Our address.  */
+  int port, err;
+  char portstr[8];
+  struct addrinfo hints, *res, *ai;
 
   /* Become a daemon.  */
   if (daemon (1, 1) < 0)
@@ -113,38 +114,61 @@ server_mode (const char *pidfile, struct sockaddr_in *phis_addr, char *argv[])
   /* Get port for ftp/tcp.  */
   sv = getservbyname ("ftp", "tcp");
   port = (sv == NULL) ? DEFPORT : ntohs (sv->s_port);
+  snprintf (portstr, sizeof (portstr), "%u", port);
+
+  memset (&hints, 0, sizeof (hints));
+  hints.ai_family = AF_INET;
+  hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_PASSIVE;
+#ifdef AI_ADDRCONFIG
+  hints.ai_flags |= AI_ADDRCONFIG;
+#endif
 
-  /* Open socket, bind and start listen.  */
-  ctl_sock = socket (AF_INET, SOCK_STREAM, 0);
-  if (ctl_sock < 0)
+  err = getaddrinfo (NULL, portstr, &hints, &res);
+  if (err)
     {
-      syslog (LOG_ERR, "control socket: %m");
+      syslog (LOG_ERR, "control socket: %s", gai_strerror (err));
       return -1;
     }
+  /* Attempt to open socket, bind and start listen.  */
+  for (ai = res; ai; ai = ai->ai_next)
+    {
+      ctl_sock = socket (ai->ai_family, ai->ai_socktype, ai->ai_protocol);
+      if (ctl_sock < 0)
+	continue;
 
-  /* Enable local address reuse.  */
-  {
-    int on = 1;
-    if (setsockopt (ctl_sock, SOL_SOCKET, SO_REUSEADDR,
-		    (char *) &on, sizeof (on)) < 0)
-      syslog (LOG_ERR, "control setsockopt: %m");
-  }
+      /* Enable local address reuse.  */
+      {
+	int on = 1;
+	if (setsockopt (ctl_sock, SOL_SOCKET, SO_REUSEADDR,
+			(char *) &on, sizeof (on)) < 0)
+	  syslog (LOG_ERR, "control setsockopt: %m");
+      }
 
-  memset (&server_addr, 0, sizeof server_addr);
-  server_addr.sin_family = AF_INET;
-  server_addr.sin_port = htons (port);
-#if HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
-  server_addr.sin_len = sizeof (struct sockaddr_in);
-#endif
+      if (bind (ctl_sock, ai->ai_addr, ai->ai_addrlen))
+	{
+	  close (ctl_sock);
+	  ctl_sock = -1;
+	  continue;
+	}
 
-  if (bind (ctl_sock, (struct sockaddr *) &server_addr, sizeof server_addr))
-    {
-      syslog (LOG_ERR, "control bind: %m");
-      return -1;
+      if (listen (ctl_sock, 32) < 0)
+	{
+	  close (ctl_sock);
+	  ctl_sock = -1;
+	  continue;
+	}
+
+      /* Accept the first choice!  */
+      break;
     }
-  if (listen (ctl_sock, 32) < 0)
+
+  if (res)
+    freeaddrinfo (res);
+
+  if (ai == NULL)
     {
-      syslog (LOG_ERR, "control listen: %m");
+      syslog (LOG_ERR, "control socket: %m");
       return -1;
     }
 
@@ -165,8 +189,8 @@ server_mode (const char *pidfile, struct sockaddr_in *phis_addr, char *argv[])
      children to handle them.  */
   while (1)
     {
-      socklen_t addrlen = sizeof (*phis_addr);
-      fd = accept (ctl_sock, (struct sockaddr *) phis_addr, &addrlen);
+      *phis_addrlen = sizeof (*phis_addr);
+      fd = accept (ctl_sock, (struct sockaddr *) phis_addr, phis_addrlen);
       if (fork () == 0)		/* child */
 	{
 	  dup2 (fd, 0);
@@ -179,7 +203,7 @@ server_mode (const char *pidfile, struct sockaddr_in *phis_addr, char *argv[])
 
 #ifdef WITH_WRAP
   /* In the child.  */
-  if (!check_host ((struct sockaddr *) phis_addr))
+  if (!check_host ((struct sockaddr *) phis_addr, *phis_addrlen))
     return -1;
 #endif
 

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

Summary of changes:
 ChangeLog          |   57 ++++++++++++++++++
 ftpd/extern.h      |   11 ++-
 ftpd/ftpcmd.y      |   44 +++++++++-----
 ftpd/ftpd.c        |  163 ++++++++++++++++++++++++++++++----------------------
 ftpd/server_mode.c |  110 ++++++++++++++++++++++-------------
 5 files changed, 256 insertions(+), 129 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Mon Jan 02 20:43:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RhtPW-0008Rn-5d
	for mharc-commit-inetutils@gnu.org; Mon, 02 Jan 2012 20:43:30 -0500
Received: from eggs.gnu.org ([140.186.70.92]:44992)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1RhtPT-0008RK-8O
	for commit-inetutils@gnu.org; Mon, 02 Jan 2012 20:43:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ams@gnu.org>) id 1RhtPR-0005t2-V8
	for commit-inetutils@gnu.org; Mon, 02 Jan 2012 20:43:27 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:50673)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1RhtPR-0005sx-TY
	for commit-inetutils@gnu.org; Mon, 02 Jan 2012 20:43:25 -0500
Received: from ams by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <ams@gnu.org>) id 1RhtPR-0001ll-GI
	for commit-inetutils@gnu.org; Tue, 03 Jan 2012 01:43:25 +0000
Date: Tue, 03 Jan 2012 01:43:25 +0000
Message-Id: <E1RhtPR-0001ll-GI@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master, updated. inetutils-1_9-4-ga6e53e7
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 01dd21c666c3fdaf16b1c9d01ac9ae6c03f0297b
X-Git-Newrev: a6e53e7914367ae9263416e0cd1b8deef7a2d93b
From: "Alfred M. Szmidt" <ams@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Jan 2012 01:43:28 -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  a6e53e7914367ae9263416e0cd1b8deef7a2d93b (commit)
      from  01dd21c666c3fdaf16b1c9d01ac9ae6c03f0297b (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=a6e53e7914367ae9263416e0cd1b8deef7a2d93b


commit a6e53e7914367ae9263416e0cd1b8deef7a2d93b
Author: Alfred M. Szmidt <ams@gnu.org>
Date:   Tue Jan 3 02:43:18 2012 +0100

    bootstrap.conf (gnulib_modules): Removed git-merge-changelog.

diff --git a/ChangeLog b/ChangeLog
index ed413e3..774ce14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-01-03  Alfred M. Szmidt  <ams@gnu.org>
+
+	* bootstrap.conf (gnulib_modules): Removed git-merge-changelog.
+
 2012-01-03  Mats Erik Andersson <gnu@gisladisker.se>
 
 	Internal address structure rewrite for `ftpd'.
diff --git a/bootstrap.conf b/bootstrap.conf
index 57e4fbd..d91b654 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -59,7 +59,6 @@ getpass
 gettext
 gettext-h
 getusershell
-git-merge-changelog
 git-version-gen
 glob
 gnupload

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

Summary of changes:
 ChangeLog      |    4 ++++
 bootstrap.conf |    1 -
 2 files changed, 4 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed Jan 04 12:52:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiV0n-0005xn-Sd
	for mharc-commit-inetutils@gnu.org; Wed, 04 Jan 2012 12:52:29 -0500
Received: from eggs.gnu.org ([140.186.70.92]:49393)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RiV0l-0005xh-GU
	for commit-inetutils@gnu.org; Wed, 04 Jan 2012 12:52:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RiV0j-00049M-Ne
	for commit-inetutils@gnu.org; Wed, 04 Jan 2012 12:52:27 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:34226)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RiV0j-00049I-JY
	for commit-inetutils@gnu.org; Wed, 04 Jan 2012 12:52:25 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RiV0j-0003b6-0I
	for commit-inetutils@gnu.org; Wed, 04 Jan 2012 17:52:25 +0000
Date: Wed, 04 Jan 2012 17:52:25 +0000
Message-Id: <E1RiV0j-0003b6-0I@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master, updated. inetutils-1_9-5-gdd43de5
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: a6e53e7914367ae9263416e0cd1b8deef7a2d93b
X-Git-Newrev: dd43de5f41d00394cdff2fedabbf8e97e059d79b
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, 04 Jan 2012 17:52:28 -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  dd43de5f41d00394cdff2fedabbf8e97e059d79b (commit)
      from  a6e53e7914367ae9263416e0cd1b8deef7a2d93b (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=dd43de5f41d00394cdff2fedabbf8e97e059d79b


commit dd43de5f41d00394cdff2fedabbf8e97e059d79b
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed Jan 4 18:33:06 2012 +0100

    ftpd: Regression with active connections.
    
    In using an active connection, the port was not cleared properly,
    leading to a missed port allocation in bind().  A minor portability
    issue lead to change of hints for getaddrinfo() in resolving `host_port'.

diff --git a/ChangeLog b/ChangeLog
index 774ce14..06cc08f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-01-04  Mats Erik Andersson <gnu@gisladisker.se>
+
+	Regression: Erase port for active data transmission.
+
+	* ftpd/ftpcmd.y (host_port): Use AI_NUMERICHOST and AI_NUMERICSERV
+	in `HINTS.ai_flags'.  Do not use AI_ADDRCONFIG.
+	* ftpd/ftpd.c (getdatasock): Erase port number stored in DATA_SOURCE.
+	* tests/ftp-localhost.sh: Detect transfered data and duplicate tests
+	also for an active connection, not only a passive attempt.
+
 2012-01-03  Alfred M. Szmidt  <ams@gnu.org>
 
 	* bootstrap.conf (gnulib_modules): Removed git-merge-changelog.
diff --git a/ftpd/ftpcmd.y b/ftpd/ftpcmd.y
index 62bbcbc..49a4355 100644
--- a/ftpd/ftpcmd.y
+++ b/ftpd/ftpcmd.y
@@ -620,9 +620,8 @@ host_port
 			memset (&hints, 0, sizeof (hints));
 			hints.ai_family = AF_INET;
 			hints.ai_socktype = SOCK_STREAM;
-#ifdef AI_ADDRCONFIG
-			hints.ai_flags = AI_ADDRCONFIG;
-#endif
+			hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV;
+
 			err = getaddrinfo (a, p, &hints, &res);
 			if (err)
 			  reply (550, "Address failure: %s,%s", a, p);
diff --git a/ftpd/ftpd.c b/ftpd/ftpd.c
index dfba2fe..29e9eed 100644
--- a/ftpd/ftpd.c
+++ b/ftpd/ftpd.c
@@ -1037,10 +1037,23 @@ getdatasock (const char *mode)
       goto bad;
   }
 
-  /* anchor socket to avoid multi-homing problems */
+  /* Anchor socket to avoid multi-homing problems.  */
   memcpy (&data_source, &ctrl_addr, sizeof (data_source));
   data_source_len = ctrl_addrlen;
 
+  /* Erase port number, suggesting bind() to allocate a new port.  */
+  switch (data_source.ss_family)
+    {
+    case AF_INET6:
+      ((struct sockaddr_in6 *) &data_source)->sin6_port = 0;
+      break;
+    case AF_INET:
+      ((struct sockaddr_in *) &data_source)->sin_port = 0;
+      break;
+    default:
+      break;	/* Do nothing; should not happen!  */
+    }
+
   for (tries = 1;; tries++)
     {
       if (bind (s, (struct sockaddr *) &data_source, data_source_len) >= 0)
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index 2eec944..556a717 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -74,6 +74,8 @@ $INETD --pidfile=$TMPDIR/inetd.pid $TMPDIR/inetd.conf
 # Wait for inetd to write pid and open socket
 sleep 2
 
+# Test a passive connection.
+#
 cat <<STOP |
 rstatus
 dir
@@ -93,8 +95,48 @@ if [ $errno != 0 ]; then
     exit 77
 fi
 
+# Standing control connection?
+if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
+    echo cannot find expected output for passive ftp client?
+    exit 1
+fi
+
+# Was data transfer successful?
+if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
+    echo cannot find transfer result for passive ftp client?
+    exit 1
+fi
+
+# Test an active connection.
+#
+cat <<STOP |
+rstatus
+dir
+STOP
+HOME=$TMPDIR $FTP $TARGET 4711 -4 -v -t >$TMPDIR/ftp.stdout
+
+errno=$?
+cat $TMPDIR/ftp.stdout
+
+if [ $errno != 0 ]; then
+    echo running ftp failed? errno $errno
+    exit 77
+fi
+
+if [ $errno != 0 ]; then
+    echo running ftp failed? errno $errno
+    exit 77
+fi
+
+# Standing control connection?
 if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
-    echo cannot find expected output from ftp client?
+    echo cannot find expected output for active ftp client?
+    exit 1
+fi
+
+# Was data transfer successful?
+if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
+    echo cannot find transfer result for active ftp client?
     exit 1
 fi
 

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

Summary of changes:
 ChangeLog              |   10 ++++++++++
 ftpd/ftpcmd.y          |    5 ++---
 ftpd/ftpd.c            |   15 ++++++++++++++-
 tests/ftp-localhost.sh |   44 +++++++++++++++++++++++++++++++++++++++++++-
 4 files changed, 69 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Fri Jan 06 09:22:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjAgG-0007bS-Vl
	for mharc-commit-inetutils@gnu.org; Fri, 06 Jan 2012 09:22:04 -0500
Received: from eggs.gnu.org ([140.186.70.92]:36981)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1RjAg9-0007aH-Sf
	for commit-inetutils@gnu.org; Fri, 06 Jan 2012 09:22:03 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1RjAg8-00067O-Cd
	for commit-inetutils@gnu.org; Fri, 06 Jan 2012 09:21:57 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:55474)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1RjAg8-00067K-B3
	for commit-inetutils@gnu.org; Fri, 06 Jan 2012 09:21:56 -0500
Received: from jas by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <simon@josefsson.org>) id 1RjAg8-0002bc-6Q
	for commit-inetutils@gnu.org; Fri, 06 Jan 2012 14:21:56 +0000
Date: Fri, 06 Jan 2012 14:21:56 +0000
Message-Id: <E1RjAg8-0002bc-6Q@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master, updated. inetutils-1_9-9-g1a11478
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: dd43de5f41d00394cdff2fedabbf8e97e059d79b
X-Git-Newrev: 1a11478c8f3471c7486fa45e7487b82b69b4c9d1
From: Simon Josefsson <simon@josefsson.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Jan 2012 14:22:03 -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  1a11478c8f3471c7486fa45e7487b82b69b4c9d1 (commit)
       via  9e401abb7ba0d88937f064a73ce1def14a8cb8a3 (commit)
       via  7fbe1d8462040244067c8f5df4b10535c92eaca9 (commit)
       via  7824e9e70661b4dae45667a0fe7ceefa21de16c4 (commit)
      from  dd43de5f41d00394cdff2fedabbf8e97e059d79b (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=1a11478c8f3471c7486fa45e7487b82b69b4c9d1


commit 1a11478c8f3471c7486fa45e7487b82b69b4c9d1
Author: Simon Josefsson <simon@josefsson.org>
Date:   Fri Jan 6 15:10:25 2012 +0100

    Mention release tag (silent change).

diff --git a/ChangeLog b/ChangeLog
index 4be9881..5c2cb89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2012-01-06  Simon Josefsson  <simon@josefsson.org>
 
+	inetutils 1.9.1
+
 	* configure.ac: Replace all '_' into '.'.
 
 	* NEWS: Updated.

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


commit 9e401abb7ba0d88937f064a73ce1def14a8cb8a3
Author: Simon Josefsson <simon@josefsson.org>
Date:   Fri Jan 6 15:05:48 2012 +0100

    configure.ac: Replace all '_' into '.'.

diff --git a/ChangeLog b/ChangeLog
index 27e4e69..4be9881 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2012-01-06  Simon Josefsson  <simon@josefsson.org>
 
+	* configure.ac: Replace all '_' into '.'.
+
 	* NEWS: Updated.
 
 	* bootstrap: Updated from gnulib.
diff --git a/configure.ac b/configure.ac
index eaff443..dbea667 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@
 AC_PREREQ(2.59)
 
 AC_INIT([GNU inetutils],
- m4_esyscmd([build-aux/git-version-gen .tarball-version 's/inetutils-/v/;s/_/./']),
+ m4_esyscmd([build-aux/git-version-gen .tarball-version 's/inetutils-/v/;s/_/./g']),
  [bug-inetutils@gnu.org])
 
 AC_CONFIG_SRCDIR([src/inetd.c])

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


commit 7fbe1d8462040244067c8f5df4b10535c92eaca9
Author: Simon Josefsson <simon@josefsson.org>
Date:   Fri Jan 6 15:00:24 2012 +0100

    bootstrap: Updated from gnulib.

diff --git a/ChangeLog b/ChangeLog
index 752abaf..27e4e69 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
 	* NEWS: Updated.
 
+	* bootstrap: Updated from gnulib.
+
 2012-01-04  Mats Erik Andersson <gnu@gisladisker.se>
 
 	Regression: Erase port for active data transmission.
diff --git a/bootstrap b/bootstrap
index 505a05e..66da981 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2011-12-21.09; # UTC
+scriptversion=2012-01-06.07; # UTC
 
 # Bootstrap this package from checked-out sources.
 
-# Copyright (C) 2003-2011 Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -316,8 +316,8 @@ insert_vc_ignore() {
   pattern="$2"
   case $vc_ignore_file in
   *.gitignore)
-    # A .gitignore entry that does not start with `/' applies
-    # recursively to subdirectories, so prepend `/' to every
+    # A .gitignore entry that does not start with '/' applies
+    # recursively to subdirectories, so prepend '/' to every
     # .gitignore entry.
     pattern=`echo "$pattern" | sed s,^,/,`;;
   esac

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


commit 7824e9e70661b4dae45667a0fe7ceefa21de16c4
Author: Simon Josefsson <simon@josefsson.org>
Date:   Fri Jan 6 14:59:10 2012 +0100

    NEWS: Updated.

diff --git a/ChangeLog b/ChangeLog
index 06cc08f..752abaf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-01-06  Simon Josefsson  <simon@josefsson.org>
+
+	* NEWS: Updated.
+
 2012-01-04  Mats Erik Andersson <gnu@gisladisker.se>
 
 	Regression: Erase port for active data transmission.
diff --git a/NEWS b/NEWS
index 63585de..46da4b8 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,12 @@ See the end of this file for license conditions.
 
 Please send inetutils bug reports to <bug-inetutils@gnu.org>.
 
+January 6, 2012
+Version 1.9.1:
+
+* Don't install git-merge-changelog.
+
+
 December 31, 2011
 Version 1.9:
 

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

Summary of changes:
 ChangeLog    |   10 ++++++++++
 NEWS         |    6 ++++++
 bootstrap    |    8 ++++----
 configure.ac |    2 +-
 4 files changed, 21 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Fri Jan 06 09:22:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjAgL-0007c5-1T
	for mharc-commit-inetutils@gnu.org; Fri, 06 Jan 2012 09:22:09 -0500
Received: from eggs.gnu.org ([140.186.70.92]:36997)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1RjAgF-0007ah-9Y
	for commit-inetutils@gnu.org; Fri, 06 Jan 2012 09:22:07 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1RjAgE-00067s-7h
	for commit-inetutils@gnu.org; Fri, 06 Jan 2012 09:22:03 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:55481)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1RjAgE-00067o-6F
	for commit-inetutils@gnu.org; Fri, 06 Jan 2012 09:22:02 -0500
Received: from jas by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <simon@josefsson.org>) id 1RjAgD-0002d2-TN
	for commit-inetutils@gnu.org; Fri, 06 Jan 2012 14:22:02 +0000
Date: Fri, 06 Jan 2012 14:22:01 +0000
Message-Id: <E1RjAgD-0002d2-TN@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  annotated tag, inetutils-1_9_1,
	created. inetutils-1_9_1
X-Git-Refname: refs/tags/inetutils-1_9_1
X-Git-Reftype: annotated tag
X-Git-Oldrev: 0000000000000000000000000000000000000000
X-Git-Newrev: e39b70ddcb9a25606ab2e136fe06acb2f955bfa0
From: Simon Josefsson <simon@josefsson.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Jan 2012 14:22:07 -0000

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

The annotated tag, inetutils-1_9_1 has been created
        at  e39b70ddcb9a25606ab2e136fe06acb2f955bfa0 (tag)
   tagging  1a11478c8f3471c7486fa45e7487b82b69b4c9d1 (commit)
  replaces  inetutils-1_9
 tagged by  Simon Josefsson
        on  Fri Jan 6 15:10:47 2012 +0100

- Log -----------------------------------------------------------------
inetutils 1.9.1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iO4EAAECADgFAk8HAOcxFIAAAAAAFQATcGthLWFkZHJlc3NAZ251cGcub3Jnc2lt
b25Aam9zZWZzc29uLm9yZwAKCRDtoh6UtWVxb+zhBP0dY1KcOVv3GPfKs58os0Al
bNt1hgn2RccytLkRw8cRKYWM2QOXjQoQOoM+FdlKRg7PEXXBHXp2NyVs3hvZBT2E
1YYZhBz4iJKzGgDE/xppopWL+WixNvzhbciGNNNeR3s8fVh2JKYHxBRLBhHAkihT
zxiYf0P80KguLYvoYiyNQyjLnP0aLyrmLP/VJH2XwhLMRuOu19ymeSvDhYS1xWt9
=cjz0
-----END PGP SIGNATURE-----

Alfred M. Szmidt (2):
      Updated copyright years; happy 2012! (silent change)
      bootstrap.conf (gnulib_modules): Removed git-merge-changelog.

Mats Erik Andersson (3):
      ftpd: First step for address independence.
      ftpd: Internal address family independence.
      ftpd: Regression with active connections.

Simon Josefsson (4):
      NEWS: Updated.
      bootstrap: Updated from gnulib.
      configure.ac: Replace all '_' into '.'.
      Mention release tag (silent change).

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


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Sat Jan 07 07:23:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjVJ6-0005gi-7r
	for mharc-commit-inetutils@gnu.org; Sat, 07 Jan 2012 07:23:32 -0500
Received: from eggs.gnu.org ([140.186.70.92]:55297)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RjVJ3-0005gB-5q
	for commit-inetutils@gnu.org; Sat, 07 Jan 2012 07:23:30 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RjVJ1-0005hs-G8
	for commit-inetutils@gnu.org; Sat, 07 Jan 2012 07:23:29 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:58064)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RjVJ1-0005hn-D6
	for commit-inetutils@gnu.org; Sat, 07 Jan 2012 07:23:27 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RjVJ0-00040F-Eo
	for commit-inetutils@gnu.org; Sat, 07 Jan 2012 12:23:27 +0000
Date: Sat, 07 Jan 2012 12:23:26 +0000
Message-Id: <E1RjVJ0-00040F-Eo@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-2-ga78b655
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 1a11478c8f3471c7486fa45e7487b82b69b4c9d1
X-Git-Newrev: a78b65595fefb959d0456529422deb42a2db2b8e
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, 07 Jan 2012 12:23:30 -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  a78b65595fefb959d0456529422deb42a2db2b8e (commit)
       via  72dd08b85c0e4b9006df35899281e6dcba41a1e7 (commit)
      from  1a11478c8f3471c7486fa45e7487b82b69b4c9d1 (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=a78b65595fefb959d0456529422deb42a2db2b8e


commit a78b65595fefb959d0456529422deb42a2db2b8e
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sat Jan 7 13:17:44 2012 +0100

    telnet: Filename buffer overrun when tracing.

diff --git a/ChangeLog b/ChangeLog
index f6fc634..cdbd4c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-01-07  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* telnet/utilities.c (SetNetTrace): Filename buffer overrun: replace
+	strcpy() by strncpy().
+	(printoption, printsub): Code formatting of ternary operator.
+
 2012-01-07  Guillem Jover  <guillem@hadrons.org>
 
 	* telnet/utilities.c (printsub) <env_common>: Use constant format
diff --git a/telnet/utilities.c b/telnet/utilities.c
index ddc7dc0..12a6b08 100644
--- a/telnet/utilities.c
+++ b/telnet/utilities.c
@@ -128,7 +128,8 @@ SetNetTrace (register char *file)
       NetTrace = fopen (file, "w");
       if (NetTrace)
 	{
-	  strcpy ((char *) NetTraceFile, file);
+	  strncpy ((char *) NetTraceFile, file, sizeof (NetTraceFile));
+	  NetTraceFile[sizeof (NetTraceFile) - 1] = 0;
 	  return;
 	}
       fprintf (stderr, "Cannot open %s.\n", file);
@@ -210,8 +211,10 @@ printoption (char *direction, int cmd, int option)
   else
     {
       register char *fmt;
-      fmt = (cmd == WILL) ? "WILL" : (cmd == WONT) ? "WONT" :
-	(cmd == DO) ? "DO" : (cmd == DONT) ? "DONT" : 0;
+      fmt = (cmd == WILL)
+	    ? "WILL" : (cmd == WONT)
+		       ? "WONT" : (cmd == DO)
+				  ? "DO" : (cmd == DONT) ? "DONT" : 0;
       if (fmt)
 	{
 	  fprintf (NetTrace, "%s %s ", direction, fmt);
@@ -395,8 +398,7 @@ printsub (char direction, unsigned char *pointer, int length)
 	      fprintf (NetTrace, "SEND");
 	      break;
 	    default:
-	      fprintf (NetTrace,
-		       "- unknown qualifier %d (0x%x).",
+	      fprintf (NetTrace, "- unknown qualifier %d (0x%x).",
 		       pointer[1], pointer[1]);
 	    }
 	  break;
@@ -493,8 +495,8 @@ printsub (char direction, unsigned char *pointer, int length)
 	    {
 	    case TELQUAL_REPLY:
 	    case TELQUAL_IS:
-	      fprintf (NetTrace, " %s ", (pointer[1] == TELQUAL_IS) ?
-		       "IS" : "REPLY");
+	      fprintf (NetTrace, " %s ",
+		       (pointer[1] == TELQUAL_IS) ? "IS" : "REPLY");
 	      if (AUTHTYPE_NAME_OK (pointer[2]))
 		fprintf (NetTrace, "%s ", AUTHTYPE_NAME (pointer[2]));
 	      else
@@ -505,10 +507,10 @@ printsub (char direction, unsigned char *pointer, int length)
 		  break;
 		}
 	      fprintf (NetTrace, "%s|%s",
-		       ((pointer[3] & AUTH_WHO_MASK) == AUTH_WHO_CLIENT) ?
-		       "CLIENT" : "SERVER",
-		       ((pointer[3] & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) ?
-		       "MUTUAL" : "ONE-WAY");
+		       ((pointer[3] & AUTH_WHO_MASK) == AUTH_WHO_CLIENT)
+		       ? "CLIENT" : "SERVER",
+		       ((pointer[3] & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL)
+		       ? "MUTUAL" : "ONE-WAY");
 
 	      auth_printsub (&pointer[1], length - 1, buf, sizeof (buf));
 	      fprintf (NetTrace, "%s", buf);
@@ -529,10 +531,10 @@ printsub (char direction, unsigned char *pointer, int length)
 		      break;
 		    }
 		  fprintf (NetTrace, "%s|%s ",
-			   ((pointer[i] & AUTH_WHO_MASK) == AUTH_WHO_CLIENT) ?
-			   "CLIENT" : "SERVER",
-			   ((pointer[i] & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) ?
-			   "MUTUAL" : "ONE-WAY");
+			   ((pointer[i] & AUTH_WHO_MASK) == AUTH_WHO_CLIENT)
+			   ? "CLIENT" : "SERVER",
+			   ((pointer[i] & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL)
+			   ? "MUTUAL" : "ONE-WAY");
 		  ++i;
 		}
 	      break;
@@ -581,8 +583,8 @@ printsub (char direction, unsigned char *pointer, int length)
 
 	    case ENCRYPT_IS:
 	    case ENCRYPT_REPLY:
-	      fprintf (NetTrace, " %s ", (pointer[1] == ENCRYPT_IS) ?
-		       "IS" : "REPLY");
+	      fprintf (NetTrace, " %s ",
+		       (pointer[1] == ENCRYPT_IS) ? "IS" : "REPLY");
 	      if (length < 3)
 		{
 		  fprintf (NetTrace, " (partial suboption??\?)");
@@ -694,12 +696,12 @@ printsub (char direction, unsigned char *pointer, int length)
 		      break;
 		    }
 		  fprintf (NetTrace, "%s%s%s",
-			   pointer[i + SLC_FLAGS] & SLC_ACK ? "|ACK" : "",
-			   pointer[i +
-				   SLC_FLAGS] & SLC_FLUSHIN ? "|FLUSHIN" : "",
-			   pointer[i +
-				   SLC_FLAGS] & SLC_FLUSHOUT ? "|FLUSHOUT" :
-			   "");
+			   (pointer[i + SLC_FLAGS] & SLC_ACK)
+			   ? "|ACK" : "",
+			   (pointer[i + SLC_FLAGS] & SLC_FLUSHIN)
+			   ? "|FLUSHIN" : "",
+			   (pointer[i + SLC_FLAGS] & SLC_FLUSHOUT)
+			   ?  "|FLUSHOUT" : "");
 		  if (pointer[i + SLC_FLAGS] &
 		      ~(SLC_ACK | SLC_FLUSHIN | SLC_FLUSHOUT | SLC_LEVELBITS))
 		    fprintf (NetTrace, "(0x%x)", pointer[i + SLC_FLAGS]);

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


commit 72dd08b85c0e4b9006df35899281e6dcba41a1e7
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sat Jan 7 13:15:02 2012 +0100

    telnet: Non-constant format strings.

diff --git a/ChangeLog b/ChangeLog
index 5c2cb89..f6fc634 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-01-07  Guillem Jover  <guillem@hadrons.org>
+
+	* telnet/utilities.c (printsub) <env_common>: Use constant format
+	strings instead of offsets into fixed string.  Remove NOQUOTE,
+	add QUOTE.
+
 2012-01-06  Simon Josefsson  <simon@josefsson.org>
 
 	inetutils 1.9.1
diff --git a/telnet/utilities.c b/telnet/utilities.c
index 60b4b3f..ddc7dc0 100644
--- a/telnet/utilities.c
+++ b/telnet/utilities.c
@@ -876,7 +876,7 @@ printsub (char direction, unsigned char *pointer, int length)
 	      fprintf (NetTrace, "INFO ");
 	    env_common:
 	      {
-		register int noquote = 2;
+		const char *quote = "";
 #if defined ENV_HACK && defined OLD_ENVIRON
 		extern int old_env_var, old_env_value;
 #endif
@@ -891,15 +891,15 @@ printsub (char direction, unsigned char *pointer, int length)
 			  {
 # ifdef	ENV_HACK
 			    if (old_env_var == OLD_ENV_VALUE)
-			      fprintf (NetTrace, "\" (VALUE) " + noquote);
+			      fprintf (NetTrace, "%s(VALUE) ", quote);
 			    else
 # endif
-			      fprintf (NetTrace, "\" VAR " + noquote);
+			      fprintf (NetTrace, "%sVAR ", quote);
 			  }
 			else
 #endif /* OLD_ENVIRON */
-			  fprintf (NetTrace, "\" VALUE " + noquote);
-			noquote = 2;
+			  fprintf (NetTrace, "%sVALUE ", quote);
+			quote = "";
 			break;
 
 		      case NEW_ENV_VAR:
@@ -909,47 +909,46 @@ printsub (char direction, unsigned char *pointer, int length)
 			  {
 # ifdef	ENV_HACK
 			    if (old_env_value == OLD_ENV_VAR)
-			      fprintf (NetTrace, "\" (VAR) " + noquote);
+			      fprintf (NetTrace, "%s(VAR) ", quote);
 			    else
 # endif
-			      fprintf (NetTrace, "\" VALUE " + noquote);
+			      fprintf (NetTrace, "%sVALUE ", quote);
 			  }
 			else
 #endif /* OLD_ENVIRON */
-			  fprintf (NetTrace, "\" VAR " + noquote);
-			noquote = 2;
+			  fprintf (NetTrace, "%sVAR ", quote);
+			quote = "";
 			break;
 
 		      case ENV_ESC:
-			fprintf (NetTrace, "\" ESC " + noquote);
-			noquote = 2;
+			fprintf (NetTrace, "%sESC ", quote);
+			quote = "";
 			break;
 
 		      case ENV_USERVAR:
-			fprintf (NetTrace, "\" USERVAR " + noquote);
-			noquote = 2;
+			fprintf (NetTrace, "%sUSERVAR ", quote);
+			quote = "";
 			break;
 
 		      default:
 			if (isprint (pointer[i]) && pointer[i] != '"')
 			  {
-			    if (noquote)
+			    if (quote[0] == '\0')
 			      {
 				putc ('"', NetTrace);
-				noquote = 0;
+				quote = "\" ";
 			      }
 			    putc (pointer[i], NetTrace);
 			  }
 			else
 			  {
-			    fprintf (NetTrace, "\" %03o " + noquote,
-				     pointer[i]);
-			    noquote = 2;
+			    fprintf (NetTrace, "%s%03o ", quote, pointer[i]);
+			    quote = "";
 			  }
 			break;
 		      }
 		  }
-		if (!noquote)
+		if (quote[0] != '\0')
 		  putc ('"', NetTrace);
 		break;
 	      }

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

Summary of changes:
 ChangeLog          |   12 +++++++
 telnet/utilities.c |   85 ++++++++++++++++++++++++++-------------------------
 2 files changed, 55 insertions(+), 42 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Sat Jan 07 07:46:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjVf4-0007Yj-Ug
	for mharc-commit-inetutils@gnu.org; Sat, 07 Jan 2012 07:46:14 -0500
Received: from eggs.gnu.org ([140.186.70.92]:49412)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RjVf2-0007YQ-T6
	for commit-inetutils@gnu.org; Sat, 07 Jan 2012 07:46:13 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RjVf1-0008Vk-Kt
	for commit-inetutils@gnu.org; Sat, 07 Jan 2012 07:46:12 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:43391)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RjVf1-0008Vf-JL
	for commit-inetutils@gnu.org; Sat, 07 Jan 2012 07:46:11 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RjVf1-0007Ra-82
	for commit-inetutils@gnu.org; Sat, 07 Jan 2012 12:46:11 +0000
Date: Sat, 07 Jan 2012 12:46:11 +0000
Message-Id: <E1RjVf1-0007Ra-82@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-3-g868a9dd
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: a78b65595fefb959d0456529422deb42a2db2b8e
X-Git-Newrev: 868a9dda5081c1ce46a03b8b4af5fefecfaa64f6
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, 07 Jan 2012 12:46: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  868a9dda5081c1ce46a03b8b4af5fefecfaa64f6 (commit)
      from  a78b65595fefb959d0456529422deb42a2db2b8e (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=868a9dda5081c1ce46a03b8b4af5fefecfaa64f6


commit 868a9dda5081c1ce46a03b8b4af5fefecfaa64f6
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sat Jan 7 13:43:39 2012 +0100

    ifconfig: Portability fix.

diff --git a/ChangeLog b/ChangeLog
index cdbd4c1..51a35b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-07  Guillem Jover  <guillem@hadrons.org>
+
+	* ifconfig/flags.c (flag_char_tab): Protect for full portability
+	every macro invokation IFF_* by a precompiler conditional.
+
 2012-01-07  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* telnet/utilities.c (SetNetTrace): Filename buffer overrun: replace
diff --git a/ifconfig/flags.c b/ifconfig/flags.c
index 230ccb0..6dcd3cc 100644
--- a/ifconfig/flags.c
+++ b/ifconfig/flags.c
@@ -389,20 +389,36 @@ struct if_flag_char
    That's the way netstat does it.
 */
 static struct if_flag_char flag_char_tab[] = {
+#ifdef IFF_ALLMULTI
   { IFF_ALLMULTI,    'A' },
+#endif
+#ifdef IFF_BROADCAST
   { IFF_BROADCAST,   'B' },
+#endif
+#ifdef IFF_DEBUG
   { IFF_DEBUG,       'D' },
+#endif
+#ifdef IFF_LOOPBACK
   { IFF_LOOPBACK,    'L' },
+#endif
+#ifdef IFF_MULTICAST
   { IFF_MULTICAST,   'M' },
+#endif
 #ifdef HAVE_DYNAMIC
   { IFF_DYNAMIC,     'd' },
 #endif
+#ifdef IFF_PROMISC
   { IFF_PROMISC,     'P' },
+#endif
 #ifdef IFF_NOTRAILERS
   { IFF_NOTRAILERS,  'N' },
 #endif
+#ifdef IFF_NOARP
   { IFF_NOARP,       'O' },
+#endif
+#ifdef IFF_POINTOPOINT
   { IFF_POINTOPOINT, 'P' },
+#endif
 #ifdef IFF_SLAVE
   { IFF_SLAVE,       's' },
 #endif
@@ -412,8 +428,12 @@ static struct if_flag_char flag_char_tab[] = {
 #ifdef IFF_SIMPLEX
   { IFF_SIMPLEX,     'S' },
 #endif
+#ifdef IFF_RUNNING
   { IFF_RUNNING,     'R' },
+#endif
+#ifdef IFF_UP
   { IFF_UP,          'U' },
+#endif
   { 0 }
 };
 

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

Summary of changes:
 ChangeLog        |    5 +++++
 ifconfig/flags.c |   20 ++++++++++++++++++++
 2 files changed, 25 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed Jan 18 05:03:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RnSN4-0003FF-P5
	for mharc-commit-inetutils@gnu.org; Wed, 18 Jan 2012 05:03:58 -0500
Received: from eggs.gnu.org ([140.186.70.92]:39740)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1RnSMy-0003F9-2y
	for commit-inetutils@gnu.org; Wed, 18 Jan 2012 05:03:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1RnSMw-0000Io-EQ
	for commit-inetutils@gnu.org; Wed, 18 Jan 2012 05:03:52 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:44138)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1RnSMw-0000Ik-Cv
	for commit-inetutils@gnu.org; Wed, 18 Jan 2012 05:03:50 -0500
Received: from jas by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <simon@josefsson.org>) id 1RnSMw-0003j3-Cq
	for commit-inetutils@gnu.org; Wed, 18 Jan 2012 10:03:50 +0000
Date: Wed, 18 Jan 2012 10:03:50 +0000
Message-Id: <E1RnSMw-0003j3-Cq@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-4-g0448969
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 868a9dda5081c1ce46a03b8b4af5fefecfaa64f6
X-Git-Newrev: 0448969ce20e10376acc6e803abf45e61cd857e2
From: Simon Josefsson <simon@josefsson.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Jan 2012 10:03:57 -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  0448969ce20e10376acc6e803abf45e61cd857e2 (commit)
      from  868a9dda5081c1ce46a03b8b4af5fefecfaa64f6 (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=0448969ce20e10376acc6e803abf45e61cd857e2


commit 0448969ce20e10376acc6e803abf45e61cd857e2
Author: Simon Josefsson <simon@josefsson.org>
Date:   Wed Jan 18 11:03:45 2012 +0100

    ftpd/ftpd.c (options): Don't use OPTION_ARG_OPTIONAL for -a.

diff --git a/ChangeLog b/ChangeLog
index 51a35b1..3e862d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-18  Simon Josefsson  <simon@josefsson.org>
+
+	* ftpd/ftpd.c (options): Don't use OPTION_ARG_OPTIONAL for -a.
+	Resolves crash reported by Michal Mazurek <akfaew@jasminek.net>.
+
 2012-01-07  Guillem Jover  <guillem@hadrons.org>
 
 	* ifconfig/flags.c (flag_char_tab): Protect for full portability
diff --git a/ftpd/ftpd.c b/ftpd/ftpd.c
index 29e9eed..bc31558 100644
--- a/ftpd/ftpd.c
+++ b/ftpd/ftpd.c
@@ -283,7 +283,7 @@ static struct argp_option options[] = {
   { "umask", 'u', "VAL", 0,
     "set default umask",
     GRID+1 },
-  { "auth", 'a', "AUTH", OPTION_ARG_OPTIONAL,
+  { "auth", 'a', "AUTH", 0,
     "use AUTH for authentication",
     GRID+1 },
   { NULL, 0, NULL, 0, "AUTH can be one of the following:", GRID+2 },

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

Summary of changes:
 ChangeLog   |    5 +++++
 ftpd/ftpd.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Sun Jan 22 15:25:57 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rp3zB-0003hL-Gb
	for mharc-commit-inetutils@gnu.org; Sun, 22 Jan 2012 15:25:57 -0500
Received: from eggs.gnu.org ([140.186.70.92]:43965)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rp3z6-0003g8-DT
	for commit-inetutils@gnu.org; Sun, 22 Jan 2012 15:25:55 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rp3z2-0007rl-Ig
	for commit-inetutils@gnu.org; Sun, 22 Jan 2012 15:25:52 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:60747)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rp3z2-0007rh-GE
	for commit-inetutils@gnu.org; Sun, 22 Jan 2012 15:25:48 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1Rp3z1-0000IK-P8
	for commit-inetutils@gnu.org; Sun, 22 Jan 2012 20:25:48 +0000
Date: Sun, 22 Jan 2012 20:25:47 +0000
Message-Id: <E1Rp3z1-0000IK-P8@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-7-g6c64ece
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 0448969ce20e10376acc6e803abf45e61cd857e2
X-Git-Newrev: 6c64ece3a5f68269de20a3374db983609c75818f
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Jan 2012 20:25:55 -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  6c64ece3a5f68269de20a3374db983609c75818f (commit)
       via  f01c9cc6b305a3cae0e9ad09f9e52c0887383f1c (commit)
       via  2d945ae465d34d02c7f113af0ff63e20be8d4d8d (commit)
      from  0448969ce20e10376acc6e803abf45e61cd857e2 (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=6c64ece3a5f68269de20a3374db983609c75818f


commit 6c64ece3a5f68269de20a3374db983609c75818f
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sun Jan 22 21:06:46 2012 +0100

    Test portability fix.

diff --git a/ChangeLog b/ChangeLog
index bf749e0..b9d10ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-01-22  Mats Erik Andersson <gnu@gisladisker.se>
 
+	* tests/ftp-localhost.sh: sysctl(1) uses `=' or `:'
+	as delimeter.  Detect both.
+
+2012-01-22  Mats Erik Andersson <gnu@gisladisker.se>
+
 	* ftpd/extern.h (usefamily): New declaration.
 	* ftpd/ftpd.c (options): New options `-4/ipv4' and `-6/ipv6`.
 	(parse_opt): Detect `4' and `6'.
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index 3f6c9b2..171e9c3 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -321,7 +321,7 @@ if ! $have_address_mapping && $have_sysctl; then
     #
     value_v6only=`sysctl -a 2>/dev/null | grep v6only`
     if test -n "$value_v6only"; then
-	value_v6only=`echo $value_v6only | sed 's/^.*= *//'`
+	value_v6only=`echo $value_v6only | sed 's/^.*[=:] *//'`
 	if test "$value_v6only" -eq 0; then
 	    # This is the good value.  Keep it.
 	    have_address_mapping=true

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


commit f01c9cc6b305a3cae0e9ad09f9e52c0887383f1c
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sun Jan 22 17:33:44 2012 +0100

    ftpd: Standalone-mode with IPv6.
    
    Command line options determine in standalone-mode whether
    to start a single stacked service, or a dual stacked service.

diff --git a/ChangeLog b/ChangeLog
index beeccfd..bf749e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2012-01-22  Mats Erik Andersson <gnu@gisladisker.se>
 
+	* ftpd/extern.h (usefamily): New declaration.
+	* ftpd/ftpd.c (options): New options `-4/ipv4' and `-6/ipv6`.
+	(parse_opt): Detect `4' and `6'.
+	* ftpd/server_mode.c (usefamily): New variable.
+	[!DEFPORT] (DEFPORT): Use IPPORT_FTP if available.
+	(server_mode): Remove use of AI_ADDRCONFIG.  When seeing AF_UNSPEC,
+	build AF_INET6 socket and reset socket option IPV6_V6ONLY.
+
+2012-01-22  Mats Erik Andersson <gnu@gisladisker.se>
+
 	* ftpd/extern.h (passive): New prototype.
 	* ftpd/ftpcmd.y (EPRT, EPSV, CHAR): New tokens.
 	(net_proto, tcp_port, net_addr): New value returning types.
diff --git a/ftpd/extern.h b/ftpd/extern.h
index 5e68544..422bd99 100644
--- a/ftpd/extern.h
+++ b/ftpd/extern.h
@@ -113,6 +113,7 @@ extern char tmpline[];
 extern off_t restart_point;
 
 /* Exported from server_mode.c.  */
+extern int usefamily;
 extern int server_mode (const char *pidfile, struct sockaddr *phis_addr,
 			socklen_t *phis_addrlen, char *argv[]);
 
diff --git a/ftpd/ftpd.c b/ftpd/ftpd.c
index 9fda874..4103dab 100644
--- a/ftpd/ftpd.c
+++ b/ftpd/ftpd.c
@@ -265,6 +265,12 @@ static struct argp_option options[] = {
   { "debug", 'd', NULL, 0,
     "debug mode",
     GRID+1 },
+  { "ipv4", '4', NULL, 0,
+    "restrict daemon to IPv4",
+    GRID+1 },
+  { "ipv6", '6', NULL, 0,
+    "restrict daemon to IPv6",
+    GRID+1 },
   { "logging", 'l', NULL, 0,
     "increase verbosity of syslog messages",
     GRID+1 },
@@ -318,6 +324,16 @@ parse_opt (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
+    case '4':
+      /* Active in daemon mode only.  */
+      usefamily = AF_INET;
+      break;
+
+    case '6':
+      /* Active in daemon mode only.  */
+      usefamily = AF_INET6;
+      break;
+
     case 'A':
       /* Anonymous ftp only.  */
       anon_only = 1;
diff --git a/ftpd/server_mode.c b/ftpd/server_mode.c
index 6ef6ef4..0a48773 100644
--- a/ftpd/server_mode.c
+++ b/ftpd/server_mode.c
@@ -40,9 +40,17 @@
 #include <libinetutils.h>
 #include "unused-parameter.h"
 
+int usefamily = AF_UNSPEC;	/* Address family for daemon.  */
+
 static void reapchild (int);
 
-#define DEFPORT 21
+#ifndef DEFPORT
+# ifdef IPPORT_FTP
+#  define DEFPORT IPPORT_FTP
+# else /* !IPPORT_FTP */
+#  define DEFPORT 21
+# endif
+#endif /* !DEFPORT */
 
 #ifdef WITH_WRAP
 
@@ -81,7 +89,7 @@ check_host (struct sockaddr *sa, socklen_t len)
     }
   return (1);
 }
-#endif
+#endif /* WITH_WRAP */
 
 static void
 reapchild (int signo _GL_UNUSED_PARAMETER)
@@ -95,7 +103,8 @@ reapchild (int signo _GL_UNUSED_PARAMETER)
 
 /* The parameter '*phis_addrlen' must be initiated
    with the space available at calling time.
-   The actually used space will then be returned.  */
+   The size of used space will then be returned.
+ */
 int
 server_mode (const char *pidfile, struct sockaddr *phis_addr,
 	     socklen_t *phis_addrlen, char *argv[])
@@ -121,12 +130,15 @@ server_mode (const char *pidfile, struct sockaddr *phis_addr,
   snprintf (portstr, sizeof (portstr), "%u", port);
 
   memset (&hints, 0, sizeof (hints));
-  hints.ai_family = AF_INET;
   hints.ai_socktype = SOCK_STREAM;
   hints.ai_flags = AI_PASSIVE;
-#ifdef AI_ADDRCONFIG
-  hints.ai_flags |= AI_ADDRCONFIG;
-#endif
+
+  /* If an undetermined address family is passed,
+   * we build a dual stacked listener from an AF_INET6
+   * socket by unsetting the sockopt IPV6_V6ONLY.
+   * Otherwise the resolver often prefers AF_INET.
+   */
+  hints.ai_family = (usefamily != AF_UNSPEC) ? usefamily : AF_INET6;
 
   err = getaddrinfo (NULL, portstr, &hints, &res);
   if (err)
@@ -149,6 +161,15 @@ server_mode (const char *pidfile, struct sockaddr *phis_addr,
 	  syslog (LOG_ERR, "control setsockopt: %m");
       }
 
+      /* Upgrade to dual stacked socket.  */
+      if (usefamily == AF_UNSPEC && ai->ai_family == AF_INET6)
+	{
+	  int off = 0;
+	  if (setsockopt (ctl_sock, IPPROTO_IPV6, IPV6_V6ONLY,
+			  (char *) &off, sizeof (off)) < 0)
+	    syslog (LOG_DEBUG, "setsockopt bindv6only: %m");
+	}
+
       if (bind (ctl_sock, ai->ai_addr, ai->ai_addrlen))
 	{
 	  close (ctl_sock);

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


commit 2d945ae465d34d02c7f113af0ff63e20be8d4d8d
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sun Jan 22 17:30:04 2012 +0100

    ftpd: Inetd-mode with EPRT and EPSV.
    
    Provide tested IPv6 support in inetd-mode, with special
    care to IPv4-mapped-IPv6 addressing also in legacy mode.

diff --git a/ChangeLog b/ChangeLog
index 3e862d1..beeccfd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2012-01-22  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* ftpd/extern.h (passive): New prototype.
+	* ftpd/ftpcmd.y (EPRT, EPSV, CHAR): New tokens.
+	(net_proto, tcp_port, net_addr): New value returning types.
+	(cmd) <PORT>: Use value returned from `host_port'. Erase PDATA
+	and USEDEFAULT only if successful.
+	(cmd) <PASV>: Changed call to passive().
+	(cmd) <EPRT, EPSV>: New code for token parsers.
+	(host_port): Declare as `%type <i>', returning an integer.
+	Handle mapped IPv4 addresses.  Erase DATA_DEST after an address
+	resolving failure.
+	(DLIST): New macro used as state in finite state automata.
+	(cmdtab): New entries EPRT and EPSV.
+	(yylex) <DLIST>: Implement new state.
+	* ftpd/ftpd.c (passive): New prototype `passive(int, int)'.
+	New variable TRY_AF.  Select address family based on parameters
+	and CTRL_ADDR.
+	(passive) <EPSV>: Handle AF_INET and AF_INET6.
+	(passive) <PASV>: Process also mapped IPv4 address.
+	* tests/ftp-localhost.sh: More tests in inetd mode: EPSV and
+	EPRT for IPv4 and IPv6.  Suppress FTP dialog unless verbose.
+
 2012-01-18  Simon Josefsson  <simon@josefsson.org>
 
 	* ftpd/ftpd.c (options): Don't use OPTION_ARG_OPTIONAL for -a.
diff --git a/ftpd/extern.h b/ftpd/extern.h
index d9103fb..5e68544 100644
--- a/ftpd/extern.h
+++ b/ftpd/extern.h
@@ -68,7 +68,7 @@ extern void lreply (int, const char *, ...);
 extern void makedir (const char *);
 extern void nack (const char *);
 extern void pass (const char *);
-extern void passive (void);
+extern void passive (int, int);
 extern void perror_reply (int, const char *);
 extern void pwd (void);
 extern void removedir (const char *);
diff --git a/ftpd/ftpcmd.y b/ftpd/ftpcmd.y
index 49a4355..e637ac8 100644
--- a/ftpd/ftpcmd.y
+++ b/ftpd/ftpcmd.y
@@ -50,6 +50,14 @@
 /*
  * Grammar for FTP commands.
  * See RFC 959.
+ *
+ * TODO Update to RFC 3659
+ *
+ * RFC 2428
+ *
+ * TODO RFC 1639
+ *
+ * FIXME: Rewrite with GNU standard formatting.  Legacy code is changed!
  */
 
 %{
@@ -136,16 +144,20 @@ static void yyerror       (const char *s);
 	STAT	HELP	NOOP	MKD	RMD	PWD
 	CDUP	STOU	SMNT	SYST	SIZE	MDTM
 
+	EPRT	EPSV
+
 	UMASK	IDLE	CHMOD
 
 	LEXERR
 
 %token	<s> STRING
-%token	<i> NUMBER
+%token	<i> NUMBER CHAR
 
 %type	<i> check_login octal_number byte_size
 %type	<i> struct_code mode_code type_code form_code
 %type	<s> pathstring pathname password username
+%type	<i> host_port net_proto tcp_port
+%type	<s> net_addr
 
 %start	cmd_list
 
@@ -176,20 +188,33 @@ cmd
 		}
 	| PORT check_login SP host_port CRLF
 		{
-			usedefault = 0;
-			if (pdata >= 0) {
-				 close(pdata);
-				pdata = -1;
-			}
 			if ($2) {
-				if (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) {
+				if ($4
+				    && (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
+					&& 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
+				       )
+				   )
+				{
+					usedefault = 0;
+					if (pdata >= 0) {
+						close(pdata);
+						pdata = -1;
+					}
 					reply (200, "PORT command successful.");
 				}
 				else {
+					usedefault = 1;
 					memset (&data_dest, 0,
 						sizeof (data_dest));
 					reply(500, "Illegal PORT Command");
@@ -199,7 +224,7 @@ cmd
 	| PASV check_login CRLF
 		{
 			if ($2)
-				passive();
+				passive(0, AF_INET);
 		}
 	| TYPE SP type_code CRLF
 		{
@@ -555,6 +580,143 @@ cmd
 			}
 			free($4);
 		}
+	| EPRT check_login SP CHAR net_proto CHAR net_addr CHAR tcp_port CHAR CRLF
+		{
+			usedefault = 0;
+			if (pdata >= 0) {
+				close(pdata);
+				pdata = -1;
+			}
+			/* A first sanity check.  */
+			if ($2				/* valid login */
+			    && ($5 > 0)			/* valid protocols */
+			    && ($4 > 32 && $4 < 127)	/* legal first delimiter */
+							/* identical delimiters */
+			    && ($4 == $6 && $4 == $8 && $4 == $10))
+			{
+				/* We only accept connections using
+				 * the same address family as is
+				 * currently in use, unless we
+				 * detect IPv4-mapped-to-IPv6.  */
+				if (his_addr.ss_family == $5
+#ifdef AI_V4MAPPED
+				    || ($5 == AF_INET6 && his_addr.ss_family == AF_INET)
+				    || ($5 == AF_INET && his_addr.ss_family == AF_INET6)
+#endif
+				    ) {
+					int err;
+					char p[8];
+					struct addrinfo hints, *res;
+
+					memset (&hints, 0, sizeof (hints));
+					snprintf (p, sizeof (p), "%u", $9 & 0xffff);
+					hints.ai_family = $5;
+					hints.ai_socktype = SOCK_STREAM;
+					hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV;
+
+#ifdef AI_V4MAPPED
+					if (his_addr.ss_family != $5)
+						hints.ai_flags |= AI_V4MAPPED;
+#endif
+
+					err = getaddrinfo ($7, p, &hints, &res);
+					if (err)
+						reply (500, "Illegal EPRT Command");
+					else if (/* sanity check */
+						 (his_addr.ss_family == AF_INET
+						  && memcmp (&((struct sockaddr_in *) &his_addr)->sin_addr,
+							     &((struct sockaddr_in *) res->ai_addr)->sin_addr,
+							     sizeof (struct in_addr)) == 0
+						  && ntohs (((struct sockaddr_in *) res->ai_addr)->sin_port) > IPPORT_RESERVED
+						 )
+						 ||
+						 (his_addr.ss_family == AF_INET6
+						  && memcmp (&((struct sockaddr_in6 *) &his_addr)->sin6_addr,
+							     &((struct sockaddr_in6 *) res->ai_addr)->sin6_addr,
+							     sizeof (struct in6_addr)) == 0
+						  && ntohs (((struct sockaddr_in6 *) res->ai_addr)->sin6_port) > IPPORT_RESERVED
+						 )
+#ifdef AI_V4MAPPED
+						 ||
+						 (his_addr.ss_family == AF_INET && res->ai_family == AF_INET6
+						  && IN6_IS_ADDR_V4MAPPED (&((struct sockaddr_in6 *) res->ai_addr)->sin6_addr)
+						  && memcmp (&((struct sockaddr_in *) &his_addr)->sin_addr,
+							     &((struct in_addr *) &((struct sockaddr_in6 *) res->ai_addr)->sin6_addr)[3],
+							     sizeof (struct in_addr)) == 0
+						  && ntohs (((struct sockaddr_in6 *) res->ai_addr)->sin6_port) > IPPORT_RESERVED
+						 )
+						 ||
+						 (his_addr.ss_family == AF_INET6 && res->ai_family == AF_INET
+						  && IN6_IS_ADDR_V4MAPPED (&((struct sockaddr_in6 *) &his_addr)->sin6_addr)
+						  && memcmp (&((struct in_addr *) &((struct sockaddr_in6 *) &his_addr)->sin6_addr)[3],
+							     &((struct sockaddr_in *) res->ai_addr)->sin_addr,
+							     sizeof (struct in_addr)) == 0
+						  && ntohs (((struct sockaddr_in *) res->ai_addr)->sin_port) > IPPORT_RESERVED
+						 )
+#endif /* AI_V4MAPPED */
+						)
+					{
+						/* In the case of IPv4 mapped as IPv6,
+						 * the addresses were proven to coincide,
+						 * only the extraction remains.  Since
+						 * non-mapped is the standard, test that
+						 * situation first.
+						 */
+						if (his_addr.ss_family == res->ai_family)
+						{
+						memcpy (&data_dest, res->ai_addr, res->ai_addrlen);
+						data_dest_len = res->ai_addrlen;
+						}
+						else if (his_addr.ss_family == AF_INET && res->ai_family == AF_INET6)
+						{
+						/* `his_addr' contains the reduced IPv4 address.  */
+						memcpy (&data_dest, &his_addr, sizeof (struct sockaddr_in));
+						data_dest_len = sizeof (struct sockaddr_in);
+						((struct sockaddr_in *) &data_dest)->sin_port = ((struct sockaddr_in6 *) res->ai_addr)->sin6_port;
+						} else
+						{
+						/* `res->ai_addr' contains the reduced IPv4 address,
+						 * but the connection stands on `his_addr' which is
+						 * an IPv4-mapped-IPv6 address.  */
+						memcpy (&data_dest, &his_addr, sizeof (struct sockaddr_in6));
+						data_dest_len = sizeof (struct sockaddr_in6);
+						((struct sockaddr_in6 *) &data_dest)->sin6_port = ((struct sockaddr_in *) res->ai_addr)->sin_port;
+						}
+						freeaddrinfo (res);
+						reply (200, "EPRT command successful.");
+					} else {
+						/* failed identity check */
+						if (res)
+							freeaddrinfo (res);
+						reply (500, "Illegal EPRT Command");
+					}
+				} else {
+					/* Not fit for established connection.  */
+					reply (522, "Network protocol not supported, use (%d)",
+						($5 == 1) ? 2 : 1);
+				}
+			} else if ($2 && ($5 <= 0)) {
+				reply (522, "Network protocol not supported, use (1,2)");
+			} else if ($2) {
+				/* Incorrect delimiters detected,
+				 * the other conditions are true. */
+				reply (500, "Illegal EPRT Command");
+			}
+		}
+	| EPSV check_login CRLF
+		{
+			if ($2)
+				passive(1, AF_UNSPEC);
+		}
+	| EPSV check_login SP net_proto CRLF
+		{
+			if ($2) {
+				if ($4 > 0)
+					passive(1, $4);
+				else
+					reply (522, "Network protocol not supported, use (1,2)");
+			}
+		}
 	| QUIT CRLF
 		{
 			reply(221, "Goodbye.");
@@ -605,12 +767,33 @@ byte_size
 	: NUMBER
 	;
 
+net_proto
+	: NUMBER
+		{	/* Rewrite as valid address family.  */
+			if ($1 == 1)
+				$$ = AF_INET;
+			else if ($1 == 2)
+				$$ = AF_INET6;
+			else
+				$$ = -1;	/* Invalid protocol.  */
+
+		}
+	;
+
+tcp_port
+	: NUMBER
+	;
+
+net_addr
+	: STRING
+	;
+
 host_port
 	: NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA
 		NUMBER COMMA NUMBER
 		{
 			int err;
-			char a[INET_ADDRSTRLEN], p[8];
+			char a[INET6_ADDRSTRLEN], p[8];
 			struct addrinfo hints, *res;
 
 			snprintf (a, sizeof (a), "%u.%u.%u.%u",
@@ -618,18 +801,33 @@ host_port
 			snprintf (p, sizeof (p), "%u",
 				(($9 & 0xff) << 8) + ($11 & 0xff));
 			memset (&hints, 0, sizeof (hints));
-			hints.ai_family = AF_INET;
+			hints.ai_family = his_addr.ss_family;
 			hints.ai_socktype = SOCK_STREAM;
 			hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV;
 
+			if (his_addr.ss_family == AF_INET6) {
+			    /* IPv4 mapped to IPv6.  */
+			    hints.ai_family = AF_INET6;
+#ifdef AI_V4MAPPED
+			    hints.ai_flags |= AI_V4MAPPED;
+#endif
+			    snprintf (a, sizeof (a), "::ffff:%u.%u.%u.%u",
+				      $1 & 0xff, $3 & 0xff, $5 & 0xff, $7 & 0xff);
+			}
+
 			err = getaddrinfo (a, p, &hints, &res);
-			if (err)
-			  reply (550, "Address failure: %s,%s", a, p);
+			if (err) {
+			    reply (550, "Address failure: %s,%s", a, p);
+			    memset (&data_dest, 0, sizeof (data_dest));
+			    data_dest_len = 0;
+			    $$ = 0;
+			  }
 			else
 			  {
 			    memcpy (&data_dest, res->ai_addr, res->ai_addrlen);
 			    data_dest_len = res->ai_addrlen;
 			    freeaddrinfo (res);
+			    $$ = 1;
 			  }
 		}
 	;
@@ -789,7 +987,6 @@ octal_number
 		}
 	;
 
-
 check_login
 	: /* empty */
 		{
@@ -813,6 +1010,7 @@ check_login
 #define	ZSTR2	6	/* optional STRING after SP */
 #define	SITECMD	7	/* SITE command */
 #define	NSTR	8	/* Number followed by a string */
+#define	DLIST	9	/* SP and delimited list for EPRT/EPSV */
 
 struct tab cmdtab[] = {		/* In order defined in RFC 765 */
 	{ "USER", USER, STR1, 1,	"<sp> username" },
@@ -862,6 +1060,8 @@ struct tab cmdtab[] = {		/* In order defined in RFC 765 */
 	{ "STOU", STOU, STR1, 1,	"<sp> file-name" },
 	{ "SIZE", SIZE, OSTR, 1,	"<sp> path-name" },
 	{ "MDTM", MDTM, OSTR, 1,	"<sp> path-name" },
+	{ "EPRT", EPRT, DLIST, 1,	"<sp> <d> proto <d> addr <d> port <d>" },
+	{ "EPSV", EPSV, ARGS, 1,	"[ <sp> af ]" },
 	{ NULL,   0,    0,    0,	0 }
 };
 
@@ -1109,6 +1309,51 @@ yylex(void)
 			state = STR1;
 			goto dostr1;
 
+		case DLIST:
+			/* Either numerical strings or
+			 * address strings for IPv4 and IPv6.
+			 * The consist of hexadecimal chars,
+			 * colon and periods.  A period can
+			 * not begin a valid address.  */
+			if (isxdigit(cbuf[cpos]) || cbuf[cpos] == ':') {
+				int is_num = 1;	/* Only to turn off.  */
+
+				cp = &cbuf[cpos];
+				while (isxdigit(cbuf[cpos])
+						|| cbuf[cpos] == ':'
+						|| cbuf[cpos] == '.') {
+					if (!isdigit(cbuf[cpos]))
+						is_num = 0;
+					cpos++;
+				}
+				c = cbuf[cpos];
+				cbuf[cpos] = '\0';
+				if (is_num) {
+					yylval.i = atoi(cp);
+					cbuf[cpos] = c;
+					return (NUMBER);
+				} else {
+					yylval.s = copy(cp);
+					cbuf[cpos] = c;
+					return (STRING);
+				}
+			}
+
+			switch (c = cbuf[cpos++]) {
+
+			case ' ':
+				return (SP);
+
+			case '\n':
+				state = CMD;
+				return (CRLF);
+
+			default:
+				yylval.i = c;
+				return (CHAR);
+			}
+			break;
+
 		case ARGS:
 			if (isdigit(cbuf[cpos])) {
 				cp = &cbuf[cpos];
diff --git a/ftpd/ftpd.c b/ftpd/ftpd.c
index bc31558..9fda874 100644
--- a/ftpd/ftpd.c
+++ b/ftpd/ftpd.c
@@ -1748,11 +1748,18 @@ myoob (int signo _GL_UNUSED_PARAMETER)
    a legitimate response by Jon Postel in a telephone conversation
    with Rick Adams on 25 Jan 89.  */
 void
-passive (void)
+passive (int epsv, int af)
 {
   char *p, *a;
+  int try_af;
 
-  pdata = socket (ctrl_addr.ss_family, SOCK_STREAM, 0);
+  /* EPSV might ask for a particular address family.  */
+  if (epsv && af > 0)
+    try_af = af;
+  else
+    try_af = ctrl_addr.ss_family;
+
+  pdata = socket (try_af, SOCK_STREAM, 0);
   if (pdata < 0)
     {
       perror_reply (425, "Can't open passive connection");
@@ -1760,6 +1767,7 @@ passive (void)
     }
   memcpy (&pasv_addr, &ctrl_addr, sizeof (pasv_addr));
   pasv_addrlen = ctrl_addrlen;
+
   /* Erase the port number.  */
   if (pasv_addr.ss_family == AF_INET6)
     ((struct sockaddr_in6 *) &pasv_addr)->sin6_port = 0;
@@ -1779,16 +1787,34 @@ passive (void)
   if (listen (pdata, 1) < 0)
     goto pasv_error;
 
-  if (pasv_addr.ss_family == AF_INET6)
+  if (epsv)
     {
-      reply (229, "Extended Passive Mode OK (|||%u|)",
-	     ((struct sockaddr_in6 *) &pasv_addr)->sin6_port);
+      /* EPSV for IPv4 and IPv6.  */
+      reply (229, "Entering Extended Passive Mode (|||%u|)",
+	     ntohs((pasv_addr.ss_family == AF_INET)
+		    ? ((struct sockaddr_in *) &pasv_addr)->sin_port
+		    : ((struct sockaddr_in6 *) &pasv_addr)->sin6_port));
       return;
     }
-  else
+  else /* !epsv */
     {
-      a = (char *) &((struct sockaddr_in *) &pasv_addr)->sin_addr;
-      p = (char *) &((struct sockaddr_in *) &pasv_addr)->sin_port;
+      /* PASV for IPv4.
+       *
+       * Some systems, like OpenSolaris, prefer to return
+       * an IPv4-mapped-IPv6 address, which must be processed
+       * for printout.  */
+      if (pasv_addr.ss_family == AF_INET6
+	  && IN6_IS_ADDR_V4MAPPED (&((struct sockaddr_in6 *) &pasv_addr)->sin6_addr))
+	{
+	  a = (char *) &((struct sockaddr_in6 *) &pasv_addr)->sin6_addr;
+	  a += 3 * sizeof (struct in_addr);	/* Skip padding up to IPv4 content.  */
+	  p = (char *) &((struct sockaddr_in6 *) &pasv_addr)->sin6_port;
+	}
+      else
+	{
+	  a = (char *) &((struct sockaddr_in *) &pasv_addr)->sin_addr;
+	  p = (char *) &((struct sockaddr_in *) &pasv_addr)->sin_port;
+	}
 
 #define UC(b) (((int) b) & 0xff)
 
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index 556a717..3f6c9b2 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -19,9 +19,13 @@
 
 # Written by Simon Josefsson
 
-# FIXME: Strict IPv4 setup, until Mats has completed the migration
-# of ftpd to support IPv6.  Address mapping IPv4-to-IPv6 is not
-# uniform an all platforms, thus `tcp4' for inetd and '-4' for ftp.
+# FIXME: Separate tests of IPv4 and IPv6 using `inetd', no testing
+# of standalone daemon yet.
+
+# Address mapping IPv4-to-IPv6 is not uniform an all platforms,
+# thus separately using `tcp4' and `tcp6' for streams in `inetd.conf'.
+# FIXME: Once functionality attains, reduce code duplication when
+# evaluating partial tests.
 
 set -e
 
@@ -29,6 +33,8 @@ FTP=${FTP:-../ftp/ftp$EXEEXT}
 FTPD=${FTPD:-../ftpd/ftpd$EXEEXT}
 INETD=${INETD:-../src/inetd$EXEEXT}
 TARGET=${TARGET:-127.0.0.1}
+TARGET6=${TARGET6:-::1}
+TARGET46=${TARGET46:-::ffff:127.0.0.1}
 
 if [ $VERBOSE ]; then
     set -x
@@ -66,7 +72,10 @@ posttesting () {
 trap posttesting 0 1 2 3 15
 
 echo "4711 stream tcp4 nowait root $PWD/$FTPD ftpd -A -l" > $TMPDIR/inetd.conf
+echo "4711 stream tcp6 nowait root $PWD/$FTPD ftpd -A -l" >> $TMPDIR/inetd.conf
 echo "machine $TARGET login ftp password foobar" > $TMPDIR/.netrc
+echo "machine $TARGET6 login ftp password foobar" >> $TMPDIR/.netrc
+echo "machine $TARGET46 login ftp password foobar" >> $TMPDIR/.netrc
 chmod 600 $TMPDIR/.netrc
 
 $INETD --pidfile=$TMPDIR/inetd.pid $TMPDIR/inetd.conf
@@ -74,8 +83,9 @@ $INETD --pidfile=$TMPDIR/inetd.pid $TMPDIR/inetd.conf
 # Wait for inetd to write pid and open socket
 sleep 2
 
-# Test a passive connection.
+# Test a passive connection: PASV and IPv4.
 #
+echo "PASV to $TARGET (IPv4) using inetd."
 cat <<STOP |
 rstatus
 dir
@@ -83,7 +93,7 @@ STOP
 HOME=$TMPDIR $FTP $TARGET 4711 -4 -v -p -t >$TMPDIR/ftp.stdout
 
 errno=$?
-cat $TMPDIR/ftp.stdout
+[ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
 
 if [ $errno != 0 ]; then
     echo running ftp failed? errno $errno
@@ -107,8 +117,9 @@ if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
     exit 1
 fi
 
-# Test an active connection.
+# Test an active connection: PORT and IPv4.
 #
+echo "PORT to $TARGET (IPv4) using inetd."
 cat <<STOP |
 rstatus
 dir
@@ -116,7 +127,145 @@ STOP
 HOME=$TMPDIR $FTP $TARGET 4711 -4 -v -t >$TMPDIR/ftp.stdout
 
 errno=$?
-cat $TMPDIR/ftp.stdout
+[ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
+
+if [ $errno != 0 ]; then
+    echo running ftp failed? errno $errno
+    exit 77
+fi
+
+if [ $errno != 0 ]; then
+    echo running ftp failed? errno $errno
+    exit 77
+fi
+
+# Standing control connection?
+if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
+    echo cannot find expected output for active ftp client?
+    exit 1
+fi
+
+# Was data transfer successful?
+if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
+    echo cannot find transfer result for active ftp client?
+    exit 1
+fi
+
+# Test a passive connection: EPSV and IPv4.
+#
+echo "EPSV to $TARGET (IPv4) using inetd."
+cat <<STOP |
+rstatus
+epsv4
+dir
+STOP
+HOME=$TMPDIR $FTP $TARGET 4711 -4 -v -p -t >$TMPDIR/ftp.stdout
+
+errno=$?
+[ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
+
+if [ $errno != 0 ]; then
+    echo running ftp failed? errno $errno
+    exit 77
+fi
+
+if [ $errno != 0 ]; then
+    echo running ftp failed? errno $errno
+    exit 77
+fi
+
+# Standing control connection?
+if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
+    echo cannot find expected output for passive ftp client?
+    exit 1
+fi
+
+# Was data transfer successful?
+if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
+    echo cannot find transfer result for passive ftp client?
+    exit 1
+fi
+
+# Test an active connection: EPRT and IPv4.
+#
+echo "EPRT to $TARGET (IPv4) using inetd."
+cat <<STOP |
+rstatus
+epsv4
+dir
+STOP
+HOME=$TMPDIR $FTP $TARGET 4711 -4 -v -t >$TMPDIR/ftp.stdout
+
+errno=$?
+[ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
+
+if [ $errno != 0 ]; then
+    echo running ftp failed? errno $errno
+    exit 77
+fi
+
+if [ $errno != 0 ]; then
+    echo running ftp failed? errno $errno
+    exit 77
+fi
+
+# Standing control connection?
+if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
+    echo cannot find expected output for active ftp client?
+    exit 1
+fi
+
+# Was data transfer successful?
+if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
+    echo cannot find transfer result for active ftp client?
+    exit 1
+fi
+
+# Test a passive connection: EPSV and IPv6.
+#
+echo "EPSV to $TARGET6 (IPv6) using inetd."
+cat <<STOP |
+rstatus
+dir
+STOP
+HOME=$TMPDIR $FTP $TARGET6 4711 -6 -v -p -t >$TMPDIR/ftp.stdout
+
+errno=$?
+[ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
+
+if [ $errno != 0 ]; then
+    echo running ftp failed? errno $errno
+    exit 77
+fi
+
+if [ $errno != 0 ]; then
+    echo running ftp failed? errno $errno
+    exit 77
+fi
+
+# Standing control connection?
+if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
+    echo cannot find expected output for passive ftp client?
+    exit 1
+fi
+
+# Was data transfer successful?
+if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
+    echo cannot find transfer result for passive ftp client?
+    exit 1
+fi
+
+# Test an active connection: EPRT and IPv6.
+#
+echo "EPRT to $TARGET6 (IPv6) using inetd."
+cat <<STOP |
+rstatus
+dir
+STOP
+HOME=$TMPDIR $FTP $TARGET6 4711 -6 -v -t >$TMPDIR/ftp.stdout
+
+errno=$?
+[ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
 
 if [ $errno != 0 ]; then
     echo running ftp failed? errno $errno
@@ -140,4 +289,126 @@ if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
     exit 1
 fi
 
+# Availability of IPv4-mapped IPv6 addresses.
+#
+# These are impossible on OpenBSD, so a flexible test
+# is implemented using sysctl(1) as tool.
+
+# Helpers tp catch relevant execution path.
+have_sysctl=false
+have_address_mapping=false
+
+# Known exceptions:
+#
+# OpenSolaris is known to allow address mapping
+test `uname -s` = 'SunOS' && have_address_mapping=true
+
+if ! $have_address_mapping; then
+    # Do we have sysctl(1) available?
+    if ! which sysctl >/dev/null 2>&1; then
+	echo "Warning: Not testing IPv4-mapped addresses."
+    else
+	have_sysctl=true
+    fi
+fi
+
+if ! $have_address_mapping && $have_sysctl; then
+    # Extract the present setting of
+    #
+    #    net.ipv6.bindv6only (Linux)
+    # or
+    #    net.inet6.ip6.v6only (BSD).
+    #
+    value_v6only=`sysctl -a 2>/dev/null | grep v6only`
+    if test -n "$value_v6only"; then
+	value_v6only=`echo $value_v6only | sed 's/^.*= *//'`
+	if test "$value_v6only" -eq 0; then
+	    # This is the good value.  Keep it.
+	    have_address_mapping=true
+	else
+	    echo "Warning: Address mapping IPv4-to-Ipv6 is disabled."
+	    # Set a non-zero value for later testing.
+	    value_v6only=2
+	fi
+    else
+	# Simulate a non-mapping answer in cases where "v6only" missed.
+	value_v6only=2
+    fi
+fi
+
+# Test functionality of IPv4-mapped IPv6 addresses.
+#
+if $have_address_mapping && test -n "$TARGET46" ; then
+    # Test a passive connection: EPSV and IPv4-mapped-IPv6.
+    #
+    echo "EPSV to $TARGET46 (IPv4-as-IPv6) using inetd."
+    cat <<-STOP |
+	rstatus
+	dir
+	STOP
+    HOME=$TMPDIR $FTP $TARGET46 4711 -6 -v -p -t >$TMPDIR/ftp.stdout
+
+    errno=$?
+    [ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
+
+    if [ $errno != 0 ]; then
+	echo running ftp failed? errno $errno
+	exit 77
+    fi
+
+    if [ $errno != 0 ]; then
+	echo running ftp failed? errno $errno
+	exit 77
+    fi
+
+    # Standing control connection?
+    if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
+	echo cannot find expected output for passive ftp client?
+	exit 1
+    fi
+
+    # Was data transfer successful?
+    if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
+	echo cannot find transfer result for passive ftp client?
+	exit 1
+    fi
+
+    # Test an active connection: EPRT and IPvIPv6.
+    #
+    echo "EPRT to $TARGET46 (IPv4-as-IPv6) using inetd."
+    cat <<-STOP |
+	rstatus
+	dir
+	STOP
+    HOME=$TMPDIR $FTP $TARGET46 4711 -6 -v -t >$TMPDIR/ftp.stdout
+
+    errno=$?
+    [ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
+
+    if [ $errno != 0 ]; then
+	echo running ftp failed? errno $errno
+	exit 77
+    fi
+
+    if [ $errno != 0 ]; then
+	echo running ftp failed? errno $errno
+	exit 77
+    fi
+
+    # Standing control connection?
+    if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
+	echo cannot find expected output for active ftp client?
+	exit 1
+    fi
+
+    # Was data transfer successful?
+    if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
+	echo cannot find transfer result for active ftp client?
+	exit 1
+    fi
+else
+    # The IPv4-as-IPv6 tests were not performed.
+    echo 'Skipping two tests of IPv4 mapped as IPv6.'
+fi
+
 exit 0

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

Summary of changes:
 ChangeLog              |   38 +++++++
 ftpd/extern.h          |    3 +-
 ftpd/ftpcmd.y          |  279 ++++++++++++++++++++++++++++++++++++++++++++---
 ftpd/ftpd.c            |   58 +++++++++--
 ftpd/server_mode.c     |   35 +++++-
 tests/ftp-localhost.sh |  285 ++++++++++++++++++++++++++++++++++++++++++++++-
 6 files changed, 658 insertions(+), 40 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Sun Jan 22 17:58:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rp6Mn-0003uU-FU
	for mharc-commit-inetutils@gnu.org; Sun, 22 Jan 2012 17:58:29 -0500
Received: from eggs.gnu.org ([140.186.70.92]:44962)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rp6Mk-0003uM-W6
	for commit-inetutils@gnu.org; Sun, 22 Jan 2012 17:58:27 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rp6Mj-00068k-IZ
	for commit-inetutils@gnu.org; Sun, 22 Jan 2012 17:58:26 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:46872)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rp6Mj-00068c-H0
	for commit-inetutils@gnu.org; Sun, 22 Jan 2012 17:58:25 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1Rp6Mj-0005Ys-64
	for commit-inetutils@gnu.org; Sun, 22 Jan 2012 22:58:25 +0000
Date: Sun, 22 Jan 2012 22:58:25 +0000
Message-Id: <E1Rp6Mj-0005Ys-64@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-8-g273d270
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6c64ece3a5f68269de20a3374db983609c75818f
X-Git-Newrev: 273d270ca3543c2b2fced41113359e290630190f
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Jan 2012 22:58:28 -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  273d270ca3543c2b2fced41113359e290630190f (commit)
      from  6c64ece3a5f68269de20a3374db983609c75818f (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=273d270ca3543c2b2fced41113359e290630190f


commit 273d270ca3543c2b2fced41113359e290630190f
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sun Jan 22 23:57:49 2012 +0100

    Portability of user identity.

diff --git a/ChangeLog b/ChangeLog
index b9d10ba..5f1d26b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2012-01-22  Mats Erik Andersson <gnu@gisladisker.se>
 
+	* tests/tftp.sh (USER): Calculate as `id -u -n'.
+
+2012-01-22  Mats Erik Andersson <gnu@gisladisker.se>
+
 	* tests/ftp-localhost.sh: sysctl(1) uses `=' or `:'
 	as delimeter.  Detect both.
 
diff --git a/tests/tftp.sh b/tests/tftp.sh
index 9df2aac..3a1217d 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -33,7 +33,7 @@ IFCONFIG="${IFCONFIG:-../ifconfig/ifconfig$EXEEXT --format=unix}"
 AF=${AF:-inet}
 PROTO=${PROTO:-udp}
 PORT=${PORT:-7777}
-USER=${USER:-$LOGNAME}
+USER=`id -u -n`
 
 # Random base diractory at testing time.
 TMPDIR=`mktemp -d $PWD/tmp.XXXXXXXXXX`

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

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


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Mon Jan 23 06:48:03 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RpINX-00018K-QF
	for mharc-commit-inetutils@gnu.org; Mon, 23 Jan 2012 06:48:03 -0500
Received: from eggs.gnu.org ([140.186.70.92]:35248)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RpINU-00017q-S9
	for commit-inetutils@gnu.org; Mon, 23 Jan 2012 06:48:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RpINT-0003bS-BX
	for commit-inetutils@gnu.org; Mon, 23 Jan 2012 06:48:00 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:34720)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RpINT-0003bO-A1
	for commit-inetutils@gnu.org; Mon, 23 Jan 2012 06:47:59 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RpINT-0006pI-2q
	for commit-inetutils@gnu.org; Mon, 23 Jan 2012 11:47:59 +0000
Date: Mon, 23 Jan 2012 11:47:59 +0000
Message-Id: <E1RpINT-0006pI-2q@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-9-ga98c806
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 273d270ca3543c2b2fced41113359e290630190f
X-Git-Newrev: a98c806d93ae9f640b3f3dba038bcf3dbc71da3c
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Jan 2012 11:48:02 -0000

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

The branch, master has been updated
       via  a98c806d93ae9f640b3f3dba038bcf3dbc71da3c (commit)
      from  273d270ca3543c2b2fced41113359e290630190f (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=a98c806d93ae9f640b3f3dba038bcf3dbc71da3c


commit a98c806d93ae9f640b3f3dba038bcf3dbc71da3c
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Mon Jan 23 12:48:20 2012 +0100

    Portability of FTP and TFTP tests.

diff --git a/ChangeLog b/ChangeLog
index 5f1d26b..8b1da24 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-01-23  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* tests/ftp-localhost.sh: New preamble to fail
+	with SVR4 shell.  Backtics in command substitution.
+	* tests/tftp.sh: Rewrite for SVR4 portability.
+	Backtics in command substitution.  expr(1) for
+	arithmetic.  Only basic regex with grep(1), no `-q'.
+	Remove character classes.  Quotation issue for tr(1).
+	Use `test -r /dev/urandom' to circumvent soft link.
+
 2012-01-22  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* tests/tftp.sh (USER): Calculate as `id -u -n'.
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index 171e9c3..01135e7 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -43,6 +43,18 @@ if [ $VERBOSE ]; then
     $INETD --version | head -1
 fi
 
+# This script is using '! command' in many tests,
+# which is not available in old shells.  We fail
+# for those old shell releases.
+if eval '! false' 2>/dev/null; then
+    :	# This is expected
+else
+    echo 'Presently using the SVR4 Bourne shell.'
+    echo 'This test needs a recent shell with'
+    echo 'keyword ! and tilde expansion.'
+    exit 77
+fi
+
 if [ `id -u` != 0 ]; then
     echo "ftpd needs to run as root"
     exit 77
@@ -65,7 +77,7 @@ TMPDIR=`mktemp -d $PWD/tmp.XXXXXXXXXX`
 
 posttesting () {
     test -f "$TMPDIR/inetd.pid" && test -r "$TMPDIR/inetd.pid" \
-	&& kill -9 "$(cat $TMPDIR/inetd.pid)"
+	&& kill -9 "`cat $TMPDIR/inetd.pid`"
     rm -rf "$TMPDIR"
 }
 
diff --git a/tests/tftp.sh b/tests/tftp.sh
index 3a1217d..06b72b7 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -42,9 +42,9 @@ INETD_PID="$TMPDIR/inetd.pid.$$"
 
 posttesting () {
     if test -f "$INETD_PID" && test -r "$INETD_PID" \
-	&& ps "$(cat $INETD_PID)" >/dev/null 2>&1
+	&& ps "`cat $INETD_PID`" >/dev/null 2>&1
     then
-	kill -9 "$(cat $INETD_PID)"
+	kill -9 "`cat $INETD_PID`" 2>/dev/null
     fi
     rm -rf "$TMPDIR" $FILELIST
 }
@@ -61,7 +61,7 @@ ADDRESSES="${ADDRESSES:-127.0.0.1}"
 
 if [ "$ADDRESSES" = "sense" ]; then
     ADDRESSES="`$IFCONFIG | sed -e "/$AF /!d" \
-	-e "s/^.*$AF[[:blank:]]\([:.0-9]\{1,\}\)[[:blank:]].*$/\1/g"`"
+	-e "s/^.*$AF \([:.0-9]\{1,\}\) .*$/\1/g"`"
 fi
 
 # Check that netstat works before proceeding.
@@ -76,10 +76,11 @@ fi
 # locate_port family proto port
 #
 locate_port () {
-    if [ "$(uname -s)" = "SunOS" ]; then
-	netstat -na -f$1 -P$2 | grep -q -E "\.$3[^0-9]"
+    if [ "`uname -s`" = "SunOS" ]; then
+	netstat -na -f$1 -P$2 | grep "\.$3[^0-9]" >/dev/null 2>&1
     else
-	netstat -na | grep -q -E "^$2(4|6|46)?.*[^0-9]$3[^0-9]"
+	netstat -na |
+	grep "^$2\(4\|6\|46\)\{0,1\}.*[^0-9]$3[^0-9]" >/dev/null 2>&1
     fi
 }
 
@@ -90,7 +91,7 @@ if [ "$VERBOSE" ]; then
 fi
 
 # Check that the port is still available
-locate_port inet $PROTO $PORT
+locate_port $AF $PROTO $PORT
 if test $? -eq 0; then
     echo "Desired port $PORT/$PROTO is already in use."
     exit 77
@@ -106,7 +107,7 @@ EOF
 # Launch `inetd', assuming it's reachable at all $ADDRESSES.
 $INETD -d -p"$INETD_PID" "$INETD_CONF" &
 sleep 1
-inetd_pid="$(cat $INETD_PID)"
+inetd_pid="`cat $INETD_PID`"
 
 test -z "$VERBOSE" || echo "Launched Inetd as process $inetd_pid." >&2
 
@@ -114,15 +115,15 @@ test -z "$VERBOSE" || echo "Launched Inetd as process $inetd_pid." >&2
 sleep 1
 
 # Did `inetd' really succeed in establishing a listener?
-locate_port inet $PROTO $PORT
+locate_port $AF $PROTO $PORT
 if test $? -ne 0; then
     # No it did not.
-    ps "$inetd_pid" >/dev/null 2>&1 && kill "$inetd_pid"
+    ps "$inetd_pid" >/dev/null 2>&1 && kill "$inetd_pid" 2>/dev/null
     echo "Failed in starting correct Inetd instance." >&2
     exit 1
 fi
 
-if [ -f /dev/urandom ]; then
+if [ -r /dev/urandom ]; then
     input="/dev/urandom"
 else
     input="/dev/zero"
@@ -149,23 +150,23 @@ while read name bsize count; do
 	bs=$bsize count=$count 2>/dev/null
 done
 
-FILELIST="$(echo "$FILEDATA" | sed 's/[[:space:]].*//' | tr "\n" ' ')"
+FILELIST="`echo "$FILEDATA" | sed 's/ .*//' | tr "\n" ' '`"
 
 SUCCESSES=0
 EFFORTS=0
 RESULT=0
 
-echo "Looking into \"$(echo $ADDRESSES | tr "\n" " ")\"."
+echo "Looking into '`echo $ADDRESSES | tr "\n" ' '`'."
 
 for addr in $ADDRESSES; do
     echo "trying with address \`$addr'..." >&2
 
     for name in $FILELIST; do
-	EFFORTS=$((EFFORTS + 1))
+	EFFORTS=`expr $EFFORTS + 1`
 	rm -f $name
 	echo "get $name" | "$TFTP" $addr $PORT
 
-	cmp "$TMPDIR/tftp-test/$name" "$name"
+	cmp "$TMPDIR/tftp-test/$name" "$name" 2>/dev/null
 	result=$?
 
 	if [ "$result" -ne 0 ]; then
@@ -173,7 +174,7 @@ for addr in $ADDRESSES; do
 	    test -z "$VERBOSE" || echo "Failed comparison for $addr/$name." >&2
 	    RESULT=$result
 	else
-	    SUCCESSES=$((SUCCESSES + 1))
+	    SUCCESSES=`expr $SUCCESSES + 1`
 	    test -z "$VERBOSE" || echo "Successful comparison for $addr/$name." >&2
 	fi
    done

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

Summary of changes:
 ChangeLog              |   10 ++++++++++
 tests/ftp-localhost.sh |   14 +++++++++++++-
 tests/tftp.sh          |   33 +++++++++++++++++----------------
 3 files changed, 40 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed Jan 25 16:48:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RqAhV-00038u-6E
	for mharc-commit-inetutils@gnu.org; Wed, 25 Jan 2012 16:48:17 -0500
Received: from eggs.gnu.org ([140.186.70.92]:35077)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RqAhO-00036c-TJ
	for commit-inetutils@gnu.org; Wed, 25 Jan 2012 16:48:16 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RqAhM-0007N1-BJ
	for commit-inetutils@gnu.org; Wed, 25 Jan 2012 16:48:10 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:34793)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RqAhM-0007Mx-7L
	for commit-inetutils@gnu.org; Wed, 25 Jan 2012 16:48:08 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RqAhM-0007nL-4Y
	for commit-inetutils@gnu.org; Wed, 25 Jan 2012 21:48:08 +0000
Date: Wed, 25 Jan 2012 21:48:08 +0000
Message-Id: <E1RqAhM-0007nL-4Y@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-10-g87b60f3
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: a98c806d93ae9f640b3f3dba038bcf3dbc71da3c
X-Git-Newrev: 87b60f3f47dbd274e847e3fee306cb1dbe116173
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, 25 Jan 2012 21:48:16 -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  87b60f3f47dbd274e847e3fee306cb1dbe116173 (commit)
      from  a98c806d93ae9f640b3f3dba038bcf3dbc71da3c (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=87b60f3f47dbd274e847e3fee306cb1dbe116173


commit 87b60f3f47dbd274e847e3fee306cb1dbe116173
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed Jan 25 22:42:26 2012 +0100

    tests/syslogd.sh: Refinement and robustness.
    
    Use TMPDIR from environment.  Usable with SVR4 shells.

diff --git a/ChangeLog b/ChangeLog
index 8b1da24..894ef42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-01-25  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* tests/syslogd.sh: Substantial rewrite.  Early verbosity.
+	Consistent quoting for white space in IU_TESTDIR.  Robustness
+	with error checking.  Execution inside `tests/'.
+	(TARGET, TARGET6): New variables.
+	(TMPDIR): Overrides `/tmp/' as temporary directory.
+
 2012-01-23  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* tests/ftp-localhost.sh: New preamble to fail
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index 8b9004d..3fc11dd 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -25,7 +25,7 @@
 # Is usage explanation in demand?
 #
 if test "$1" = "-h" || test "$1" = "--help" || test "$1" = "--usage"; then
-	cat <<HERE
+    cat <<HERE
 Test utility for syslogd and logger.
 
 The following environment variables are used:
@@ -33,133 +33,229 @@ The following environment variables are used:
 NOCLEAN		No clean up of testing directory, if set.
 VERBOSE		Be verbose, if set.
 OPTIONS		Base options to build upon.
-IU_TESTDIR	If set, use this as testing dir. Unless
+IU_TESTDIR	If set, use this as testing dir.  Unless
 		NOCLEAN is also set, any created \$IU_TESTDIR
-		will be erased after the test.
+		will be erased after the test.  A non-existing
+		directory must be named as a template for mktemp(1).
 REMOTE_LOGHOST	Add this host as a receiving loghost.
+TARGET		Receiving IPv4 address.
+TARGET6		Receiving IPv6 address.
 
 HERE
-	exit 0
+    exit 0
 fi
 
+# Execution control.  Initialise early!
+#
+do_cleandir=false
+do_socket_length=true
+
+# The executables under test.
+#
+IU_SYSLOGD=../src/syslogd$EXEEXT
+IU_LOGGER=../src/logger$EXEEXT
+
+# Step into `tests/', should the invokation
+# have been made outside of it.
+#
+[ -d src ] && [ -f tests/syslogd.sh ] && cd tests/
+
+if [ $VERBOSE ]; then
+    set -x
+    $IU_SYSLOGD --version
+    $IU_LOGGER --version
+fi
+
+if [ ! -x $IU_SYSLOGD ]; then
+    echo "Missing executable 'syslogd'.  Failing."
+    exit 77
+fi
+
+if [ ! -x $IU_LOGGER ]; then
+    echo "Missing executable 'logger'.  Failing."
+    exit 77
+fi
+
+# For file creation below IU_TESTDIR.
+umask 0077
+
 # Keep any external assignment of testing directory.
 # Otherwise a randomisation is included.
 #
 : ${IU_TESTDIR:=$PWD/iu_syslog.XXXXXX}
 
-if [ ! -d $IU_TESTDIR ]; then
-	IU_DO_CLEANDIR=yes
-	IU_TESTDIR=$(mktemp -d $IU_TESTDIR)
+if [ ! -d "$IU_TESTDIR" ]; then
+    do_cleandir=true
+    IU_TESTDIR="`mktemp -d "$IU_TESTDIR" 2>/dev/null`" ||
+	{
+	    echo 'Failed at creating test directory.  Aborting.' >&2
+	    exit 77
+	}
+elif expr X"$IU_TESTDIR" : X"\.\{1,2\}/\{0,1\}$" >/dev/null; then
+    # Eliminating directories: . ./ .. ../
+    echo 'Dangerous input for test directory.  Aborting.' >&2
+    exit 77
 fi
 
+# The SYSLOG daemon uses four files.
+#
+CONF="$IU_TESTDIR"/syslog.conf
+PID="$IU_TESTDIR"/syslogd.pid
+OUT="$IU_TESTDIR"/messages
+: ${SOCKET:=$IU_TESTDIR/log}
+
+# Are we able to write in IU_TESTDIR?
+# This could happen with preset IU_TESTDIR.
+#
+touch "$OUT" || {
+    echo 'No write access in test directory.  Aborting.' >&2
+    exit 1
+}
+
 # Erase the testing directory.
 #
 clean_testdir () {
-	if test -z "${NOCLEAN+no}" && test "$IU_DO_CLEANDIR" = "yes"; then
-		rm -fR $IU_TESTDIR
-	fi
-	test -f "$PID" && ps "$(cat $PID)" >/dev/null 2>&1 \
-		&& kill -9 "$(cat $PID)"
+    if test -f "$PID" && ps "`cat "$PID"`" >/dev/null 2>&1; then
+	kill -9 "`cat "$PID"`"
+    fi
+    if test -z "${NOCLEAN+no}" && $do_cleandir; then
+	rm -r -f "$IU_TESTDIR"
+    fi
+    if $do_socket_length && test -d "$IU_TMPDIR"; then
+	rmdir "$IU_TMPDIR"	# Should be empty.
+    fi
 }
 
 # Clean artifacts as execution stops.
 #
 trap clean_testdir EXIT HUP INT QUIT TERM
 
-
-CONF=$IU_TESTDIR/syslog.conf
-PID=$IU_TESTDIR/syslogd.pid
-OUT=$IU_TESTDIR/messages
-: ${SOCKET:=$IU_TESTDIR/log}
-
 # Test at this port.
 # Standard is syslog at 514/udp.
 PROTO=udp
 PORT=514
 
+# Receivers for INET sockets.
+: ${TARGET:=127.0.0.1}
+: ${TARGET6:=[::1]}
+
 # For testing of critical lengths for UNIX socket names,
-# we need a well defined base directory; choose "/tmp/".
-IU_TEN=0123456789
-IU_TWENTY=${IU_TEN}${IU_TEN}
-IU_FORTY=${IU_TWENTY}${IU_TWENTY}
-IU_EIGHTY=${IU_FORTY}${IU_FORTY}
+# we need a well defined base directory; choose $TMPDIR.
+IU_TMPDIR=${TMPDIR:=/tmp}
+
+if test ! -d "$IU_TMPDIR"; then
+    do_socket_length=false
+    cat <<-EOT >&2
+	WARNING!  Disabling socket length test since the directory
+	"$IU_TMPDIR", for temporary storage, does not exist.
+	EOT
+else
+    # Append a slash if it is missing.
+    expr X"$IU_TMPDIR" : X".*/$" >/dev/null || IU_TMPDIR="$IU_TMPDIR/"
+
+    IU_TMPDIR="`mktemp -d "${IU_TMPDIR}iu.XXXXXX" 2>/dev/null`" ||
+	{   # Directory creation failed.  Disable test.
+	    cat <<-EOT >&2
+		WARNING!  Unable to create temporary directory below
+		"${TMPDIR:-/tmp}" for socket length test.
+		Now disabling this subtest.
+		EOT
+	    do_socket_length=false
+	}
+fi
 
-# This good name base consumes twentythree chracters.
-IU_GOOD_BASE=/tmp/$(date +%y-%m-%d)_socket_iu
+iu_eighty=0123456789
+iu_eighty=${iu_eighty}${iu_eighty}
+iu_eighty=${iu_eighty}${iu_eighty}
+iu_eighty=${iu_eighty}${iu_eighty}
+
+# This good name base will be expanded.
+IU_GOOD_BASE=${IU_TMPDIR}/_iu
 
 # Add a single character to violate the size condition.
-IU_BAD_BASE=/tmp/X$(date +%y-%m-%d)_socket_iu
-
-IU_OS=$(uname -s)
-if test "${IU_OS}" = "Linux" || test "${IU_OS}" = "GNU/kFreeBSD" \
-    || test "${IU_OS}" = "SunOS"; then
-	# Aim at the boundary of 108 characters.
-	IU_GOOD_BASE=${IU_GOOD_BASE}_lnx
-	IU_BAD_BASE=${IU_BAD_BASE}_lnx
-fi
+IU_BAD_BASE=${IU_TMPDIR}/X_iu
 
-# Establish largest possible socket name.  The long
-# name consists of 103 or 107 non-NUL characters,
-# where the excessive string contains 104 or 108.
-# BSD allocates only 104, whereas GLIBC and Solaris
-# admits 108 characters in "sun_path", including NUL.
-IU_LONG_SOCKET=${IU_GOOD_BASE}${IU_EIGHTY}
-IU_EXCESSIVE_SOCKET=${IU_BAD_BASE}${IU_EIGHTY}
+iu_socklen_max=104	# BSD flavour!
 
-# All messages intended for post-detection are
-# to be uniformly tagged.
-TAG="syslogd-test"
+IU_OS=`uname -s`
+if test "$IU_OS" = "Linux" || test "$IU_OS" = "GNU/kFreeBSD" ||
+	test "$IU_OS" = "SunOS"; then
+    # Aim at the boundary of 108 characters.
+    iu_socklen_max=108
+fi
 
-# The executables under test.
+# Establish largest possible socket name.
+#
+# The long name consists of 103 or 107 non-NUL
+# characters, whereas the excessive string contains
+# 104 or 108 characters.  BSD allocates only 104,
+# while Glibc and Solaris admit 108 characters in
+# "sun_path", a count which includes the final NUL.
+
+if test `expr X"$IU_GOOD_BASE" : X".*"` -gt $iu_socklen_max; then
+    # Maximum socket length is already less than prefix.
+    echo 'WARNING! Disabling socket length test.  Too long base name' >&2
+    do_socket_length=false
+fi
 
-IU_SYSLOGD=./src/syslogd$EXEEXT
-IU_LOGGER=./src/logger$EXEEXT
+if $do_socket_length; then
+    # Compute any patching needed to get socket names
+    # touching the limit of allowed length.
+    iu_patch=''
+    iu_pt="$IU_GOOD_BASE"	# Computational helper.
 
-# Step out of `tests/', should the invokation
-# have been made there.
-#
-[ -d ../src ] && cd ..
+    if test `expr X"$iu_pt$iu_eighty" : X".*"` -le $iu_socklen_max; then
+	iu_patch="$iu_patch$iu_eighty" && iu_pt="$iu_pt$iu_eighty"
+    fi
 
-if [ $VERBOSE ]; then
-    set -x
-    $IU_SYSLOGD --version
-    $IU_LOGGER --version
-fi
+    count=`expr X"$iu_pt" : X".*"`
+    count=`expr $iu_socklen_max - $count`
 
-if [ ! -x $IU_SYSLOGD ]; then
-	echo "Missing executable 'syslogd'. Failing."
-	exit 77
-fi
+    # $count gives the number, and $iu_eighty the characters.
+    if test $count -gt 0; then
+	iu_patch="$iu_patch`expr X"$iu_eighty" : X"\(.\{1,$count\}\)"`"
+    fi
 
-if [ ! -x $IU_LOGGER ]; then
-	echo "Missing executable 'logger'. Failing."
-	exit 77
+    IU_LONG_SOCKET="$IU_GOOD_BASE$iu_patch"
+    IU_EXCESSIVE_SOCKET="$IU_BAD_BASE$iu_patch"
 fi
 
-# Remove old messages.
-rm -f $OUT $PID
+# All messages intended for post-detection are
+# to be uniformly tagged.
+TAG="syslogd-test"
+
+# Remove old files in use by daemon.
+rm -f "$OUT" "$PID" "$CONF"
 
 # Full testing needs a superuser.  Report this.
-if [ $(id -u) -ne 0 ]; then
-	cat <<-EOT
-	WARNING!!
-	Disabling INET server tests since you seem
+if [ `id -u` -ne 0 ]; then
+    cat <<-EOT >&2
+	WARNING!!  Disabling INET server tests since you seem
 	to be underprivileged.
 	EOT
 else
-	# Is the INET port already in use? If so,
-	# skip the test in its entirety.
-	netstat -na | grep -q -E "^$PROTO(4|6|46)?.*[^0-9]$PORT[^0-9]"
-	if [ $? -eq 0 ]; then
-		echo "The INET port $PORT/$PROTO is already in use."
-		echo "No reliable test is possible."
-		exit 77
-	fi
+    # Is the INET port already in use? If so,
+    # skip the test in its entirety.
+    if [ "`uname -s`" = "SunOS" ]; then
+	netstat -na -finet -finet6 -P$PROTO |
+	grep "\.$PORT[^0-9]" >/dev/null 2>&1
+    else
+	netstat -na |
+	grep "^$PROTO\(4\|6\|46\)\{0,1\}.*[^0-9]$PORT[^0-9]" \
+	    >/dev/null 2>&1
+    fi
+    if [ $? -eq 0 ]; then
+	cat <<-EOT >&2
+		The INET port $PORT/$PROTO is already in use.
+		No reliable test of INET socket is possible.
+	EOT
+	exit 77
+    fi
 fi
 
 # A minimal, catch-all configuration.
 #
-cat > $CONF <<-EOT
+cat > "$CONF" <<-EOT
 	*.*	$OUT
 	# Test incorrect forwarding.
 	*.*	@not.in.existence
@@ -172,10 +268,10 @@ EOT
 # Set REMOTE_LOGHOST to activate forwarding
 #
 if [ -n "$REMOTE_LOGHOST" ]; then
-	# Append a forwarding stanza.
-	cat >> $CONF <<-EOT
-		# Forwarding remotely
-		*.*	@$REMOTE_LOGHOST
+    # Append a forwarding stanza.
+    cat >> "$CONF" <<-EOT
+	# Forwarding remotely
+	*.*	@$REMOTE_LOGHOST
 	EOT
 fi
 
@@ -183,21 +279,25 @@ fi
 # building the desired option list.
 #
 ## Base configuration.
-IU_OPTIONS="--rcfile=$CONF --pidfile=$PID --socket=$SOCKET"
-IU_OPTIONS="$IU_OPTIONS -a $IU_LONG_SOCKET -a $IU_EXCESSIVE_SOCKET"
+IU_OPTIONS="--rcfile='$CONF' --pidfile='$PID' --socket='$SOCKET'"
+if $do_socket_length; then
+    IU_OPTIONS="$IU_OPTIONS -a '$IU_LONG_SOCKET' -a '$IU_EXCESSIVE_SOCKET'"
+fi
 
 ## Enable INET service when running as root.
-if [ $(id -u) -eq 0 ]; then
-	IU_OPTIONS="$IU_OPTIONS --ipany --inet --hop"
+if [ `id -u` -eq 0 ]; then
+    IU_OPTIONS="$IU_OPTIONS --ipany --inet --hop"
 fi
 ## Bring in additional options from command line.
 ## Disable kernel messages otherwise.
 if [ -c /dev/klog ]; then
-	: OPTIONS=${OPTIONS:=--no-klog}
+    : OPTIONS=${OPTIONS:=--no-klog}
 fi
 IU_OPTIONS="$IU_OPTIONS $OPTIONS"
 
-$IU_SYSLOGD $IU_OPTIONS
+# The eval-construct allows white space in file names,
+# based on the use of single quotes in IU_OPTIONS.
+eval $IU_SYSLOGD $IU_OPTIONS
 
 # Wait a moment in order to avoid an obvious
 # race condition with the server daemon on
@@ -207,9 +307,9 @@ sleep 1
 
 # Test to see whether the service got started.
 #
-if [ ! -r $PID ]; then
-	echo "The service daemon never started. Failing."
-	exit 1
+if [ ! -r "$PID" ]; then
+    echo "The service daemon never started.  Failing." >&2
+    exit 1
 fi
 
 # Declare the number of implemented tests,
@@ -220,41 +320,52 @@ SUCCESSES=0
 EXITCODE=1
 
 # Check that the excessively long UNIX socket name was rejected.
-TESTCASES=$((TESTCASES + 1))
-if grep -q "UNIX socket name too long.*${IU_BAD_BASE}" $OUT; then
-	SUCCESSES="$((SUCCESSES + 1))"
+if $do_socket_length; then
+    TESTCASES=`expr $TESTCASES + 1`
+    if grep "UNIX socket name too long.*${IU_BAD_BASE}" "$OUT" >/dev/null 2>&1; then
+	SUCCESSES=`expr $SUCCESSES + 1`
+    fi
 fi
 
 # Send messages on two sockets: IPv4 and UNIX.
 #
-TESTCASES=$((TESTCASES + 2))
-$IU_LOGGER -h $SOCKET -p user.info -t $TAG "Sending BSD message. (pid $$)"
-$IU_LOGGER -h $IU_LONG_SOCKET -p user.info -t $TAG "Sending via long socket name. (pid $$)"
-
-if [ $(id -u) -eq 0 ]; then
-	TESTCASES=$((TESTCASES + 2))
-	$IU_LOGGER -4 -h 127.0.0.1 -p user.info -t $TAG "Sending IPv4 message. (pid $$)"
-	$IU_LOGGER -6 -h "[::1]" -p user.info -t $TAG "Sending IPv6 message. (pid $$)"
+TESTCASES=`expr $TESTCASES + 1`
+$IU_LOGGER -h "$SOCKET" -p user.info -t "$TAG" \
+    "Sending BSD message. (pid $$)"
+
+if $do_socket_length; then
+    TESTCASES=`expr $TESTCASES + 1`
+    $IU_LOGGER -h "$IU_LONG_SOCKET" -p user.info \
+	-t "$TAG" "Sending via long socket name. (pid $$)"
+fi
+
+if [ `id -u` -eq 0 ]; then
+    TESTCASES=`expr $TESTCASES + 2`
+    $IU_LOGGER -4 -h "$TARGET" -p user.info -t "$TAG" \
+	"Sending IPv4 message. (pid $$)"
+    $IU_LOGGER -6 -h "$TARGET6" -p user.info -t "$TAG" \
+	"Sending IPv6 message. (pid $$)"
 fi
 
 # Detection of registered messages.
 #
-SUCCESSES="$((SUCCESSES + $(grep $TAG $OUT | wc -l) ))"
+COUNT=`grep "$TAG" "$OUT" | wc -l`
+SUCCESSES=`expr $SUCCESSES + $COUNT`
 
 if [ -n "${VERBOSE+yes}" ]; then
-	grep $TAG $OUT
+    grep "$TAG" "$OUT"
 fi
 
 echo "Registered $SUCCESSES successes out of $TESTCASES."
 
 if [ "$SUCCESSES" -eq "$TESTCASES" ]; then
-	echo "Successful testing."
-	EXITCODE=0
+    echo "Successful testing."
+    EXITCODE=0
 else
-	echo "Failing some tests."
+    echo "Failing some tests."
 fi
 
 # Remove the daemon process.
-[ -r $PID ] && kill "$(cat $PID)"
+[ -r "$PID" ] && kill "`cat "$PID"`"
 
 exit $EXITCODE

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

Summary of changes:
 ChangeLog        |    8 ++
 tests/syslogd.sh |  327 ++++++++++++++++++++++++++++++++++++------------------
 2 files changed, 227 insertions(+), 108 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Thu Jan 26 09:52:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RqQgl-0006hZ-3b
	for mharc-commit-inetutils@gnu.org; Thu, 26 Jan 2012 09:52:35 -0500
Received: from eggs.gnu.org ([140.186.70.92]:51979)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RqQge-0006gi-9i
	for commit-inetutils@gnu.org; Thu, 26 Jan 2012 09:52:32 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RqQgV-0005n5-SQ
	for commit-inetutils@gnu.org; Thu, 26 Jan 2012 09:52:28 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:38994)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RqQgV-0005mu-Hx
	for commit-inetutils@gnu.org; Thu, 26 Jan 2012 09:52:19 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RqQgV-0007v7-AG
	for commit-inetutils@gnu.org; Thu, 26 Jan 2012 14:52:19 +0000
Date: Thu, 26 Jan 2012 14:52:19 +0000
Message-Id: <E1RqQgV-0007v7-AG@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-11-g8c1fd8b
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 87b60f3f47dbd274e847e3fee306cb1dbe116173
X-Git-Newrev: 8c1fd8b773d969056f2c2edf6eef274133fdb4a3
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, 26 Jan 2012 14:52:33 -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  8c1fd8b773d969056f2c2edf6eef274133fdb4a3 (commit)
      from  87b60f3f47dbd274e847e3fee306cb1dbe116173 (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=8c1fd8b773d969056f2c2edf6eef274133fdb4a3


commit 8c1fd8b773d969056f2c2edf6eef274133fdb4a3
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Thu Jan 26 15:51:32 2012 +0100

    Prerequisites for test execution.

diff --git a/ChangeLog b/ChangeLog
index 894ef42..f44e743 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-01-26  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* tests/ftp-localhost.sh, tests/ping-localhost.sh,
+	tests/syslogd.sh, tests/tftp.sh, tests/traceroute-localhost.sh:
+	Test the availability of compiled resources.
+	* tests/syslogd.sh (LOGGER): Rename from IU_LOGGER.
+	(SYSLOGD): Rename from IU_SYSLOGD.
+	* tests/tftp.sh (IFCONFIG_SIMPLE): New helper variable.
+
 2012-01-25  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* tests/syslogd.sh: Substantial rewrite.  Early verbosity.
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index 01135e7..431ecaa 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -36,6 +36,17 @@ TARGET=${TARGET:-127.0.0.1}
 TARGET6=${TARGET6:-::1}
 TARGET46=${TARGET46:-::ffff:127.0.0.1}
 
+if [ ! -x $FTP ]; then
+    echo "No FTP client '$FTP' present.  Skipping test" >&2
+    exit 77
+elif [ ! -x $FTPD ]; then
+    echo "No FTP server '$FTPD' present.  Skipping test" >&2
+    exit 77
+elif [ ! -x $INETD ]; then
+    echo "No inetd superserver '$INETD' present.  Skipping test" >&2
+    exit 77
+fi
+
 if [ $VERBOSE ]; then
     set -x
     $FTP --version | head -1
diff --git a/tests/ping-localhost.sh b/tests/ping-localhost.sh
index 8f0b87a..0bda2fc 100755
--- a/tests/ping-localhost.sh
+++ b/tests/ping-localhost.sh
@@ -23,6 +23,11 @@ TARGET=${TARGET:-127.0.0.1}
 PING6=${PING6:-../ping/ping6$EXEEXT}
 TARGET6=${TARGET6:-::1}
 
+if [ ! -x $PING ]; then
+    echo 'No executable "$PING" available.  Skipping test.' >&2
+    exit 77
+fi
+
 if [ $VERBOSE ]; then
     set -x
     $PING --version
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index 3fc11dd..0eecfa4 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -52,8 +52,8 @@ do_socket_length=true
 
 # The executables under test.
 #
-IU_SYSLOGD=../src/syslogd$EXEEXT
-IU_LOGGER=../src/logger$EXEEXT
+SYSLOGD=../src/syslogd$EXEEXT
+LOGGER=../src/logger$EXEEXT
 
 # Step into `tests/', should the invokation
 # have been made outside of it.
@@ -62,17 +62,17 @@ IU_LOGGER=../src/logger$EXEEXT
 
 if [ $VERBOSE ]; then
     set -x
-    $IU_SYSLOGD --version
-    $IU_LOGGER --version
+    $SYSLOGD --version
+    $LOGGER --version
 fi
 
-if [ ! -x $IU_SYSLOGD ]; then
-    echo "Missing executable 'syslogd'.  Failing."
+if [ ! -x $SYSLOGD ]; then
+    echo "Missing executable '$SYSLOGD'.  Failing." >&2
     exit 77
 fi
 
-if [ ! -x $IU_LOGGER ]; then
-    echo "Missing executable 'logger'.  Failing."
+if [ ! -x $LOGGER ]; then
+    echo "Missing executable '$LOGGER'.  Failing." >&2
     exit 77
 fi
 
@@ -297,7 +297,7 @@ IU_OPTIONS="$IU_OPTIONS $OPTIONS"
 
 # The eval-construct allows white space in file names,
 # based on the use of single quotes in IU_OPTIONS.
-eval $IU_SYSLOGD $IU_OPTIONS
+eval $SYSLOGD $IU_OPTIONS
 
 # Wait a moment in order to avoid an obvious
 # race condition with the server daemon on
@@ -330,20 +330,20 @@ fi
 # Send messages on two sockets: IPv4 and UNIX.
 #
 TESTCASES=`expr $TESTCASES + 1`
-$IU_LOGGER -h "$SOCKET" -p user.info -t "$TAG" \
+$LOGGER -h "$SOCKET" -p user.info -t "$TAG" \
     "Sending BSD message. (pid $$)"
 
 if $do_socket_length; then
     TESTCASES=`expr $TESTCASES + 1`
-    $IU_LOGGER -h "$IU_LONG_SOCKET" -p user.info \
+    $LOGGER -h "$IU_LONG_SOCKET" -p user.info \
 	-t "$TAG" "Sending via long socket name. (pid $$)"
 fi
 
 if [ `id -u` -eq 0 ]; then
     TESTCASES=`expr $TESTCASES + 2`
-    $IU_LOGGER -4 -h "$TARGET" -p user.info -t "$TAG" \
+    $LOGGER -4 -h "$TARGET" -p user.info -t "$TAG" \
 	"Sending IPv4 message. (pid $$)"
-    $IU_LOGGER -6 -h "$TARGET6" -p user.info -t "$TAG" \
+    $LOGGER -6 -h "$TARGET6" -p user.info -t "$TAG" \
 	"Sending IPv6 message. (pid $$)"
 fi
 
diff --git a/tests/tftp.sh b/tests/tftp.sh
index 06b72b7..e43dacc 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -29,6 +29,21 @@ TFTP="${TFTP:-../src/tftp$EXEEXT}"
 TFTPD="${TFTPD:-$PWD/../src/tftpd$EXEEXT}"
 INETD="${INETD:-../src/inetd$EXEEXT}"
 IFCONFIG="${IFCONFIG:-../ifconfig/ifconfig$EXEEXT --format=unix}"
+IFCONFIG_SIMPLE=`expr X"$IFCONFIG" : X'\([^ ]*\)'`	# Remove options
+
+if [ ! -x $TFTP ]; then
+    echo "No TFTP client '$TFTP' present.  Skipping test" >&2
+    exit 77
+elif [ ! -x $TFTPD ]; then
+    echo "No TFTP server '$TFTPD' present.  Skipping test" >&2
+    exit 77
+elif [ ! -x $INETD ]; then
+    echo "No inetd superserver '$INETD' present.  Skipping test" >&2
+    exit 77
+elif [ ! -x $IFCONFIG_SIMPLE ]; then	# Remove options
+    echo "No ifconfig '$IFCONFIG_SIMPLE' present.  Skipping test" >&2
+    exit 77
+fi
 
 AF=${AF:-inet}
 PROTO=${PROTO:-udp}
diff --git a/tests/traceroute-localhost.sh b/tests/traceroute-localhost.sh
index 9003c0f..a9f9e4c 100755
--- a/tests/traceroute-localhost.sh
+++ b/tests/traceroute-localhost.sh
@@ -20,6 +20,11 @@
 TRACEROUTE=${TRACEROUTE:-../src/traceroute$EXEEXT}
 TARGET=${TARGET:-127.0.0.1}
 
+if [ ! -x $TRACEROUTE ]; then
+    echo 'No executable "$TRACEROUTE" available.  Skipping test.' >&2
+    exit 77
+fi
+
 if [ $VERBOSE ]; then
     set -x
     $TRACEROUTE --version

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

Summary of changes:
 ChangeLog                     |    9 +++++++++
 tests/ftp-localhost.sh        |   11 +++++++++++
 tests/ping-localhost.sh       |    5 +++++
 tests/syslogd.sh              |   26 +++++++++++++-------------
 tests/tftp.sh                 |   15 +++++++++++++++
 tests/traceroute-localhost.sh |    5 +++++
 6 files changed, 58 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Thu Jan 26 15:39:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RqW6V-0001QQ-CD
	for mharc-commit-inetutils@gnu.org; Thu, 26 Jan 2012 15:39:31 -0500
Received: from [140.186.70.92] (port=36868 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RqW6S-0001Pb-2s
	for commit-inetutils@gnu.org; Thu, 26 Jan 2012 15:39:29 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RqW6J-0004wU-44
	for commit-inetutils@gnu.org; Thu, 26 Jan 2012 15:39:26 -0500
Received: from [140.186.70.72] (port=33693 helo=vcs.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RqW6I-0004vn-W8
	for commit-inetutils@gnu.org; Thu, 26 Jan 2012 15:39:19 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RqW6A-0006Kr-AH
	for commit-inetutils@gnu.org; Thu, 26 Jan 2012 20:39:11 +0000
Date: Thu, 26 Jan 2012 20:39:10 +0000
Message-Id: <E1RqW6A-0006Kr-AH@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-12-g9b93c80
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 8c1fd8b773d969056f2c2edf6eef274133fdb4a3
X-Git-Newrev: 9b93c80dea90d3e361d4004a773965f7ff553e8f
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, 26 Jan 2012 20:39:29 -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  9b93c80dea90d3e361d4004a773965f7ff553e8f (commit)
      from  8c1fd8b773d969056f2c2edf6eef274133fdb4a3 (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=9b93c80dea90d3e361d4004a773965f7ff553e8f


commit 9b93c80dea90d3e361d4004a773965f7ff553e8f
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Thu Jan 26 20:38:54 2012 +0100

    tests/syslogd.sh: Avoid long socket name.

diff --git a/ChangeLog b/ChangeLog
index f44e743..8ca972f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-01-26  Mats Erik Andersson <gnu@gisladisker.se>
 
+	* tests/syslogd.sh (SOCKET): Disable the use of this
+	UNIX socket name if its length would be excessive.
+
+2012-01-26  Mats Erik Andersson <gnu@gisladisker.se>
+
 	* tests/ftp-localhost.sh, tests/ping-localhost.sh,
 	tests/syslogd.sh, tests/tftp.sh, tests/traceroute-localhost.sh:
 	Test the availability of compiled resources.
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index 0eecfa4..6438654 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -49,6 +49,24 @@ fi
 #
 do_cleandir=false
 do_socket_length=true
+do_unix_socket=true
+
+# The UNIX socket name length is preset by the system
+# and is also system dependent.
+#
+# A long name consists of 103 or 107 non-NUL characters,
+# whereas the excessive string contains 104 or 108 characters.
+# BSD allocates only 104, while Glibc and Solaris admit 108
+# characters in "sun_path", a count which includes the final NUL.
+
+iu_socklen_max=104	# BSD flavour!
+
+IU_OS=`uname -s`
+if test "$IU_OS" = "Linux" || test "$IU_OS" = "GNU/kFreeBSD" ||
+	test "$IU_OS" = "SunOS"; then
+    # Aim at the boundary of 108 characters.
+    iu_socklen_max=108
+fi
 
 # The executables under test.
 #
@@ -62,8 +80,8 @@ LOGGER=../src/logger$EXEEXT
 
 if [ $VERBOSE ]; then
     set -x
-    $SYSLOGD --version
-    $LOGGER --version
+    $SYSLOGD --version | head -1
+    $LOGGER --version | head -1
 fi
 
 if [ ! -x $SYSLOGD ]; then
@@ -112,6 +130,19 @@ touch "$OUT" || {
     exit 1
 }
 
+# Some automated build environments dig deep chroots, i.e.,
+# make the paths to this working directory disturbingly long.
+# Check SOCKET for this calamity.
+#
+if test `expr X"$SOCKET" : X".*"` -gt $iu_socklen_max; then
+    do_unix_socket=false
+    cat <<-EOT >&2
+	WARNING! The working directory uses a disturbingly long path.
+	We are not able to construct a UNIX socket on top of it.
+	Therefore disabling socket messaging in this test run.
+	EOT
+fi
+
 # Erase the testing directory.
 #
 clean_testdir () {
@@ -175,23 +206,6 @@ IU_GOOD_BASE=${IU_TMPDIR}/_iu
 # Add a single character to violate the size condition.
 IU_BAD_BASE=${IU_TMPDIR}/X_iu
 
-iu_socklen_max=104	# BSD flavour!
-
-IU_OS=`uname -s`
-if test "$IU_OS" = "Linux" || test "$IU_OS" = "GNU/kFreeBSD" ||
-	test "$IU_OS" = "SunOS"; then
-    # Aim at the boundary of 108 characters.
-    iu_socklen_max=108
-fi
-
-# Establish largest possible socket name.
-#
-# The long name consists of 103 or 107 non-NUL
-# characters, whereas the excessive string contains
-# 104 or 108 characters.  BSD allocates only 104,
-# while Glibc and Solaris admit 108 characters in
-# "sun_path", a count which includes the final NUL.
-
 if test `expr X"$IU_GOOD_BASE" : X".*"` -gt $iu_socklen_max; then
     # Maximum socket length is already less than prefix.
     echo 'WARNING! Disabling socket length test.  Too long base name' >&2
@@ -279,7 +293,13 @@ fi
 # building the desired option list.
 #
 ## Base configuration.
-IU_OPTIONS="--rcfile='$CONF' --pidfile='$PID' --socket='$SOCKET'"
+IU_OPTIONS="--rcfile='$CONF' --pidfile='$PID'"
+if $do_unix_socket; then
+    IU_OPTIONS="$IU_OPTIONS --socket='$SOCKET'"
+else
+    # The empty string will disable the standard socket.
+    IU_OPTIONS="$IU_OPTIONS --socket=''"
+fi
 if $do_socket_length; then
     IU_OPTIONS="$IU_OPTIONS -a '$IU_LONG_SOCKET' -a '$IU_EXCESSIVE_SOCKET'"
 fi
@@ -322,16 +342,23 @@ EXITCODE=1
 # Check that the excessively long UNIX socket name was rejected.
 if $do_socket_length; then
     TESTCASES=`expr $TESTCASES + 1`
-    if grep "UNIX socket name too long.*${IU_BAD_BASE}" "$OUT" >/dev/null 2>&1; then
+    # Messages can be truncated in the message log, so make a best
+    # effort to limit the length of the string we are searching for.
+    # Allowing 55 characters for IU_BAD_BASE is almost aggressive.
+    # A host name of length six would allow 64 characters
+    pruned=`expr "UNIX socket name too long.*${IU_BAD_BASE}" : '\(.\{1,82\}\)'`
+    if grep "$pruned" "$OUT" >/dev/null 2>&1; then
 	SUCCESSES=`expr $SUCCESSES + 1`
     fi
 fi
 
 # Send messages on two sockets: IPv4 and UNIX.
 #
-TESTCASES=`expr $TESTCASES + 1`
-$LOGGER -h "$SOCKET" -p user.info -t "$TAG" \
-    "Sending BSD message. (pid $$)"
+if $do_unix_socket; then
+    TESTCASES=`expr $TESTCASES + 1`
+    $LOGGER -h "$SOCKET" -p user.info -t "$TAG" \
+	"Sending BSD message. (pid $$)"
+fi
 
 if $do_socket_length; then
     TESTCASES=`expr $TESTCASES + 1`
@@ -353,7 +380,13 @@ COUNT=`grep "$TAG" "$OUT" | wc -l`
 SUCCESSES=`expr $SUCCESSES + $COUNT`
 
 if [ -n "${VERBOSE+yes}" ]; then
-    grep "$TAG" "$OUT"
+    cat <<-EOT
+	---------- Successfully detected messages. ----------
+	`grep "$TAG" "$OUT"`
+	---------- Full message log for syslogd. ------------
+	`cat "$OUT"`
+	-----------------------------------------------------
+	EOT
 fi
 
 echo "Registered $SUCCESSES successes out of $TESTCASES."

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

Summary of changes:
 ChangeLog        |    5 +++
 tests/syslogd.sh |   83 +++++++++++++++++++++++++++++++++++++----------------
 2 files changed, 63 insertions(+), 25 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Fri Jan 27 08:58:03 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RqmJX-0005He-Td
	for mharc-commit-inetutils@gnu.org; Fri, 27 Jan 2012 08:58:03 -0500
Received: from eggs.gnu.org ([140.186.70.92]:58335)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RqmJP-0005G0-Ls
	for commit-inetutils@gnu.org; Fri, 27 Jan 2012 08:58:01 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RqmJI-0008O1-7d
	for commit-inetutils@gnu.org; Fri, 27 Jan 2012 08:57:55 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:58699)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RqmJI-0008Ns-5B
	for commit-inetutils@gnu.org; Fri, 27 Jan 2012 08:57:48 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RqmJI-0004jo-FN
	for commit-inetutils@gnu.org; Fri, 27 Jan 2012 13:57:48 +0000
Date: Fri, 27 Jan 2012 13:57:48 +0000
Message-Id: <E1RqmJI-0004jo-FN@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-13-g408acfb
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 9b93c80dea90d3e361d4004a773965f7ff553e8f
X-Git-Newrev: 408acfb3c91204651d2c69be0443bbf4c6ce8be8
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, 27 Jan 2012 13:58:01 -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  408acfb3c91204651d2c69be0443bbf4c6ce8be8 (commit)
      from  9b93c80dea90d3e361d4004a773965f7ff553e8f (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=408acfb3c91204651d2c69be0443bbf4c6ce8be8


commit 408acfb3c91204651d2c69be0443bbf4c6ce8be8
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Jan 27 14:41:59 2012 +0100

    Seek free port while testing.

diff --git a/ChangeLog b/ChangeLog
index 8ca972f..13f58a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-27  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* tests/ftp-localhost.sh, tests/tftp.sh (PORT): Detect if it
+	is preset, or detect an unused value from a short list.
+
 2012-01-26  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* tests/syslogd.sh (SOCKET): Disable the use of this
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index 431ecaa..1c7ef07 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -94,8 +94,40 @@ posttesting () {
 
 trap posttesting 0 1 2 3 15
 
-echo "4711 stream tcp4 nowait root $PWD/$FTPD ftpd -A -l" > $TMPDIR/inetd.conf
-echo "4711 stream tcp6 nowait root $PWD/$FTPD ftpd -A -l" >> $TMPDIR/inetd.conf
+# locate_port  port
+#
+# Test for IPv4 as well as for IPv6.
+locate_port () {
+    if [ "`uname -s`" = "SunOS" ]; then
+	netstat -na -finet -finet6 -Ptcp |
+	grep "\.$1[^0-9]" >/dev/null 2>&1
+    else
+	netstat -na |
+	grep "^$2\(4\|6\|46\)\{0,1\}.*[^0-9]$1[^0-9]" >/dev/null 2>&1
+    fi
+}
+
+# Find an available port number.  There will be some
+# room left for a race condition, but we try to be
+# flexible enough for running copies of this script.
+#
+if test -z "$PORT"; then
+    for PORT in 4711 4713 4717 4725 4741 4773 none; do
+	test $PORT = none && break
+	if locate_port $PORT; then
+	    continue
+	else
+	    break
+	fi
+    done
+    if test "$PORT" = 'none'; then
+	echo 'Our port allocation failed.  Skipping test.'
+	exit 77
+    fi
+fi
+
+echo "$PORT stream tcp4 nowait root $PWD/$FTPD ftpd -A -l" > $TMPDIR/inetd.conf
+echo "$PORT stream tcp6 nowait root $PWD/$FTPD ftpd -A -l" >> $TMPDIR/inetd.conf
 echo "machine $TARGET login ftp password foobar" > $TMPDIR/.netrc
 echo "machine $TARGET6 login ftp password foobar" >> $TMPDIR/.netrc
 echo "machine $TARGET46 login ftp password foobar" >> $TMPDIR/.netrc
@@ -113,7 +145,7 @@ cat <<STOP |
 rstatus
 dir
 STOP
-HOME=$TMPDIR $FTP $TARGET 4711 -4 -v -p -t >$TMPDIR/ftp.stdout
+HOME=$TMPDIR $FTP $TARGET $PORT -4 -v -p -t >$TMPDIR/ftp.stdout
 
 errno=$?
 [ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
@@ -147,7 +179,7 @@ cat <<STOP |
 rstatus
 dir
 STOP
-HOME=$TMPDIR $FTP $TARGET 4711 -4 -v -t >$TMPDIR/ftp.stdout
+HOME=$TMPDIR $FTP $TARGET $PORT -4 -v -t >$TMPDIR/ftp.stdout
 
 errno=$?
 [ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
@@ -182,7 +214,7 @@ rstatus
 epsv4
 dir
 STOP
-HOME=$TMPDIR $FTP $TARGET 4711 -4 -v -p -t >$TMPDIR/ftp.stdout
+HOME=$TMPDIR $FTP $TARGET $PORT -4 -v -p -t >$TMPDIR/ftp.stdout
 
 errno=$?
 [ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
@@ -217,7 +249,7 @@ rstatus
 epsv4
 dir
 STOP
-HOME=$TMPDIR $FTP $TARGET 4711 -4 -v -t >$TMPDIR/ftp.stdout
+HOME=$TMPDIR $FTP $TARGET $PORT -4 -v -t >$TMPDIR/ftp.stdout
 
 errno=$?
 [ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
@@ -251,7 +283,7 @@ cat <<STOP |
 rstatus
 dir
 STOP
-HOME=$TMPDIR $FTP $TARGET6 4711 -6 -v -p -t >$TMPDIR/ftp.stdout
+HOME=$TMPDIR $FTP $TARGET6 $PORT -6 -v -p -t >$TMPDIR/ftp.stdout
 
 errno=$?
 [ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
@@ -285,7 +317,7 @@ cat <<STOP |
 rstatus
 dir
 STOP
-HOME=$TMPDIR $FTP $TARGET6 4711 -6 -v -t >$TMPDIR/ftp.stdout
+HOME=$TMPDIR $FTP $TARGET6 $PORT -6 -v -t >$TMPDIR/ftp.stdout
 
 errno=$?
 [ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
@@ -369,7 +401,7 @@ if $have_address_mapping && test -n "$TARGET46" ; then
 	rstatus
 	dir
 	STOP
-    HOME=$TMPDIR $FTP $TARGET46 4711 -6 -v -p -t >$TMPDIR/ftp.stdout
+    HOME=$TMPDIR $FTP $TARGET46 $PORT -6 -v -p -t >$TMPDIR/ftp.stdout
 
     errno=$?
     [ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
@@ -403,7 +435,7 @@ if $have_address_mapping && test -n "$TARGET46" ; then
 	rstatus
 	dir
 	STOP
-    HOME=$TMPDIR $FTP $TARGET46 4711 -6 -v -t >$TMPDIR/ftp.stdout
+    HOME=$TMPDIR $FTP $TARGET46 $PORT -6 -v -t >$TMPDIR/ftp.stdout
 
     errno=$?
     [ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
diff --git a/tests/tftp.sh b/tests/tftp.sh
index e43dacc..24c43bf 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -47,7 +47,6 @@ fi
 
 AF=${AF:-inet}
 PROTO=${PROTO:-udp}
-PORT=${PORT:-7777}
 USER=`id -u -n`
 
 # Random base diractory at testing time.
@@ -92,7 +91,8 @@ fi
 #
 locate_port () {
     if [ "`uname -s`" = "SunOS" ]; then
-	netstat -na -f$1 -P$2 | grep "\.$3[^0-9]" >/dev/null 2>&1
+	netstat -na -f$1 -P$2 |
+	grep "\.$3[^0-9]" >/dev/null 2>&1
     else
 	netstat -na |
 	grep "^$2\(4\|6\|46\)\{0,1\}.*[^0-9]$3[^0-9]" >/dev/null 2>&1
@@ -105,11 +105,23 @@ if [ "$VERBOSE" ]; then
     "$INETD" --version
 fi
 
-# Check that the port is still available
-locate_port $AF $PROTO $PORT
-if test $? -eq 0; then
-    echo "Desired port $PORT/$PROTO is already in use."
-    exit 77
+# Find an available port number.  There will be some
+# room left for a race condition, but we try to be
+# flexible enough for running copies of this script.
+#
+if test -z "$PORT"; then
+    for PORT in 7777 7779 7783 7791 7807 7839 none; do
+	test $PORT = none && break
+	if locate_port $AF $PROTO $PORT; then
+	    continue
+	else
+	    break
+	fi
+    done
+    if test "$PORT" = 'none'; then
+	echo 'Our port allocation failed.  Skipping test.'
+	exit 77
+    fi
 fi
 
 # Create `inetd.conf'.  Note: We want $TFTPD to be an absolute file

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

Summary of changes:
 ChangeLog              |    5 ++++
 tests/ftp-localhost.sh |   52 ++++++++++++++++++++++++++++++++++++++---------
 tests/tftp.sh          |   26 +++++++++++++++++------
 3 files changed, 66 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Fri Jan 27 16:33:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RqtQM-0002uj-Ti
	for mharc-commit-inetutils@gnu.org; Fri, 27 Jan 2012 16:33:34 -0500
Received: from eggs.gnu.org ([140.186.70.92]:38754)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RqtQJ-0002u9-GE
	for commit-inetutils@gnu.org; Fri, 27 Jan 2012 16:33:32 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RqtQH-0008JW-IA
	for commit-inetutils@gnu.org; Fri, 27 Jan 2012 16:33:31 -0500
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 1RqtQH-0008JS-GV
	for commit-inetutils@gnu.org; Fri, 27 Jan 2012 16:33:29 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RqtQH-0006V8-Cg
	for commit-inetutils@gnu.org; Fri, 27 Jan 2012 21:33:29 +0000
Date: Fri, 27 Jan 2012 21:33:29 +0000
Message-Id: <E1RqtQH-0006V8-Cg@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-14-g17e2496
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 408acfb3c91204651d2c69be0443bbf4c6ce8be8
X-Git-Newrev: 17e24964ca9fded438753c378e746bf1fb407924
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, 27 Jan 2012 21:33:33 -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  17e24964ca9fded438753c378e746bf1fb407924 (commit)
      from  408acfb3c91204651d2c69be0443bbf4c6ce8be8 (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=17e24964ca9fded438753c378e746bf1fb407924


commit 17e24964ca9fded438753c378e746bf1fb407924
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Jan 27 22:32:19 2012 +0100

    libtelnet: Wrong declaration, missing prototypes.

diff --git a/ChangeLog b/ChangeLog
index 13f58a8..b854c55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
 2012-01-27  Mats Erik Andersson <gnu@gisladisker.se>
 
+	* libtelnet/auth.c, libtelnet/enc_des.c, libtelnet/encrypt.c,
+	libtelnet/kerberos.c, libtelnet/kerberos5.c, libtelnet/shishi.c:
+	Add external prototype `void printsub (char, unsigned char *, int)',
+	appearing as callback.
+	* libtelnet/auth-proto.h (auth_gen_printsub): Remove prototype.
+	(auth_printsub): Missing prototype.
+	* libtelnet/auth.c (auth_gen_printsub): Declare as static, and
+	position before code for `auth_printsub'.
+	* libtelnet/enc-proto.h (encrypt_printsub): Missing prototype.
+	[ENCRYPTION && TELNETD]: Rename macro TELENTD as TELNETD,
+	both are otherwise not in use.
+	* libtelnet/encrypt.c (encrypt_gen_printsub): Reorder parameters
+	in declaration to read `(unsigned char *, int, unsigned char *, int)'.
+	(encrypt_printsub): Likewise.
+	* telnet/utilities.c [AUTHENTICATION]: Include <libtelnet/auth.h>.
+	[ENCRYPTION]: Include <libtelnet/encrypt.h>.
+	* telnetd/telnetd.h: Include <libtelnet/encrypt.h>.
+
+2012-01-27  Mats Erik Andersson <gnu@gisladisker.se>
+
 	* tests/ftp-localhost.sh, tests/tftp.sh (PORT): Detect if it
 	is preset, or detect an unused value from a short list.
 
diff --git a/libtelnet/auth-proto.h b/libtelnet/auth-proto.h
index 1735954..f155d36 100644
--- a/libtelnet/auth-proto.h
+++ b/libtelnet/auth-proto.h
@@ -80,7 +80,7 @@ void auth_reply (unsigned char *, int);
 void auth_finished (TN_Authenticator *, int);
 int auth_wait (char *);
 void auth_disable_name (char *);
-void auth_gen_printsub (unsigned char *, int, unsigned char *, int);
+void auth_printsub (unsigned char *, int, unsigned char *, int);
 int auth_sendname (unsigned char *, int);
 
 # ifdef	KRB4
diff --git a/libtelnet/auth.c b/libtelnet/auth.c
index eaa11f0..0ffd804 100644
--- a/libtelnet/auth.c
+++ b/libtelnet/auth.c
@@ -93,6 +93,9 @@
 
 # define typemask(x)		(1<<((x)-1))
 
+/* Callback from consumer.  */
+extern void printsub (char, unsigned char *, int);
+
 # ifdef	KRB4_ENCPWD
 extern krb4encpwd_init ();
 extern krb4encpwd_send ();
@@ -694,18 +697,7 @@ auth_debug (int mode)
   auth_debug_mode = mode;
 }
 
-void
-auth_printsub (unsigned char *data, int cnt, unsigned char *buf, int buflen)
-{
-  TN_Authenticator *ap;
-
-  if ((ap = findauthenticator (data[1], data[2])) && ap->printsub)
-    (*ap->printsub) (data, cnt, buf, buflen);
-  else
-    auth_gen_printsub (data, cnt, buf, buflen);
-}
-
-void
+static void
 auth_gen_printsub (unsigned char *data, int cnt, unsigned char *buf,
 		   int buflen)
 {
@@ -727,4 +719,15 @@ auth_gen_printsub (unsigned char *data, int cnt, unsigned char *buf,
     }
   *buf = '\0';
 }
+
+void
+auth_printsub (unsigned char *data, int cnt, unsigned char *buf, int buflen)
+{
+  TN_Authenticator *ap;
+
+  if ((ap = findauthenticator (data[1], data[2])) && ap->printsub)
+    (*ap->printsub) (data, cnt, buf, buflen);
+  else
+    auth_gen_printsub (data, cnt, buf, buflen);
+}
 #endif
diff --git a/libtelnet/enc-proto.h b/libtelnet/enc-proto.h
index e78f7ec..d0c5f1b 100644
--- a/libtelnet/enc-proto.h
+++ b/libtelnet/enc-proto.h
@@ -86,9 +86,10 @@ void encrypt_send_end (void);
 void encrypt_wait (void);
 void encrypt_send_support (void);
 void encrypt_send_keyid (int, unsigned char *, int, int);
+void encrypt_printsub (unsigned char *, int, unsigned char *, int);
 int net_write (unsigned char *, int);
 
-# ifdef	TELENTD
+# ifdef	TELNETD
 void encrypt_wait (void);
 # else
 int encrypt_cmd (int, char **);
diff --git a/libtelnet/enc_des.c b/libtelnet/enc_des.c
index c4b5ef2..1a5dea8 100644
--- a/libtelnet/enc_des.c
+++ b/libtelnet/enc_des.c
@@ -132,6 +132,9 @@ struct keyidlist
 #   define FB64_IV_BAD	3
 
 
+/* Callback from consumer.  */
+extern void printsub (char, unsigned char *, int);
+
 void fb64_stream_iv (Block, struct stinfo *);
 void fb64_init (struct fb *);
 static int fb64_start (struct fb *, int, int);
diff --git a/libtelnet/encrypt.c b/libtelnet/encrypt.c
index 8b349a6..68b06f6 100644
--- a/libtelnet/encrypt.c
+++ b/libtelnet/encrypt.c
@@ -83,6 +83,9 @@
 # include <stdio.h>
 # include "genget.h"
 
+/* Callback from consumer.  */
+extern void printsub (char, unsigned char *, int);
+
 /*
  * These functions pointers point to the current routines
  * for encrypting and decrypting data.
@@ -967,9 +970,9 @@ encrypt_debug (int mode)
   encrypt_debug_mode = mode;
 }
 
-void
-encrypt_gen_printsub (unsigned char *data, unsigned char *buf,
-		      int cnt, int buflen)
+static void
+encrypt_gen_printsub (unsigned char *data, int cnt,
+		      unsigned char *buf, int buflen)
 {
   char tbuf[16], *cp;
 
@@ -990,8 +993,8 @@ encrypt_gen_printsub (unsigned char *data, unsigned char *buf,
 }
 
 void
-encrypt_printsub (unsigned char *data, unsigned char *buf,
-		  int cnt, int buflen)
+encrypt_printsub (unsigned char *data, int cnt,
+		  unsigned char *buf, int buflen)
 {
   Encryptions *ep;
   int type = data[1];
diff --git a/libtelnet/kerberos.c b/libtelnet/kerberos.c
index 7d79fd9..2158c1d 100644
--- a/libtelnet/kerberos.c
+++ b/libtelnet/kerberos.c
@@ -92,6 +92,9 @@ int kuserok (AUTH_DAT *, char *);
 
 extern auth_debug_mode;
 
+/* Callback from consumer.  */
+extern void printsub (char, unsigned char *, int);
+
 static unsigned char str_data[1024] = { IAC, SB, TELOPT_AUTHENTICATION, 0,
   AUTHTYPE_KERBEROS_V4,
 };
diff --git a/libtelnet/kerberos5.c b/libtelnet/kerberos5.c
index 4b4e36f..5e4165b 100644
--- a/libtelnet/kerberos5.c
+++ b/libtelnet/kerberos5.c
@@ -76,6 +76,9 @@ char *telnet_krb5_realm = NULL;
 
 # define DEBUG(c) if (auth_debug_mode) printf c
 
+/* Callback from consumer.  */
+extern void printsub (char, unsigned char *, int);
+
 static int
 Data (TN_Authenticator * ap, int type, krb5_pointer d, int c)
 {
diff --git a/libtelnet/shishi.c b/libtelnet/shishi.c
index a6bc478..4bf70c1 100644
--- a/libtelnet/shishi.c
+++ b/libtelnet/shishi.c
@@ -56,6 +56,9 @@ Shishi_ap *auth_handle;
 
 # define DEBUG(c) if (auth_debug_mode) printf c
 
+/* Callback from consumer.  */
+extern void printsub (char, unsigned char *, int);
+
 static int
 Data (TN_Authenticator * ap, int type, unsigned char *d, int c)
 {
diff --git a/telnet/utilities.c b/telnet/utilities.c
index 12a6b08..4da265a 100644
--- a/telnet/utilities.c
+++ b/telnet/utilities.c
@@ -66,6 +66,13 @@
 #include "defines.h"
 #include "externs.h"
 
+#ifdef AUTHENTICATION
+# include <libtelnet/auth.h>
+#endif
+#ifdef ENCRYPTION
+# include <libtelnet/encrypt.h>
+#endif
+
 FILE *NetTrace = 0;		/* Not in bss, since needs to stay */
 int prettydump;
 
diff --git a/telnetd/telnetd.h b/telnetd/telnetd.h
index 8a275ec..b0baa0a 100644
--- a/telnetd/telnetd.h
+++ b/telnetd/telnetd.h
@@ -50,7 +50,9 @@
 #include <sys/ioctl.h>
 
 #include <arpa/telnet.h>
+
 #include <libtelnet/auth.h>
+#include <libtelnet/encrypt.h>
 
 #include <termios.h>
 

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

Summary of changes:
 ChangeLog              |   20 ++++++++++++++++++++
 libtelnet/auth-proto.h |    2 +-
 libtelnet/auth.c       |   27 +++++++++++++++------------
 libtelnet/enc-proto.h  |    3 ++-
 libtelnet/enc_des.c    |    3 +++
 libtelnet/encrypt.c    |   13 ++++++++-----
 libtelnet/kerberos.c   |    3 +++
 libtelnet/kerberos5.c  |    3 +++
 libtelnet/shishi.c     |    3 +++
 telnet/utilities.c     |    7 +++++++
 telnetd/telnetd.h      |    2 ++
 11 files changed, 67 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Mon Jan 30 12:49:15 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RrvLv-0004O5-GZ
	for mharc-commit-inetutils@gnu.org; Mon, 30 Jan 2012 12:49:15 -0500
Received: from eggs.gnu.org ([140.186.70.92]:40671)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1RrvLt-0004Nn-NL
	for commit-inetutils@gnu.org; Mon, 30 Jan 2012 12:49:14 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ams@gnu.org>) id 1RrvLo-0006Rf-7i
	for commit-inetutils@gnu.org; Mon, 30 Jan 2012 12:49:13 -0500
Received: from fencepost.gnu.org ([140.186.70.10]:40999)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1RrvLo-0006Ra-33
	for commit-inetutils@gnu.org; Mon, 30 Jan 2012 12:49:08 -0500
Received: from ams by fencepost.gnu.org with local (Exim 4.71)
	(envelope-from <ams@gnu.org>)
	id 1RrvLn-0008TI-DV; Mon, 30 Jan 2012 12:49:07 -0500
Date: Mon, 30 Jan 2012 12:49:07 -0500
Message-Id: <E1RrvLn-0008TI-DV@fencepost.gnu.org>
From: ams@gnu.org (Alfred M. Szmidt)
To: Mats Erik Andersson <gnu@gisladisker.se>
In-reply-to: <E1RqmJI-0004jo-FN@vcs.savannah.gnu.org> (message from Mats Erik
	Andersson on Fri, 27 Jan 2012 13:57:48 +0000)
Subject: Re: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-13-g408acfb
References: <E1RqmJI-0004jo-FN@vcs.savannah.gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.10
Cc: commit-inetutils@gnu.org
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: ams@gnu.org
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Jan 2012 17:49:14 -0000

   +# locate_port  port
   +#
   +# Test for IPv4 as well as for IPv6.
   +locate_port () {

New function, not mentioned in CL.


From MAILER-DAEMON Mon Jan 30 16:56:18 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RrzD0-00034Q-Or
	for mharc-commit-inetutils@gnu.org; Mon, 30 Jan 2012 16:56:18 -0500
Received: from eggs.gnu.org ([140.186.70.92]:56707)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1RrzCy-000346-KM
	for commit-inetutils@gnu.org; Mon, 30 Jan 2012 16:56:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ams@gnu.org>) id 1RrzCx-0001cx-If
	for commit-inetutils@gnu.org; Mon, 30 Jan 2012 16:56:16 -0500
Received: from fencepost.gnu.org ([140.186.70.10]:45385)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1RrzCx-0001ci-EV
	for commit-inetutils@gnu.org; Mon, 30 Jan 2012 16:56:15 -0500
Received: from ams by fencepost.gnu.org with local (Exim 4.71)
	(envelope-from <ams@gnu.org>)
	id 1RrzCw-0007IJ-O1; Mon, 30 Jan 2012 16:56:14 -0500
Date: Mon, 30 Jan 2012 16:56:14 -0500
Message-Id: <E1RrzCw-0007IJ-O1@fencepost.gnu.org>
From: ams@gnu.org (Alfred M. Szmidt)
To: Mats Erik Andersson <mats.andersson@gisladisker.se>
In-reply-to: <20120130214534.GA15302@mea.homelinux.org> (message from Mats
	Erik Andersson on Mon, 30 Jan 2012 22:45:34 +0100)
Subject: Re: [SCM] GNU Inetutils  branch, master, updated.
	inetutils-1_9_1-13-g408acfb
References: <E1RqmJI-0004jo-FN@vcs.savannah.gnu.org>
	<E1RrvLn-0008TI-DV@fencepost.gnu.org>
	<20120130214534.GA15302@mea.homelinux.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.10
Cc: commit-inetutils@gnu.org
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: ams@gnu.org
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Jan 2012 21:56:17 -0000

Anyone who is not on the CC list, do you guys get these emails?

   >    +# locate_port  port
   >    +#
   >    +# Test for IPv4 as well as for IPv6.
   >    +locate_port () {
   > 
   > New function, not mentioned in CL.

   Right you are. I do not feel confident in rewriting history,
   so I will mention that function in the push to be sent in a few
   hours time. Acceptable?

Not sure what you mean with `rewriting' history; you can't do (long
story is that you can, but it requires raw access to savannah and what
not).  

If `mentioning that function' you mean updating the ChangeLog
accordingly, and doing a normal commit then that is exactly what you
should do.


From MAILER-DAEMON Mon Jan 30 19:25:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rs1XX-0002P9-4L
	for mharc-commit-inetutils@gnu.org; Mon, 30 Jan 2012 19:25:39 -0500
Received: from eggs.gnu.org ([140.186.70.92]:56471)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rs1XT-0002Ox-5d
	for commit-inetutils@gnu.org; Mon, 30 Jan 2012 19:25:37 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rs1XQ-00016g-Kv
	for commit-inetutils@gnu.org; Mon, 30 Jan 2012 19:25:35 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:53371)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1Rs1XQ-00016c-GO
	for commit-inetutils@gnu.org; Mon, 30 Jan 2012 19:25:32 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1Rs1XQ-0008P0-I9
	for commit-inetutils@gnu.org; Tue, 31 Jan 2012 00:25:32 +0000
Date: Tue, 31 Jan 2012 00:25:32 +0000
Message-Id: <E1Rs1XQ-0008P0-I9@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-15-gf5bef4d
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 17e24964ca9fded438753c378e746bf1fb407924
X-Git-Newrev: f5bef4df8f689ddebf9eae756117812e7809115c
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, 31 Jan 2012 00:25: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  f5bef4df8f689ddebf9eae756117812e7809115c (commit)
      from  17e24964ca9fded438753c378e746bf1fb407924 (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=f5bef4df8f689ddebf9eae756117812e7809115c


commit f5bef4df8f689ddebf9eae756117812e7809115c
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Tue Jan 31 00:33:42 2012 +0100

    Robustness of tests and TFTP client.
    
    Test coverage for IPv6, better shell portability,
    and TFTP client robustness for single stacked hosts.

diff --git a/ChangeLog b/ChangeLog
index b854c55..2b80687 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2012-01-31  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* src/tftp.c (resolve_name): Do not use AI_ADDRCONFIG at all.
+	Assign HOSTNAME with `ai->ai_canonname' only if it has contents,
+	otherwise assign `<dummy>', which is very unlikely.
+	* tests/ftp-localhost.sh: Make SVR4-compliant.  Refactor code.
+	Error messages go to STDERR.  Use HERE-docs for configuration.
+	(PWD): If not exported, assign with command substitution `pwd`.
+	(USER, FTPUSER, save_IFS): New variables.
+	(FTPHOME): New variable, for portably calculating home of FTPUSER.
+	Make certain of existence and readability of this directory.
+	(test_report): New function for common evaluation tasks.
+	* tests/syslogd.sh (PWD): If not exported, assign with command
+	substitution `pwd`.
+	* tests/tftp.sh: Expand to cover IPv6.  Error messages to STDERR.
+	Make `inetd' and `tftp' verbose only with VERBOSE set.
+	(PWD): If not exported, assign with command substitution `pwd`.
+	(locate_port): New prototype, dropping address family argument,
+	always detecting IPv4 and IPv6.
+
 2012-01-27  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* libtelnet/auth.c, libtelnet/enc_des.c, libtelnet/encrypt.c,
@@ -22,6 +42,7 @@
 
 	* tests/ftp-localhost.sh, tests/tftp.sh (PORT): Detect if it
 	is preset, or detect an unused value from a short list.
+	* tests/ftp-localhost.sh (locate_port): New function.
 
 2012-01-26  Mats Erik Andersson <gnu@gisladisker.se>
 
diff --git a/src/tftp.c b/src/tftp.c
index 4332a16..d191b03 100644
--- a/src/tftp.c
+++ b/src/tftp.c
@@ -303,9 +303,6 @@ resolve_name (char *name)
   hints.ai_family = AF_UNSPEC;
   hints.ai_socktype = SOCK_DGRAM;
   hints.ai_flags = AI_CANONNAME;
-#ifdef AI_ADDRCONFIG
-  hints.ai_flags += AI_ADDRCONFIG;
-#endif
 
   err = getaddrinfo (name, "tftp", &hints, &aiptr);
   if (err)
@@ -343,7 +340,10 @@ resolve_name (char *name)
       memcpy (&peeraddr, ai->ai_addr, ai->ai_addrlen);
       connected = 1;
       free (hostname);
-      hostname = xstrdup (ai->ai_canonname);
+      if (ai->ai_canonname)
+	hostname = xstrdup (ai->ai_canonname);
+      else
+	hostname = xstrdup ("<dummy>");
       break;
     }
 
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index 1c7ef07..194a411 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -19,8 +19,12 @@
 
 # Written by Simon Josefsson
 
-# FIXME: Separate tests of IPv4 and IPv6 using `inetd', no testing
-# of standalone daemon yet.
+# FIXME: Better test coverage!
+#
+# Implemented: anonymous-only in inetd-mode.
+#
+# Wanted:  * standalone-mode
+#          * underprivileged mode.
 
 # Address mapping IPv4-to-IPv6 is not uniform an all platforms,
 # thus separately using `tcp4' and `tcp6' for streams in `inetd.conf'.
@@ -36,6 +40,14 @@ TARGET=${TARGET:-127.0.0.1}
 TARGET6=${TARGET6:-::1}
 TARGET46=${TARGET46:-::ffff:127.0.0.1}
 
+# Portability fix for SVR4
+PWD="${PWD:-`pwd`}"
+
+# Acting user and target user
+#
+USER="`id -u -n`"
+FTPUSER=${FTPUSER:-ftp}
+
 if [ ! -x $FTP ]; then
     echo "No FTP client '$FTP' present.  Skipping test" >&2
     exit 77
@@ -54,30 +66,35 @@ if [ $VERBOSE ]; then
     $INETD --version | head -1
 fi
 
-# This script is using '! command' in many tests,
-# which is not available in old shells.  We fail
-# for those old shell releases.
-if eval '! false' 2>/dev/null; then
-    :	# This is expected
-else
-    echo 'Presently using the SVR4 Bourne shell.'
-    echo 'This test needs a recent shell with'
-    echo 'keyword ! and tilde expansion.'
+if [ `id -u` != 0 ]; then
+    echo "ftpd needs to run as root" >&2
     exit 77
 fi
 
-if [ `id -u` != 0 ]; then
-    echo "ftpd needs to run as root"
+if id -u "$FTPUSER" > /dev/null; then
+    :
+else
+    echo "anonymous ftpd needs a '$FTPUSER' user" >&2
     exit 77
 fi
 
-if ! id -u ftp > /dev/null; then
-    echo "anonymous ftpd needs a 'ftp' user"
-    exit 77
+FTPHOME="`eval echo ~"$FTPUSER"`"
+if test ! -d "$FTPHOME"; then
+    save_IFS="$IFS"
+    IFS=:
+    set -- `grep "^$FTPUSER:" /etc/passwd`	# Existence is known above.
+    IFS="$save_IFS"
+    if test ! -d "$6"; then
+	echo "The user '$FTPUSER' must have a home directory." >&2
+	exit 77
+    fi
+    FTPHOME="$6"
 fi
 
-if [ ! -d ~ftp ]; then
-    echo "the user 'ftp' must have a home directory"
+if test -d "$FTPHOME" && test -r "$FTPHOME" && test -x "$FTPHOME"; then
+    :	# We have full access to anonymous' home directory.
+else
+    echo "Insufficient access for $FTPUSER's home directory." >&2
     exit 77
 fi
 
@@ -121,23 +138,64 @@ if test -z "$PORT"; then
 	fi
     done
     if test "$PORT" = 'none'; then
-	echo 'Our port allocation failed.  Skipping test.'
+	echo 'Our port allocation failed.  Skipping test.' >&2
 	exit 77
     fi
 fi
 
-echo "$PORT stream tcp4 nowait root $PWD/$FTPD ftpd -A -l" > $TMPDIR/inetd.conf
-echo "$PORT stream tcp6 nowait root $PWD/$FTPD ftpd -A -l" >> $TMPDIR/inetd.conf
-echo "machine $TARGET login ftp password foobar" > $TMPDIR/.netrc
-echo "machine $TARGET6 login ftp password foobar" >> $TMPDIR/.netrc
-echo "machine $TARGET46 login ftp password foobar" >> $TMPDIR/.netrc
+cat <<EOT > "$TMPDIR/inetd.conf"
+$PORT stream tcp4 nowait $USER $PWD/$FTPD ftpd -A -l
+$PORT stream tcp6 nowait $USER $PWD/$FTPD ftpd -A -l
+EOT
+
+cat <<EOT > "$TMPDIR/.netrc"
+machine $TARGET login $FTPUSER password foobar
+machine $TARGET6 login $FTPUSER password foobar
+machine $TARGET46 login $FTPUSER password foobar
+EOT
+
 chmod 600 $TMPDIR/.netrc
 
-$INETD --pidfile=$TMPDIR/inetd.pid $TMPDIR/inetd.conf
+$INETD --pidfile="$TMPDIR/inetd.pid" "$TMPDIR/inetd.conf"
 
 # Wait for inetd to write pid and open socket
 sleep 2
 
+# Test evaluation helper
+#
+# test_report  errno output_file hint_msg
+#
+test_report () {
+    test -z "${VERBOSE+yes}" || cat "$2"
+
+    if [ $1 != 0 ]; then
+	echo "Running '$FTP' failed with errno $1." >&2
+	exit 77
+    fi
+
+    # Did we get access?
+    if grep 'Login failed' "$2" >/dev/null 2>&1; then
+	echo "Failed login for access using '$3' FTP client." >&2
+	exit 1
+    fi
+
+    # Standing control connection?
+    if grep 'FTP server status' "$2" >/dev/null 2>&1; then
+	:
+    else
+	echo "Cannot find server status for '$3' FTP client?" >&2
+	exit 1
+    fi
+
+    # Was data transfer successful?
+    if grep '226 Transfer complete.' "$2" >/dev/null 2>&1; then
+	:
+    else
+	echo "Cannot find transfer result for '$3' FTP client?" >&2
+	exit 1
+    fi
+}
+
 # Test a passive connection: PASV and IPv4.
 #
 echo "PASV to $TARGET (IPv4) using inetd."
@@ -145,32 +203,9 @@ cat <<STOP |
 rstatus
 dir
 STOP
-HOME=$TMPDIR $FTP $TARGET $PORT -4 -v -p -t >$TMPDIR/ftp.stdout
-
-errno=$?
-[ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
-
-if [ $errno != 0 ]; then
-    echo running ftp failed? errno $errno
-    exit 77
-fi
-
-if [ $errno != 0 ]; then
-    echo running ftp failed? errno $errno
-    exit 77
-fi
-
-# Standing control connection?
-if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
-    echo cannot find expected output for passive ftp client?
-    exit 1
-fi
+HOME=$TMPDIR $FTP "$TARGET" $PORT -4 -v -p -t >$TMPDIR/ftp.stdout 2>&1
 
-# Was data transfer successful?
-if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
-    echo cannot find transfer result for passive ftp client?
-    exit 1
-fi
+test_report $? "$TMPDIR/ftp.stdout" "PASV/$TARGET"
 
 # Test an active connection: PORT and IPv4.
 #
@@ -179,32 +214,9 @@ cat <<STOP |
 rstatus
 dir
 STOP
-HOME=$TMPDIR $FTP $TARGET $PORT -4 -v -t >$TMPDIR/ftp.stdout
-
-errno=$?
-[ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
+HOME=$TMPDIR $FTP "$TARGET" $PORT -4 -v -t >$TMPDIR/ftp.stdout 2>&1
 
-if [ $errno != 0 ]; then
-    echo running ftp failed? errno $errno
-    exit 77
-fi
-
-if [ $errno != 0 ]; then
-    echo running ftp failed? errno $errno
-    exit 77
-fi
-
-# Standing control connection?
-if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
-    echo cannot find expected output for active ftp client?
-    exit 1
-fi
-
-# Was data transfer successful?
-if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
-    echo cannot find transfer result for active ftp client?
-    exit 1
-fi
+test_report $? "$TMPDIR/ftp.stdout" "PORT/$TARGET"
 
 # Test a passive connection: EPSV and IPv4.
 #
@@ -214,32 +226,9 @@ rstatus
 epsv4
 dir
 STOP
-HOME=$TMPDIR $FTP $TARGET $PORT -4 -v -p -t >$TMPDIR/ftp.stdout
-
-errno=$?
-[ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
-
-if [ $errno != 0 ]; then
-    echo running ftp failed? errno $errno
-    exit 77
-fi
-
-if [ $errno != 0 ]; then
-    echo running ftp failed? errno $errno
-    exit 77
-fi
-
-# Standing control connection?
-if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
-    echo cannot find expected output for passive ftp client?
-    exit 1
-fi
+HOME=$TMPDIR $FTP "$TARGET" $PORT -4 -v -p -t >$TMPDIR/ftp.stdout 2>&1
 
-# Was data transfer successful?
-if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
-    echo cannot find transfer result for passive ftp client?
-    exit 1
-fi
+test_report $? "$TMPDIR/ftp.stdout" "EPSV/$TARGET"
 
 # Test an active connection: EPRT and IPv4.
 #
@@ -249,32 +238,9 @@ rstatus
 epsv4
 dir
 STOP
-HOME=$TMPDIR $FTP $TARGET $PORT -4 -v -t >$TMPDIR/ftp.stdout
-
-errno=$?
-[ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
-
-if [ $errno != 0 ]; then
-    echo running ftp failed? errno $errno
-    exit 77
-fi
-
-if [ $errno != 0 ]; then
-    echo running ftp failed? errno $errno
-    exit 77
-fi
-
-# Standing control connection?
-if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
-    echo cannot find expected output for active ftp client?
-    exit 1
-fi
+HOME=$TMPDIR $FTP "$TARGET" $PORT -4 -v -t >$TMPDIR/ftp.stdout 2>&1
 
-# Was data transfer successful?
-if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
-    echo cannot find transfer result for active ftp client?
-    exit 1
-fi
+test_report $? "$TMPDIR/ftp.stdout" "EPRT/$TARGET"
 
 # Test a passive connection: EPSV and IPv6.
 #
@@ -283,32 +249,9 @@ cat <<STOP |
 rstatus
 dir
 STOP
-HOME=$TMPDIR $FTP $TARGET6 $PORT -6 -v -p -t >$TMPDIR/ftp.stdout
-
-errno=$?
-[ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
-
-if [ $errno != 0 ]; then
-    echo running ftp failed? errno $errno
-    exit 77
-fi
+HOME=$TMPDIR $FTP "$TARGET6" $PORT -6 -v -p -t >$TMPDIR/ftp.stdout 2>&1
 
-if [ $errno != 0 ]; then
-    echo running ftp failed? errno $errno
-    exit 77
-fi
-
-# Standing control connection?
-if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
-    echo cannot find expected output for passive ftp client?
-    exit 1
-fi
-
-# Was data transfer successful?
-if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
-    echo cannot find transfer result for passive ftp client?
-    exit 1
-fi
+test_report $? "$TMPDIR/ftp.stdout" "EPSV/$TARGET6"
 
 # Test an active connection: EPRT and IPv6.
 #
@@ -317,32 +260,9 @@ cat <<STOP |
 rstatus
 dir
 STOP
-HOME=$TMPDIR $FTP $TARGET6 $PORT -6 -v -t >$TMPDIR/ftp.stdout
-
-errno=$?
-[ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
-
-if [ $errno != 0 ]; then
-    echo running ftp failed? errno $errno
-    exit 77
-fi
-
-if [ $errno != 0 ]; then
-    echo running ftp failed? errno $errno
-    exit 77
-fi
-
-# Standing control connection?
-if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
-    echo cannot find expected output for active ftp client?
-    exit 1
-fi
+HOME=$TMPDIR $FTP "$TARGET6" $PORT -6 -v -t >$TMPDIR/ftp.stdout 2>&1
 
-# Was data transfer successful?
-if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
-    echo cannot find transfer result for active ftp client?
-    exit 1
-fi
+test_report $? "$TMPDIR/ftp.stdout" "EPRT/$TARGET6"
 
 # Availability of IPv4-mapped IPv6 addresses.
 #
@@ -358,16 +278,20 @@ have_address_mapping=false
 # OpenSolaris is known to allow address mapping
 test `uname -s` = 'SunOS' && have_address_mapping=true
 
-if ! $have_address_mapping; then
+if $have_address_mapping; then
+    :
+else
     # Do we have sysctl(1) available?
-    if ! which sysctl >/dev/null 2>&1; then
-	echo "Warning: Not testing IPv4-mapped addresses."
-    else
+    if which sysctl >/dev/null 2>&1; then
 	have_sysctl=true
+    else
+	echo "Warning: Not testing IPv4-mapped addresses." >&2
     fi
 fi
 
-if ! $have_address_mapping && $have_sysctl; then
+if $have_address_mapping; then
+    :
+elif $have_sysctl; then
     # Extract the present setting of
     #
     #    net.ipv6.bindv6only (Linux)
@@ -381,7 +305,7 @@ if ! $have_address_mapping && $have_sysctl; then
 	    # This is the good value.  Keep it.
 	    have_address_mapping=true
 	else
-	    echo "Warning: Address mapping IPv4-to-Ipv6 is disabled."
+	    echo "Warning: Address mapping IPv4-to-Ipv6 is disabled." >&2
 	    # Set a non-zero value for later testing.
 	    value_v6only=2
 	fi
@@ -401,32 +325,9 @@ if $have_address_mapping && test -n "$TARGET46" ; then
 	rstatus
 	dir
 	STOP
-    HOME=$TMPDIR $FTP $TARGET46 $PORT -6 -v -p -t >$TMPDIR/ftp.stdout
-
-    errno=$?
-    [ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
-
-    if [ $errno != 0 ]; then
-	echo running ftp failed? errno $errno
-	exit 77
-    fi
-
-    if [ $errno != 0 ]; then
-	echo running ftp failed? errno $errno
-	exit 77
-    fi
+    HOME=$TMPDIR $FTP "$TARGET46" $PORT -6 -v -p -t >$TMPDIR/ftp.stdout 2>&1
 
-    # Standing control connection?
-    if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
-	echo cannot find expected output for passive ftp client?
-	exit 1
-    fi
-
-    # Was data transfer successful?
-    if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
-	echo cannot find transfer result for passive ftp client?
-	exit 1
-    fi
+    test_report $? "$TMPDIR/ftp.stdout" "EPSV/$TARGET46"
 
     # Test an active connection: EPRT and IPvIPv6.
     #
@@ -435,32 +336,9 @@ if $have_address_mapping && test -n "$TARGET46" ; then
 	rstatus
 	dir
 	STOP
-    HOME=$TMPDIR $FTP $TARGET46 $PORT -6 -v -t >$TMPDIR/ftp.stdout
-
-    errno=$?
-    [ -z "$VERBOSE" ] || cat $TMPDIR/ftp.stdout
-
-    if [ $errno != 0 ]; then
-	echo running ftp failed? errno $errno
-	exit 77
-    fi
-
-    if [ $errno != 0 ]; then
-	echo running ftp failed? errno $errno
-	exit 77
-    fi
+    HOME=$TMPDIR $FTP "$TARGET46" $PORT -6 -v -t >$TMPDIR/ftp.stdout 2>&1
 
-    # Standing control connection?
-    if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
-	echo cannot find expected output for active ftp client?
-	exit 1
-    fi
-
-    # Was data transfer successful?
-    if ! grep '226 Transfer complete.' $TMPDIR/ftp.stdout; then
-	echo cannot find transfer result for active ftp client?
-	exit 1
-    fi
+    test_report $? "$TMPDIR/ftp.stdout" "EPRT/$TARGET46"
 else
     # The IPv4-as-IPv6 tests were not performed.
     echo 'Skipping two tests of IPv4 mapped as IPv6.'
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index 6438654..ebd584d 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -45,6 +45,9 @@ HERE
     exit 0
 fi
 
+# Portability fix for SVR4
+PWD="${PWD:-`pwd`}"
+
 # Execution control.  Initialise early!
 #
 do_cleandir=false
diff --git a/tests/tftp.sh b/tests/tftp.sh
index 24c43bf..af6e8e1 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -19,12 +19,13 @@
 
 # Run `inetd' with `tftpd' and try to fetch a file from there using `tftp'.
 
-# FIXME: Presently tailored for IPv4.
-
 if [ "$VERBOSE" ]; then
     set -x
 fi
 
+# Portability fix for SVR4
+PWD="${PWD:-`pwd`}"
+
 TFTP="${TFTP:-../src/tftp$EXEEXT}"
 TFTPD="${TFTPD:-$PWD/../src/tftpd$EXEEXT}"
 INETD="${INETD:-../src/inetd$EXEEXT}"
@@ -65,13 +66,13 @@ posttesting () {
 
 trap posttesting EXIT HUP INT QUIT TERM
 
-# Use only "127.0.0.1" as default address list.
+# Use only "127.0.0.1 ::1" as default address list.
 # Other configured addresses might be set under
 # strict filter policies, thus might block.
 #
 # Allow a setting "ADDRESSES=sense" to compute the
 # available addresses and then to test them all.
-ADDRESSES="${ADDRESSES:-127.0.0.1}"
+ADDRESSES="${ADDRESSES:-127.0.0.1 ::1}"
 
 if [ "$ADDRESSES" = "sense" ]; then
     ADDRESSES="`$IFCONFIG | sed -e "/$AF /!d" \
@@ -81,28 +82,29 @@ fi
 # Check that netstat works before proceeding.
 netstat -na > /dev/null
 if [ ! $? -eq 0 ]; then
-    echo "netstat: command failed to execute successfully"
+    echo "netstat: command failed to execute successfully" >&2
     exit 77
 fi
 
 # Work around the peculiar output of netstat(1m,solaris).
 #
-# locate_port family proto port
+# locate_port proto port
 #
 locate_port () {
     if [ "`uname -s`" = "SunOS" ]; then
-	netstat -na -f$1 -P$2 |
-	grep "\.$3[^0-9]" >/dev/null 2>&1
+	netstat -na -finet -finet6 -P$1 |
+	grep "\.$2[^0-9]" >/dev/null 2>&1
     else
 	netstat -na |
-	grep "^$2\(4\|6\|46\)\{0,1\}.*[^0-9]$3[^0-9]" >/dev/null 2>&1
+	grep "^$1\(4\|6\|46\)\{0,1\}.*[^0-9]$2[^0-9]" >/dev/null 2>&1
     fi
 }
 
 if [ "$VERBOSE" ]; then
-    "$TFTP" --version
-    "$TFTPD" --version
-    "$INETD" --version
+    "$TFTP" --version | head -1
+    "$TFTPD" --version | head -1
+    "$INETD" --version | head -1
+    "$IFCONFIG_SIMPLE" --version | head -1
 fi
 
 # Find an available port number.  There will be some
@@ -112,27 +114,29 @@ fi
 if test -z "$PORT"; then
     for PORT in 7777 7779 7783 7791 7807 7839 none; do
 	test $PORT = none && break
-	if locate_port $AF $PROTO $PORT; then
+	if locate_port $PROTO $PORT; then
 	    continue
 	else
 	    break
 	fi
     done
     if test "$PORT" = 'none'; then
-	echo 'Our port allocation failed.  Skipping test.'
+	echo 'Our port allocation failed.  Skipping test.' >&2
 	exit 77
     fi
 fi
 
 # Create `inetd.conf'.  Note: We want $TFTPD to be an absolute file
 # name because `inetd' chdirs to `/' in daemon mode; ditto for
-# $INETD_CONF.
+# $INETD_CONF.  Thus the dependency on file locations will be
+# identical in daemon-mode and in debug-mode.
 cat > "$INETD_CONF" <<EOF
 $PORT dgram ${PROTO}4 wait $USER $TFTPD   tftpd -l $TMPDIR/tftp-test
+$PORT dgram ${PROTO}6 wait $USER $TFTPD   tftpd -l $TMPDIR/tftp-test
 EOF
 
 # Launch `inetd', assuming it's reachable at all $ADDRESSES.
-$INETD -d -p"$INETD_PID" "$INETD_CONF" &
+$INETD ${VERBOSE+-d} -p"$INETD_PID" "$INETD_CONF" &
 sleep 1
 inetd_pid="`cat $INETD_PID`"
 
@@ -142,7 +146,7 @@ test -z "$VERBOSE" || echo "Launched Inetd as process $inetd_pid." >&2
 sleep 1
 
 # Did `inetd' really succeed in establishing a listener?
-locate_port $AF $PROTO $PORT
+locate_port $PROTO $PORT
 if test $? -ne 0; then
     # No it did not.
     ps "$inetd_pid" >/dev/null 2>&1 && kill "$inetd_pid" 2>/dev/null
@@ -191,7 +195,7 @@ for addr in $ADDRESSES; do
     for name in $FILELIST; do
 	EFFORTS=`expr $EFFORTS + 1`
 	rm -f $name
-	echo "get $name" | "$TFTP" $addr $PORT
+	echo "get $name" | "$TFTP" ${VERBOSE+-v} "$addr" $PORT
 
 	cmp "$TMPDIR/tftp-test/$name" "$name" 2>/dev/null
 	result=$?

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

Summary of changes:
 ChangeLog              |   21 +++
 src/tftp.c             |    8 +-
 tests/ftp-localhost.sh |  340 +++++++++++++++--------------------------------
 tests/syslogd.sh       |    3 +
 tests/tftp.sh          |   40 +++---
 5 files changed, 159 insertions(+), 253 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Tue Jan 31 04:58:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RsAU9-00052I-H1
	for mharc-commit-inetutils@gnu.org; Tue, 31 Jan 2012 04:58:45 -0500
Received: from eggs.gnu.org ([140.186.70.92]:59388)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mats.andersson@gisladisker.se>) id 1Rrz30-0007pH-K1
	for commit-inetutils@gnu.org; Mon, 30 Jan 2012 16:45:59 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mats.andersson@gisladisker.se>) id 1Rrz2y-0007AH-3q
	for commit-inetutils@gnu.org; Mon, 30 Jan 2012 16:45:58 -0500
Received: from ch-smtp05.sth.basefarm.net ([80.76.153.6]:49385)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mats.andersson@gisladisker.se>)
	id 1Rrz2v-00079W-7B; Mon, 30 Jan 2012 16:45:53 -0500
Received: from c83-253-249-30.bredband.comhem.se ([83.253.249.30]:52842
	helo=aun)
	by ch-smtp05.sth.basefarm.net with esmtps (TLSv1:AES256-SHA:256)
	(Exim 4.76) (envelope-from <mats.andersson@gisladisker.se>)
	id 1Rrz2n-0007Gu-H0; Mon, 30 Jan 2012 22:45:46 +0100
Received: from meand by aun with local (Exim 4.69)
	(envelope-from <mats.andersson@gisladisker.se>)
	id 1Rrz2c-00041y-UB; Mon, 30 Jan 2012 22:45:35 +0100
Date: Mon, 30 Jan 2012 22:45:34 +0100
To: "Alfred M. Szmidt" <ams@gnu.org>
Message-ID: <20120130214534.GA15302@mea.homelinux.org>
References: <E1RqmJI-0004jo-FN@vcs.savannah.gnu.org>
	<E1RrvLn-0008TI-DV@fencepost.gnu.org>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <E1RrvLn-0008TI-DV@fencepost.gnu.org>
User-Agent: Mutt/1.5.18 (2008-05-17)
From: Mats Erik Andersson <mats.andersson@gisladisker.se>
X-SA-Exim-Connect-IP: <locally generated>
X-SA-Exim-Rcpt-To: ams@gnu.org, commit-inetutils@gnu.org
X-SA-Exim-Mail-From: mats.andersson@gisladisker.se
Subject: Re: [SCM] GNU Inetutils  branch, master, updated.
	inetutils-1_9_1-13-g408acfb
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:14:11 +0000)
X-SA-Exim-Scanned: Yes (on aun)
X-Originating-IP: 83.253.249.30
X-Scan-Result: No virus found in message 1Rrz2n-0007Gu-H0.
X-Scan-Signature: ch-smtp05.sth.basefarm.net 1Rrz2n-0007Gu-H0
	2af525d11ad84ddd8a4be10b34803eb7
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 80.76.153.6
X-Mailman-Approved-At: Tue, 31 Jan 2012 04:58:43 -0500
Cc: commit-inetutils@gnu.org
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Jan 2012 21:55:18 -0000

måndag den 30 januari 2012 klockan 12:49 skrev Alfred M. Szmidt detta:
>    +# locate_port  port
>    +#
>    +# Test for IPv4 as well as for IPv6.
>    +locate_port () {
> 
> New function, not mentioned in CL.

Right you are. I do not feel confident in rewriting history,
so I will mention that function in the push to be sent in a few
hours time. Acceptable?

Regards,
  Mats


From MAILER-DAEMON Tue Jan 31 06:58:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RsCMD-00010Q-I6
	for mharc-commit-inetutils@gnu.org; Tue, 31 Jan 2012 06:58:41 -0500
Received: from eggs.gnu.org ([140.186.70.92]:50234)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RsCM3-0000zQ-Uh
	for commit-inetutils@gnu.org; Tue, 31 Jan 2012 06:58:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RsCM1-0000RB-Jg
	for commit-inetutils@gnu.org; Tue, 31 Jan 2012 06:58:31 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:33827)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RsCM1-0000R7-Hz
	for commit-inetutils@gnu.org; Tue, 31 Jan 2012 06:58:29 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RsCLw-0005AP-Np
	for commit-inetutils@gnu.org; Tue, 31 Jan 2012 11:58:26 +0000
Date: Tue, 31 Jan 2012 11:58:26 +0000
Message-Id: <E1RsCLw-0005AP-Np@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-16-g4e82f22
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: f5bef4df8f689ddebf9eae756117812e7809115c
X-Git-Newrev: 4e82f22597c920531e070443ed32bd0e66b30024
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, 31 Jan 2012 11:58:38 -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  4e82f22597c920531e070443ed32bd0e66b30024 (commit)
      from  f5bef4df8f689ddebf9eae756117812e7809115c (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=4e82f22597c920531e070443ed32bd0e66b30024


commit 4e82f22597c920531e070443ed32bd0e66b30024
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Tue Jan 31 12:54:14 2012 +0100

    libtelnet: Portability of macros.
    
    Solaris is defining a variant set of macros
    in <arpa/telnet.h>; some of alternate names,
    and some otherwise standard macros.

diff --git a/ChangeLog b/ChangeLog
index 2b80687..f2830b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,29 @@
 2012-01-31  Mats Erik Andersson <gnu@gisladisker.se>
 
+	* libinetutils/kcmd.c: Include <fcntl.h>.
+	* libtelnet/auth.h [!AUTH_REJECT] (AUTH_REJECT): Protect `#define'.
+	[!AUTH_UNKNOWN] (AUTH_UNKNOWN): Likewise.
+	[!AUTH_OTHER] (AUTH_OTHER): Likewise.
+	[!AUTH_USER] (AUTH_USER): Likewise.
+	[!AUTH_VALID] (AUTH_VALID): Likewise.
+	* libtelnet/enc_des.c [ENCTYPE_DES_OFB64] (ofb64_init, ofb64_start)
+	(ofb64_is, ofb64_reply, ofb64_session, ofb64_keyid, ofb64_printsub)
+	(ofb64_encrypt, ofb64_decrypt): Protect definitions.
+	* libtelnet/encrypt.c [ENCTYPE_DES_OFB64] (i_support_encrypt)
+	(i_support_decrypt): Add ENCTYPE_DES_OFB64 only if existing,
+	otherwise only ENCTYPE_DES_CFB64.
+	(encryptions) [ENCTYPE_DES_OFB64]: Conditional use of OFB64 calls.
+	* libtelnet/encrypt.h [!ENCTYPE_ANY && TELOPT_ENCTYPE_NULL]
+	(ENCTYPE_ANY): Use alternate macro.
+	[!ENCTYPE_DES_CFB64 && TELOPT_ENCTYPE_DES_CFB64]
+	(ENCTYPE_DES_CFB64): Likewise
+	[!ENCTYPE_DES_OFB64 && TELOPT_ENCTYPE_DES_OFB64]
+	(ENCTYPE_DES_OFB64): Likewise.
+	[!ENCTYPE_CNT && TELOPT_ENCTYPE_CNT] (ENCTYPE_CNT): Likewise.
+	[!VALIDKEY] (VALIDKEY): Protect `#define'.
+
+2012-01-31  Mats Erik Andersson <gnu@gisladisker.se>
+
 	* src/tftp.c (resolve_name): Do not use AI_ADDRCONFIG at all.
 	Assign HOSTNAME with `ai->ai_canonname' only if it has contents,
 	otherwise assign `<dummy>', which is very unlikely.
diff --git a/libinetutils/kcmd.c b/libinetutils/kcmd.c
index c100af7..778edd7 100644
--- a/libinetutils/kcmd.c
+++ b/libinetutils/kcmd.c
@@ -55,6 +55,7 @@
 # include <sys/file.h>
 # include <sys/socket.h>
 # include <sys/stat.h>
+# include <fcntl.h>
 
 # include <netinet/in.h>
 # include <arpa/inet.h>
diff --git a/libtelnet/auth.h b/libtelnet/auth.h
index 4047d2c..4c8474a 100644
--- a/libtelnet/auth.h
+++ b/libtelnet/auth.h
@@ -70,11 +70,22 @@
 #ifndef __AUTH__
 # define __AUTH__
 
-# define AUTH_REJECT	0	/* Rejected */
-# define AUTH_UNKNOWN	1	/* We don't know who he is, but he's okay */
-# define AUTH_OTHER	2	/* We know him, but not his name */
-# define AUTH_USER	3	/* We know he name */
-# define AUTH_VALID	4	/* We know him, and he needs no password */
+/* These might be defined in <arpa/telnet.h>.  */
+# ifndef AUTH_REJECT
+#  define AUTH_REJECT	0	/* Rejected */
+# endif
+# ifndef AUTH_UNKNOWN
+#  define AUTH_UNKNOWN	1	/* We don't know who he is, but he's okay */
+# endif
+# ifndef AUTH_OTHER
+#  define AUTH_OTHER	2	/* We know him, but not his name */
+# endif
+# ifndef AUTH_USER
+#  define AUTH_USER	3	/* We know the name */
+# endif
+# ifndef AUTH_VALID
+#  define AUTH_VALID	4	/* We know him, and he needs no password */
+# endif
 
 typedef struct XauthP
 {
diff --git a/libtelnet/enc_des.c b/libtelnet/enc_des.c
index 1a5dea8..695b532 100644
--- a/libtelnet/enc_des.c
+++ b/libtelnet/enc_des.c
@@ -167,6 +167,7 @@ cfb64_init (server)
   fb[CFB].streams[1].str_flagshift = SHIFT_VAL (1, CFB);
 }
 
+#   ifdef ENCTYPE_DES_OFB64
 void
 ofb64_init (server)
      int server;
@@ -176,6 +177,7 @@ ofb64_init (server)
   fb[CFB].streams[0].str_flagshift = SHIFT_VAL (0, OFB);
   fb[CFB].streams[1].str_flagshift = SHIFT_VAL (1, OFB);
 }
+#   endif /* ENCTYPE_DES_OFB64 */
 
 void
 fb64_init (fbp)
@@ -205,6 +207,7 @@ cfb64_start (dir, server)
   return (fb64_start (&fb[CFB], dir, server));
 }
 
+#   ifdef ENCTYPE_DES_OFB64
 int
 ofb64_start (dir, server)
      int dir;
@@ -212,6 +215,7 @@ ofb64_start (dir, server)
 {
   return (fb64_start (&fb[OFB], dir, server));
 }
+#   endif /* ENCTYPE_DES_OFB64 */
 
 static int
 fb64_start (fbp, dir, server)
@@ -298,6 +302,7 @@ cfb64_is (data, cnt)
   return (fb64_is (data, cnt, &fb[CFB]));
 }
 
+#   ifdef ENCTYPE_DES_OFB64
 int
 ofb64_is (data, cnt)
      unsigned char *data;
@@ -305,6 +310,7 @@ ofb64_is (data, cnt)
 {
   return (fb64_is (data, cnt, &fb[OFB]));
 }
+#   endif /* ENCTYPE_DES_OFB64 */
 
 int
 fb64_is (data, cnt, fbp)
@@ -393,6 +399,7 @@ cfb64_reply (data, cnt)
   return (fb64_reply (data, cnt, &fb[CFB]));
 }
 
+#   ifdef ENCTYPE_DES_OFB64
 int
 ofb64_reply (data, cnt)
      unsigned char *data;
@@ -400,6 +407,7 @@ ofb64_reply (data, cnt)
 {
   return (fb64_reply (data, cnt, &fb[OFB]));
 }
+#   endif /* ENCTYPE_DES_OFB64 */
 
 
 int
@@ -455,6 +463,7 @@ cfb64_session (key, server)
   fb64_session (key, server, &fb[CFB]);
 }
 
+#   ifdef ENCTYPE_DES_OFB64
 void
 ofb64_session (key, server)
      Session_Key *key;
@@ -462,6 +471,7 @@ ofb64_session (key, server)
 {
   fb64_session (key, server, &fb[OFB]);
 }
+#   endif /* ENCTYPE_DES_OFB64 */
 
 static void
 fb64_session (key, server, fbp)
@@ -517,6 +527,7 @@ cfb64_keyid (dir, kp, lenp)
   return (fb64_keyid (dir, kp, lenp, &fb[CFB]));
 }
 
+#   ifdef ENCTYPE_DES_OFB64
 int
 ofb64_keyid (dir, kp, lenp)
      int dir, *lenp;
@@ -524,6 +535,7 @@ ofb64_keyid (dir, kp, lenp)
 {
   return (fb64_keyid (dir, kp, lenp, &fb[OFB]));
 }
+#   endif /* ENCTYPE_DES_OFB64 */
 
 int
 fb64_keyid (dir, kp, lenp, fbp)
@@ -600,6 +612,7 @@ cfb64_printsub (data, cnt, buf, buflen)
   fb64_printsub (data, cnt, buf, buflen, "CFB64");
 }
 
+#   ifdef ENCTYPE_DES_OFB64
 void
 ofb64_printsub (data, cnt, buf, buflen)
      unsigned char *data, *buf;
@@ -607,6 +620,7 @@ ofb64_printsub (data, cnt, buf, buflen)
 {
   fb64_printsub (data, cnt, buf, buflen, "OFB64");
 }
+#   endif /* ENCTYPE_DES_OFB64 */
 
 void
 fb64_stream_iv (seed, stp)
@@ -750,6 +764,7 @@ cfb64_decrypt (data)
  *	V(n+1) = DES(Vn, key)
  *	On = Dn ^ Vn
  */
+#   ifdef ENCTYPE_DES_OFB64
 void
 ofb64_encrypt (s, c)
      register unsigned char *s;
@@ -764,12 +779,12 @@ ofb64_encrypt (s, c)
       if (index == sizeof (Block))
 	{
 	  Block b;
-#   ifdef SHISHI
+#    ifdef SHISHI
 	  shishi_des_ecb_encrypt (shishi_handle, fb[OFB].krbdes_key,
 				  stp->str_feed, b);
-#   else
+#    else
 	  des_ecb_encrypt (stp->str_feed, b, stp->str_sched, 1);
-#   endif
+#    endif
 	  memmove ((void *) stp->str_feed, (void *) b, sizeof (Block));
 	  index = 0;
 	}
@@ -802,12 +817,12 @@ ofb64_decrypt (data)
   if (index == sizeof (Block))
     {
       Block b;
-#   ifdef SHISHI
+#    ifdef SHISHI
       shishi_des_ecb_encrypt (shishi_handle, fb[OFB].krbdes_key,
 			      stp->str_feed, b);
-#   else
+#    else
       des_ecb_encrypt (stp->str_feed, b, stp->str_sched, 1);
-#   endif
+#    endif
       memmove ((void *) stp->str_feed, (void *) b, sizeof (Block));
       stp->str_index = 1;	/* Next time will be 1 */
       index = 0;		/* But now use 0 */
@@ -815,6 +830,7 @@ ofb64_decrypt (data)
 
   return (data ^ stp->str_feed[index]);
 }
+#   endif /* ENCTYPE_DES_OFB64 */
 #  endif /* DES_ENCRYPTION */
 # endif	/* AUTHENTICATION */
 #endif /* ENCRYPTION */
diff --git a/libtelnet/encrypt.c b/libtelnet/encrypt.c
index 68b06f6..f28c2dd 100644
--- a/libtelnet/encrypt.c
+++ b/libtelnet/encrypt.c
@@ -105,8 +105,15 @@ static char *Name = "Noname";
 
 # define typemask(x)	((x) > 0 ? 1 << ((x)-1) : 0)
 
+/* Only the type ENCTYPE_DES_CFB64 seems universal.  */
+# ifdef ENCTYPE_DES_OFB64
 static long i_support_encrypt = typemask (ENCTYPE_DES_CFB64) | typemask (ENCTYPE_DES_OFB64);
 static long i_support_decrypt = typemask (ENCTYPE_DES_CFB64) | typemask (ENCTYPE_DES_OFB64);
+# else /* !ENCTYPE_DES_OFB64 */
+static long i_support_encrypt = typemask (ENCTYPE_DES_CFB64);
+static long i_support_decrypt = typemask (ENCTYPE_DES_CFB64);
+# endif /* !ENCTYPE_DES_OFB64 */
+
 static long i_wont_support_encrypt = 0;
 static long i_wont_support_decrypt = 0;
 # define I_SUPPORT_ENCRYPT	(i_support_encrypt & ~i_wont_support_encrypt)
@@ -127,6 +134,7 @@ static Encryptions encryptions[] = {
    cfb64_session,
    cfb64_keyid,
    cfb64_printsub},
+#  ifdef ENCTYPE_DES_OFB64
   {"DES_OFB64", ENCTYPE_DES_OFB64,
    ofb64_encrypt,
    ofb64_decrypt,
@@ -137,6 +145,7 @@ static Encryptions encryptions[] = {
    ofb64_session,
    ofb64_keyid,
    ofb64_printsub},
+#  endif /* ENCTYPE_DES_OFB64 */
 # endif	/* DES_ENCRYPTION */
   {0,},
 };
diff --git a/libtelnet/encrypt.h b/libtelnet/encrypt.h
index 0585aed..fd9788c 100644
--- a/libtelnet/encrypt.h
+++ b/libtelnet/encrypt.h
@@ -74,6 +74,20 @@
 #  define DIR_DECRYPT		1
 #  define DIR_ENCRYPT		2
 
+/* Cope with variants of <arpa/telnet.h>.  */
+#  if !defined ENCTYPE_ANY && defined TELOPT_ENCTYPE_NULL
+#   define ENCTYPE_ANY TELOPT_ENCTYPE_NULL
+#  endif
+#  if !defined ENCTYPE_DES_CFB64 && defined TELOPT_ENCTYPE_DES_CFB64
+#   define ENCTYPE_DES_CFB64 TELOPT_ENCTYPE_DES_CFB64
+#  endif
+#  if !defined ENCTYPE_DES_OFB64 && defined TELOPT_ENCTYPE_DES_OFB64
+#   define ENCTYPE_DES_OFB64 TELOPT_ENCTYPE_DES_OFB64
+#  endif
+#  if !defined ENCTYPE_CNT && defined TELOPT_ENCTYPE_CNT
+#   define ENCTYPE_CNT TELOPT_ENCTYPE_CNT
+#  endif
+
 typedef unsigned char Block[8];
 typedef unsigned char *BlockT;
 typedef struct
@@ -81,8 +95,10 @@ typedef struct
   Block _;
 } Schedule[16];
 
-#  define VALIDKEY(key)	( key[0] | key[1] | key[2] | key[3] | \
-			  key[4] | key[5] | key[6] | key[7])
+#  ifndef VALIDKEY
+#   define VALIDKEY(key)	( key[0] | key[1] | key[2] | key[3] | \
+				  key[4] | key[5] | key[6] | key[7])
+#  endif
 
 #  define SAMEKEY(k1, k2)	(!memcmp ((void *) k1, (void *) k2, sizeof (Block)))
 

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

Summary of changes:
 ChangeLog           |   24 ++++++++++++++++++++++++
 libinetutils/kcmd.c |    1 +
 libtelnet/auth.h    |   21 ++++++++++++++++-----
 libtelnet/enc_des.c |   28 ++++++++++++++++++++++------
 libtelnet/encrypt.c |    9 +++++++++
 libtelnet/encrypt.h |   20 ++++++++++++++++++--
 6 files changed, 90 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Tue Jan 31 19:38:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RsODo-0001DX-8Y
	for mharc-commit-inetutils@gnu.org; Tue, 31 Jan 2012 19:38:48 -0500
Received: from eggs.gnu.org ([140.186.70.92]:49802)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RsODk-0001Cy-86
	for commit-inetutils@gnu.org; Tue, 31 Jan 2012 19:38:46 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RsODf-00013H-TH
	for commit-inetutils@gnu.org; Tue, 31 Jan 2012 19:38:44 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:51366)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1RsODf-00012x-RW
	for commit-inetutils@gnu.org; Tue, 31 Jan 2012 19:38:39 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1RsODf-0002u1-6O
	for commit-inetutils@gnu.org; Wed, 01 Feb 2012 00:38:39 +0000
Date: Wed, 01 Feb 2012 00:38:39 +0000
Message-Id: <E1RsODf-0002u1-6O@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_1-17-ge184061
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4e82f22597c920531e070443ed32bd0e66b30024
X-Git-Newrev: e18406105c2995fe6eac7e537a213ef38816583e
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Feb 2012 00:38:46 -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  e18406105c2995fe6eac7e537a213ef38816583e (commit)
      from  4e82f22597c920531e070443ed32bd0e66b30024 (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=e18406105c2995fe6eac7e537a213ef38816583e


commit e18406105c2995fe6eac7e537a213ef38816583e
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed Feb 1 01:36:44 2012 +0100

    Protect headers in Kerberos code.

diff --git a/ChangeLog b/ChangeLog
index f2830b2..ceff4e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,43 @@
+2012-02-01  Mats Erik Andersson <gnu@gisladisker.se>
+
+	Detect and protect header files for Kerberos support.
+	* configure.ac: Check for <com_err.h>, <kerberosIV/des.h>,
+	<kerberosIV/krb.h>, <kerberosV/krb5.h>, <krb5.h>, <krb5/asn1.h>,
+	<krb5/crc-32.h>, <krb5/ext-proto.h>, <krb5/krb5.h>, <krb5/los-proto.h>.
+
+	* libinetutils/des_rw.c
+	[ENCRYPTION && KERBEROS && HAVE_KERBEROSIV_DES_H]:
+	Include <kerberosIV/des.h>.
+	[ENCRYPTION && KERBEROS && HAVE_KERBEROSIV_KRB_H]:
+	Include <kerberosIV/krb.h>.
+	* libinetutils/kcmd.c, libinetutils/krcmd.c
+	[KERBEROS && HAVE_KERBEROSIV_DES_H]: Include <kerberosIV/des.h>.
+	[KERBEROS && HAVE_KERBEROSIV_KRB_H]: Include <kerberosIV/krb.h>.
+	* libtelnet/forward.c [KRB5 && FORWARD && HAVE_KRB5_KRB5_H]:
+	Include <krb5/krb5.h>.
+	[KRB5 && FORWARD && HAVE_KRB5_ASN1_H]: Include <krb5/asn1.h>.
+	[KRB5 && FORWARD && HAVE_KRB5_CRC_32_H]: Include <krb5/crc-32.h>.
+	[KRB5 && FORWARD && HAVE_KRB5_LOS_PROTO_H]: Include <krb5/los-proto.h>.
+	[KRB5 && FORWARD && HAVE_KRB5_EXT_PROTO_H]: Include <krb5/ext-proto.h>.
+	* libtelnet/kerberos.c [KRB4 && HAVE_DES_H]: Include <des.h>.
+	[KRB4 && HAVE_KRB_H]: Include <krb.h>.
+	* libtelnet/kerberos5.c [KRB5 && HAVE_KRB5_H]: Include <krb5.h>.
+	[KRB5 && HAVE_COM_ERR_H]: Include <com_err.h>.
+	* src/rcp.c
+	[KERBEROS && HAVE_KERBEROSIV_DES_H]: Include <kerberosIV/des.h>.
+	[KERBEROS && HAVE_KERBEROSIV_KRB_H]: Include <kerberosIV/krb.h>.
+	* src/rlogin.c: Likewise.
+	[SHISHI]: Do inclusions independently of conditional code.
+	* src/rlogind.c [KERBEROS && KRB4 && HAVE_KERBEROSIV_DES_H]: Include
+	<kerberosIV/des.h>.
+	[KERBEROS && KRB4 && HAVE_KERBEROSIV_KRB_H]: Include <kerberosIV/krb.h>.
+	[KERBEROS && KRB5 && HAVE_KRB5_H]: Include <krb5.h>.
+	[KERBEROS && KRB5 && HAVE_KERBEROSIV_KRB_H]: Include <kerberosIV/krb.h>.
+	* src/rsh.c, src/rshd.c [KERBEROS && HAVE_KERBEROSIV_DES_H]: Include
+	<kerberosIV/des.h>.
+	[KERBEROS && HAVE_KERBEROSIV_KRB_H]: Include <kerberosIV/krb.h>.
+	[SHISHI]: Do inclusions independently of conditional code.
+
 2012-01-31  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* libinetutils/kcmd.c: Include <fcntl.h>.
diff --git a/configure.ac b/configure.ac
index dbea667..91670a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -488,8 +488,11 @@ AC_HEADER_STDC
 AC_HEADER_TIME
 AC_HEADER_DIRENT
 
-AC_CHECK_HEADERS([arpa/nameser.h des.h errno.h fcntl.h features.h glob.h \
-                  krb.h memory.h netinet/in_systm.h netinet/ip.h \
+AC_CHECK_HEADERS([arpa/nameser.h com_err.h des.h errno.h fcntl.h features.h \
+		  glob.h kerberosIV/des.h kerberosIV/krb.h kerberosV/krb5.h \
+		  krb.h krb5.h krb5/asn1.h krb5/crc-32.h krb5/ext-proto.h \
+		  krb5/krb5.h krb5/los-proto.h \
+		  memory.h netinet/in_systm.h netinet/ip.h \
                   netinet/ip_icmp.h netinet/ip_var.h \
 		  security/pam_appl.h \
                   shadow.h stdarg.h stdlib.h string.h stropts.h sys/tty.h \
diff --git a/libinetutils/des_rw.c b/libinetutils/des_rw.c
index 29796b4..e2ca3cc 100644
--- a/libinetutils/des_rw.c
+++ b/libinetutils/des_rw.c
@@ -53,8 +53,12 @@
 # ifdef KERBEROS
 #  include <sys/param.h>
 
-#  include <kerberosIV/des.h>
-#  include <kerberosIV/krb.h>
+#  ifdef HAVE_KERBEROSIV_DES_H
+#   include <kerberosIV/des.h>
+#  endif
+#  ifdef HAVE_KERBEROSIV_KRB_H
+#   include <kerberosIV/krb.h>
+#  endif
 
 #  include <stdlib.h>
 #  include <string.h>
diff --git a/libinetutils/kcmd.c b/libinetutils/kcmd.c
index 778edd7..58c6c0d 100644
--- a/libinetutils/kcmd.c
+++ b/libinetutils/kcmd.c
@@ -61,8 +61,12 @@
 # include <arpa/inet.h>
 
 # if defined KERBEROS
-#  include <kerberosIV/des.h>
-#  include <kerberosIV/krb.h>
+#  ifdef HAVE_KERBEROSIV_DES_H
+#   include <kerberosIV/des.h>
+#  endif
+#  ifdef HAVE_KERBEROSIV_KRB_H
+#   include <kerberosIV/krb.h>
+#  endif
 # elif defined(SHISHI)
 #  include <shishi.h>
 #  include "shishi_def.h"
diff --git a/libinetutils/krcmd.c b/libinetutils/krcmd.c
index 44e1a4b..d22caa5 100644
--- a/libinetutils/krcmd.c
+++ b/libinetutils/krcmd.c
@@ -58,8 +58,12 @@
 # include <netinet/in.h>
 
 # ifdef KERBEROS
-#  include <kerberosIV/des.h>
-#  include <kerberosIV/krb.h>
+#  ifdef HAVE_KERBEROSIV_DES_H
+#   include <kerberosIV/des.h>
+#  endif
+#  ifdef HAVE_KERBEROSIV_KRB_H
+#   include <kerberosIV/krb.h>
+#  endif
 # elif defined(SHISHI)
 #  include <shishi.h>
 #  include "shishi_def.h"
diff --git a/libtelnet/forward.c b/libtelnet/forward.c
index b1c5c2f..3da40e4 100644
--- a/libtelnet/forward.c
+++ b/libtelnet/forward.c
@@ -57,11 +57,21 @@
 # include <pwd.h>
 # include <netdb.h>
 
-# include <krb5/krb5.h>
-# include <krb5/asn1.h>
-# include <krb5/crc-32.h>
-# include <krb5/los-proto.h>
-# include <krb5/ext-proto.h>
+# ifdef HAVE_KRB5_KRB5_H
+#  include <krb5/krb5.h>
+# endif
+# ifdef HAVE_KRB5_ASN1_H
+#  include <krb5/asn1.h>
+# endif
+# ifdef HAVE_KRB5_CRC_32_H
+#  include <krb5/crc-32.h>
+# endif
+# ifdef HAVE_KRB5_LOS_PROTO_H
+#  include <krb5/los-proto.h>
+# endif
+# ifdef HAVE_KRB5_EXT_PROTO_H
+#  include <krb5/ext-proto.h>
+# endif
 
 # define KRB5_DEFAULT_LIFE 60*60*8	/* 8 hours */
 /* helper function: convert flags to necessary KDC options */
diff --git a/libtelnet/kerberos.c b/libtelnet/kerberos.c
index 2158c1d..8d80c5f 100644
--- a/libtelnet/kerberos.c
+++ b/libtelnet/kerberos.c
@@ -73,8 +73,12 @@
 # include <sys/types.h>
 # include <arpa/telnet.h>
 # include <stdio.h>
-# include <des.h>		/* BSD wont include this in krb.h, so we do it here */
-# include <krb.h>
+# ifdef HAVE_DES_H
+#  include <des.h>		/* BSD wont include this in krb.h, so we do it here */
+# endif
+# ifdef HAVE_KRB_H
+#  include <krb.h>
+# endif
 # include <stdlib.h>
 # include <string.h>
 
diff --git a/libtelnet/kerberos5.c b/libtelnet/kerberos5.c
index 5e4165b..ed71a26 100644
--- a/libtelnet/kerberos5.c
+++ b/libtelnet/kerberos5.c
@@ -24,10 +24,14 @@
 # include <stdlib.h>
 # include <stdio.h>
 # include <arpa/telnet.h>
-# include <krb5.h>
+# ifdef HAVE_KRB5_H
+#  include <krb5.h>
+# endif
 # include <assert.h>
 
-# include <com_err.h>
+# ifdef HAVE_COM_ERR_H
+#  include <com_err.h>
+# endif
 # include <netdb.h>
 # include <ctype.h>
 # include <syslog.h>
diff --git a/src/rcp.c b/src/rcp.c
index 534de5b..cd0c25b 100644
--- a/src/rcp.c
+++ b/src/rcp.c
@@ -102,8 +102,12 @@ int susystem (char *, int);
 void verifydir (char *);
 
 #ifdef KERBEROS
-# include <kerberosIV/des.h>
-# include <kerberosIV/krb.h>
+# ifdef HAVE_KERBEROSIV_DES_H
+#  include <kerberosIV/des.h>
+# endif
+# ifdef HAVE_KERBEROSIV_KRB_H
+#  include <kerberosIV/krb.h>
+# endif
 
 char *dest_realm = NULL;
 int use_kerberos = 1;
diff --git a/src/rlogin.c b/src/rlogin.c
index 298b3b6..aadf4eb 100644
--- a/src/rlogin.c
+++ b/src/rlogin.c
@@ -104,22 +104,29 @@
 #include "libinetutils.h"
 #include "unused-parameter.h"
 
+#ifdef KERBEROS
+# ifdef HAVE_KERBEROSIV_DES_H
+#  include <kerberosIV/des.h>
+# endif
+# ifdef HAVE_KERBEROSIV_KRB_H
+#  include <kerberosIV/krb.h>
+# endif
+#endif /* KERBEROS */
+
 #ifdef SHISHI
+# include <shishi.h>
+# include "shishi_def.h"
 # define REALM_SZ 1040
 #endif
 
 #if defined KERBEROS || defined SHISHI
 int use_kerberos = 1, doencrypt;
 # ifdef KERBEROS
-#  include <kerberosIV/des.h>
-#  include <kerberosIV/krb.h>
 char dest_realm_buf[REALM_SZ], *dest_realm = NULL;
 CREDENTIALS cred;
 Key_schedule schedule;
 
 # elif defined(SHISHI)
-#  include <shishi.h>
-#  include "shishi_def.h"
 char dest_realm_buf[REALM_SZ], *dest_realm = NULL;
 
 Shishi *handle;
@@ -131,8 +138,8 @@ int keytype;
 int keylen;
 int rc;
 int wlen;
-# endif
-#endif /* KERBEROS */
+# endif /* SHISHI */
+#endif /* KERBEROS || SHISHI */
 
 /*
   The TIOCPKT_* macros may not be implemented in the pty driver.
diff --git a/src/rlogind.c b/src/rlogind.c
index 98a25c2..9a23775 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -102,14 +102,22 @@
 #if defined KERBEROS || defined SHISHI
 # ifdef	KRB4
 #  define SECURE_MESSAGE "This rlogin session is using DES encryption for all transmissions.\r\n"
-#  include <kerberosIV/des.h>
-#  include <kerberosIV/krb.h>
+#  ifdef HAVE_KERBEROSIV_DES_H
+#   include <kerberosIV/des.h>
+#  endif
+#  ifdef HAVE_KERBEROSIV_KRB_H
+#   include <kerberosIV/krb.h>
+#  endif
 #  define kerberos_error_string(c) krb_err_txt[c]
 #  define AUTH_KERBEROS_DEFAULT AUTH_KERBEROS_4
 # elif defined(KRB5)
 #  define SECURE_MESSAGE "This rlogin session is using DES encryption for all transmissions.\r\n"
-#  include <krb5.h>
-#  include <kerberosIV/krb.h>
+#  ifdef HAVE_KRB5_H
+#   include <krb5.h>
+#  endif
+#  ifdef HAVE_KERBEROSIV_KRB_H
+#   include <kerberosIV/krb.h>
+#  endif
 #  define kerberos_error_string(c) error_message (c)
 #  define AUTH_KERBEROS_DEFAULT AUTH_KERBEROS_5
 # elif defined(SHISHI)
diff --git a/src/rsh.c b/src/rsh.c
index 4832c00..6f57c96 100644
--- a/src/rsh.c
+++ b/src/rsh.c
@@ -78,6 +78,20 @@
 #include <argp.h>
 #include <libinetutils.h>
 
+#ifdef KERBEROS
+# ifdef HAVE_KERBEROSIV_DES_H
+#  include <kerberosIV/des.h>
+# endif
+# ifdef KERBEROSIV_KRB_H
+#  include <kerberosIV/krb.h>
+# endif
+#endif /* KERBEROS */
+
+#ifdef SHISHI
+# include <shishi.h>
+# include "shishi_def.h"
+#endif
+
 int debug_option = 0;
 int null_input_option = 0;
 char *user = NULL;
@@ -85,16 +99,12 @@ char *user = NULL;
 #if defined KERBEROS || defined SHISHI
 int use_kerberos = 1, doencrypt;
 # ifdef KERBEROS
-#  include <kerberosIV/des.h>
-#  include <kerberosIV/krb.h>
 char *dest_realm = NULL;
 CREDENTIALS cred;
 Key_schedule schedule;
 extern char *krb_realmofhost ();
 
 # elif defined(SHISHI)
-#  include <shishi.h>
-#  include "shishi_def.h"
 char *dest_realm = NULL;
 
 Shishi *h;
@@ -106,8 +116,8 @@ int keytype;
 int keylen;
 int rc;
 int wlen;
-# endif
-#endif /* KERBEROS */
+# endif /* SHISHI */
+#endif /* KERBEROS || SHISHI */
 
 /*
  * rsh - remote shell
diff --git a/src/rshd.c b/src/rshd.c
index 93010d6..9cb559c 100644
--- a/src/rshd.c
+++ b/src/rshd.c
@@ -97,6 +97,20 @@
 #include <argp.h>
 #include <libinetutils.h>
 
+#ifdef KERBEROS
+# ifdef HAVE_KERBEROSIV_DES_H
+#  include <kerberosIV/des.h>
+# endif
+# ifdef HAVE_KERBEROSIV_KRB_H
+#  include <kerberosIV/krb.h>
+# endif
+#endif /* KERBEROS */
+
+#ifdef SHISHI
+# include <shishi.h>
+# include <shishi_def.h>
+#endif
+
 int keepalive = 1;		/* flag for SO_KEEPALIVE scoket option */
 int check_all;
 int log_success;		/* If TRUE, log all successful accesses */
@@ -110,14 +124,10 @@ const char *topdomain (const char *);
 
 #if defined KERBEROS || defined SHISHI
 # ifdef KERBEROS
-#  include <kerberosIV/des.h>
-#  include <kerberosIV/krb.h>
 Key_schedule schedule;
 char authbuf[sizeof (AUTH_DAT)];
 char tickbuf[sizeof (KTEXT_ST)];
 # elif defined(SHISHI)
-#  include <shishi.h>
-#  include <shishi_def.h>
 Shishi *h;
 Shishi_ap *ap;
 Shishi_key *enckey;

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

Summary of changes:
 ChangeLog             |   40 ++++++++++++++++++++++++++++++++++++++++
 configure.ac          |    7 +++++--
 libinetutils/des_rw.c |    8 ++++++--
 libinetutils/kcmd.c   |    8 ++++++--
 libinetutils/krcmd.c  |    8 ++++++--
 libtelnet/forward.c   |   20 +++++++++++++++-----
 libtelnet/kerberos.c  |    8 ++++++--
 libtelnet/kerberos5.c |    8 ++++++--
 src/rcp.c             |    8 ++++++--
 src/rlogin.c          |   19 +++++++++++++------
 src/rlogind.c         |   16 ++++++++++++----
 src/rsh.c             |   22 ++++++++++++++++------
 src/rshd.c            |   18 ++++++++++++++----
 13 files changed, 151 insertions(+), 39 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


