From MAILER-DAEMON Mon Nov 08 15:00:50 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1PFXta-0001zT-Bb
	for mharc-commit-inetutils@gnu.org; Mon, 08 Nov 2010 15:00:50 -0500
Received: from [140.186.70.92] (port=44623 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1PFXtY-0001z1-9N
	for commit-inetutils@gnu.org; Mon, 08 Nov 2010 15:00:49 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ams@gnu.org>) id 1PFXtX-0001ix-DV
	for commit-inetutils@gnu.org; Mon, 08 Nov 2010 15:00:48 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:41095
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1PFXtX-0001ip-C7
	for commit-inetutils@gnu.org; Mon, 08 Nov 2010 15:00:47 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <ams@gnu.org>) id 1PFXtV-0004DA-Q1
	for commit-inetutils@gnu.org; Mon, 08 Nov 2010 20:00:46 +0000
Received: from ams by vcs-noshell.in.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <ams@savannah.gnu.org>) id 1PFXtT-0001wd-HP
	for commit-inetutils@gnu.org; Mon, 08 Nov 2010 20:00:44 +0000
To: commit-inetutils@gnu.org
X-Git-Refname: refs/tags/v1_2i
X-Git-Reftype: annotated tag
X-Git-Oldrev: d5ae2faa50cc84e27217a8623963437af18189d0
X-Git-Newrev: 0000000000000000000000000000000000000000
Message-Id: <E1PFXtT-0001wd-HP@vcs-noshell.in.savannah.gnu.org>
From: "Alfred M. Szmidt" <ams@gnu.org>
Date: Mon, 08 Nov 2010 20:00:43 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Inetutils  annotated tag, v1_2i, deleted. v1_2i
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 08 Nov 2010 20:00:49 -0000

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

The annotated tag, v1_2i has been deleted
       was  d5ae2faa50cc84e27217a8623963437af18189d0

-----------------------------------------------------------------------
tag v1_2i

77871767bc70a05103cd55907a21c0de116eab51 .
-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Tue Nov 09 18:23:00 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1PFxWm-0000oz-9l
	for mharc-commit-inetutils@gnu.org; Tue, 09 Nov 2010 18:23:00 -0500
Received: from [140.186.70.92] (port=60327 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1PFxWk-0000or-7R
	for commit-inetutils@gnu.org; Tue, 09 Nov 2010 18:22:59 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ams@gnu.org>) id 1PFxWj-0004dw-9z
	for commit-inetutils@gnu.org; Tue, 09 Nov 2010 18:22:58 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:55730
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1PFxWj-0004dm-8f
	for commit-inetutils@gnu.org; Tue, 09 Nov 2010 18:22:57 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <ams@gnu.org>) id 1PFxWi-0006AN-Pp
	for commit-inetutils@gnu.org; Tue, 09 Nov 2010 23:22:56 +0000
Received: from ams by vcs-noshell.in.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <ams@savannah.gnu.org>) id 1PFxWi-00016l-EA
	for commit-inetutils@gnu.org; Tue, 09 Nov 2010 23:22:56 +0000
To: commit-inetutils@gnu.org
X-Git-Refname: refs/tags/release1_4_0
X-Git-Reftype: annotated tag
X-Git-Oldrev: ec580f61a9f45a8e5c1460b11905859ae12073ec
X-Git-Newrev: 0000000000000000000000000000000000000000
Message-Id: <E1PFxWi-00016l-EA@vcs-noshell.in.savannah.gnu.org>
From: "Alfred M. Szmidt" <ams@gnu.org>
Date: Tue, 09 Nov 2010 23:22:56 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Inetutils  annotated tag, release1_4_0,
	deleted. release1_4_0
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 09 Nov 2010 23:22:59 -0000

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

The annotated tag, release1_4_0 has been deleted
       was  ec580f61a9f45a8e5c1460b11905859ae12073ec

-----------------------------------------------------------------------
tag release1_4_0

e2da675d8d53545643e6dbd908bbd9e0e74315d5 Tweaks
-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Tue Nov 09 18:23:13 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1PFxWz-0000xV-F7
	for mharc-commit-inetutils@gnu.org; Tue, 09 Nov 2010 18:23:13 -0500
Received: from [140.186.70.92] (port=60411 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1PFxWw-0000ut-Lo
	for commit-inetutils@gnu.org; Tue, 09 Nov 2010 18:23:12 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ams@gnu.org>) id 1PFxWt-0004g2-Ns
	for commit-inetutils@gnu.org; Tue, 09 Nov 2010 18:23:08 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:55731
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ams@gnu.org>)
	id 1PFxWt-0004fy-LE
	for commit-inetutils@gnu.org; Tue, 09 Nov 2010 18:23:07 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <ams@gnu.org>) id 1PFxWt-0006AQ-Lk
	for commit-inetutils@gnu.org; Tue, 09 Nov 2010 23:23:07 +0000
Received: from ams by vcs-noshell.in.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <ams@savannah.gnu.org>) id 1PFxWt-00017b-Hk
	for commit-inetutils@gnu.org; Tue, 09 Nov 2010 23:23:07 +0000
To: commit-inetutils@gnu.org
X-Git-Refname: refs/tags/release_1_5
X-Git-Reftype: annotated tag
X-Git-Oldrev: b99bba6351c8d5459fe9356efd504a5e8accbfee
X-Git-Newrev: 0000000000000000000000000000000000000000
Message-Id: <E1PFxWt-00017b-Hk@vcs-noshell.in.savannah.gnu.org>
From: "Alfred M. Szmidt" <ams@gnu.org>
Date: Tue, 09 Nov 2010 23:23:07 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Inetutils  annotated tag, release_1_5,
	deleted. release_1_5
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 09 Nov 2010 23:23: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 annotated tag, release_1_5 has been deleted
       was  b99bba6351c8d5459fe9356efd504a5e8accbfee

-----------------------------------------------------------------------
tag release_1_5

9aa2d4d58079a25126e411005f69eca53fa38282 Update
-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Fri Nov 19 06:42:47 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1PJPMd-0000Vn-E5
	for mharc-commit-inetutils@gnu.org; Fri, 19 Nov 2010 06:42:47 -0500
Received: from [140.186.70.92] (port=55710 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1PJPMW-0000Se-1d
	for commit-inetutils@gnu.org; Fri, 19 Nov 2010 06:42:45 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1PJPMQ-0007bF-MS
	for commit-inetutils@gnu.org; Fri, 19 Nov 2010 06:42:39 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:54496
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1PJPMQ-0007bB-IK
	for commit-inetutils@gnu.org; Fri, 19 Nov 2010 06:42:34 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <simon@josefsson.org>) id 1PJPMQ-00032M-BC
	for commit-inetutils@gnu.org; Fri, 19 Nov 2010 11:42:34 +0000
Received: from jas by vcs-noshell.in.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <jas@savannah.gnu.org>) id 1PJPMQ-0002ql-6V
	for commit-inetutils@gnu.org; Fri, 19 Nov 2010 11:42:34 +0000
To: commit-inetutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 31d3b8e6a669c127fd6fbb6173a5d1a370d811af
X-Git-Newrev: 5e52b86b129eb460085bfcbaf0e243ad52328a2e
Message-Id: <E1PJPMQ-0002ql-6V@vcs-noshell.in.savannah.gnu.org>
From: Simon Josefsson <simon@josefsson.org>
Date: Fri, 19 Nov 2010 11:42:34 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_8-65-g5e52b86
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Nov 2010 11:42:45 -0000

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

The branch, master has been updated
       via  5e52b86b129eb460085bfcbaf0e243ad52328a2e (commit)
      from  31d3b8e6a669c127fd6fbb6173a5d1a370d811af (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=5e52b86b129eb460085bfcbaf0e243ad52328a2e


commit 5e52b86b129eb460085bfcbaf0e243ad52328a2e
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Fri Nov 19 02:04:53 2010 -0500

    ftp: rename ruserpass to avoid C library collision
    
    The C library itself defines a "ruserpass" function.  When linking
    statically, it is possible to hit a symbol collision linker error.
    So rename the local ftp version to "remote_userpass".
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
    Signed-off-by: Simon Josefsson <simon@josefsson.org>

diff --git a/ChangeLog b/ChangeLog
index f757a82..c75d8b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-19  Mike Frysinger <vapier@gentoo.org>
+
+	* ftp/extern.h: Rename function ruserpass to remote_userpass.
+	* ftp/ftp.c (login): Call remote_userpass instead of ruserpass.
+	* ftp/ruserpass.c (remote_userpass): Renamed from ruserpass.
+
 2010-10-31  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* ifconfig/if_index.c (if_nametoindex, if_freenameindex)
diff --git a/ftp/extern.h b/ftp/extern.h
index 8cdb8aa..037cb61 100644
--- a/ftp/extern.h
+++ b/ftp/extern.h
@@ -119,7 +119,7 @@ void reset (int, char **);
 void restart (int, char **);
 void rmthelp (int, char **);
 void rmtstatus (int, char **);
-int ruserpass (char *, char **, char **, char **);
+int remote_userpass (char *, char **, char **, char **);
 void sendrequest (char *, char *, char *, int);
 void setascii (int, char **);
 void setbell (int, char **);
diff --git a/ftp/ftp.c b/ftp/ftp.c
index c20ba41..95675cc 100644
--- a/ftp/ftp.c
+++ b/ftp/ftp.c
@@ -251,7 +251,7 @@ login (char *host)
   int n, aflag = 0;
 
   user = pass = acct = 0;
-  if (ruserpass (host, &user, &pass, &acct) < 0)
+  if (remote_userpass (host, &user, &pass, &acct) < 0)
     {
       code = -1;
       return (0);
diff --git a/ftp/ruserpass.c b/ftp/ruserpass.c
index 8572b95..c08fbc0 100644
--- a/ftp/ruserpass.c
+++ b/ftp/ruserpass.c
@@ -111,7 +111,7 @@ static struct toktab
 };
 
 int
-ruserpass (char *host, char **aname, char **apass, char **aacct)
+remote_userpass (char *host, char **aname, char **apass, char **aacct)
 {
   char *hdir, buf[BUFSIZ], *tmp;
   char *myname = 0, *mydomain;

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

Summary of changes:
 ChangeLog       |    6 ++++++
 ftp/extern.h    |    2 +-
 ftp/ftp.c       |    2 +-
 ftp/ruserpass.c |    2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Sun Nov 21 06:49:11 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1PK8Pu-0005LG-Sl
	for mharc-commit-inetutils@gnu.org; Sun, 21 Nov 2010 06:49:10 -0500
Received: from [140.186.70.92] (port=38727 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1PK8Pq-0005Iy-NL
	for commit-inetutils@gnu.org; Sun, 21 Nov 2010 06:49:08 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1PK8Po-0006dg-Ln
	for commit-inetutils@gnu.org; Sun, 21 Nov 2010 06:49:06 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:49287
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1PK8Po-0006dc-Fn
	for commit-inetutils@gnu.org; Sun, 21 Nov 2010 06:49:04 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <simon@josefsson.org>) id 1PK8Po-0005z9-BM
	for commit-inetutils@gnu.org; Sun, 21 Nov 2010 11:49:04 +0000
Received: from jas by vcs-noshell.in.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <jas@savannah.gnu.org>) id 1PK8Po-0007kx-54
	for commit-inetutils@gnu.org; Sun, 21 Nov 2010 11:49:04 +0000
To: commit-inetutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5e52b86b129eb460085bfcbaf0e243ad52328a2e
X-Git-Newrev: e5d39ad8e0eca30a626b1acefa6a8d77ed26cb8e
Message-Id: <E1PK8Po-0007kx-54@vcs-noshell.in.savannah.gnu.org>
From: Simon Josefsson <simon@josefsson.org>
Date: Sun, 21 Nov 2010 11:49:04 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_8-66-ge5d39ad
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 21 Nov 2010 11:49:08 -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  e5d39ad8e0eca30a626b1acefa6a8d77ed26cb8e (commit)
      from  5e52b86b129eb460085bfcbaf0e243ad52328a2e (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=e5d39ad8e0eca30a626b1acefa6a8d77ed26cb8e


commit e5d39ad8e0eca30a626b1acefa6a8d77ed26cb8e
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Fri Nov 19 02:04:54 2010 -0500

    rshd: detect __rcmd_errstr support in the C lib
    
    Not all C libraries support __rcmd_errstr, so add a configure test for it.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
    Signed-off-by: Simon Josefsson <simon@josefsson.org>

diff --git a/ChangeLog b/ChangeLog
index c75d8b0..7a520f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-21  Mike Frysinger <vapier@gentoo.org>
+
+	* configure.ac: Check for __rcmd_errstr.
+	* src/rshd.c (doit): Protect declaration and use of __rcmd_errstr
+	variable with HAVE___RCMD_ERRSTR check.
+
 2010-11-19  Mike Frysinger <vapier@gentoo.org>
 
 	* ftp/extern.h: Rename function ruserpass to remote_userpass.
diff --git a/configure.ac b/configure.ac
index c1ac270..79d655c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -587,7 +587,7 @@ AC_CHECK_FUNCS(cfsetspeed cgetent dirfd fchdir flock \
                setsid setregid setreuid setresgid setresuid setutent_r \
                sigaction sigvec strchr setproctitle tcgetattr tzset utimes \
                utime uname \
-               updwtmp updwtmpx vhangup wait3 wait4 opendir2)
+               updwtmp updwtmpx vhangup wait3 wait4 opendir2 __rcmd_errstr)
 
 dnl Functions that we will define if necessary.
 AC_REPLACE_FUNCS(getpass getusershell memcmp memcpy memmove memset \
diff --git a/src/rshd.c b/src/rshd.c
index d49facd..9301ef2 100644
--- a/src/rshd.c
+++ b/src/rshd.c
@@ -284,7 +284,9 @@ extern char **environ;
 void
 doit (int sockfd, struct sockaddr_in *fromp)
 {
+#ifdef HAVE___RCMD_ERRSTR
   extern char *__rcmd_errstr;	/* syslog hook from libc/net/rcmd.c. */
+#endif
   struct hostent *hp;
   struct passwd *pwd;
   u_short port;
@@ -757,11 +759,13 @@ doit (int sockfd, struct sockaddr_in *fromp)
                      && (iruserok (fromp->sin_addr.s_addr, pwd->pw_uid == 0,
                                    remuser, locuser)) < 0))
     {
+#ifdef HAVE___RCMD_ERRSTR
       if (__rcmd_errstr)
 	syslog (LOG_INFO | LOG_AUTH,
 		"%s@%s as %s: permission denied (%s). cmd='%.80s'",
 		remuser, hostname, locuser, __rcmd_errstr, cmdbuf);
       else
+#endif
 	syslog (LOG_INFO | LOG_AUTH,
 		"%s@%s as %s: permission denied. cmd='%.80s'",
 		remuser, hostname, locuser, cmdbuf);

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

Summary of changes:
 ChangeLog    |    6 ++++++
 configure.ac |    2 +-
 src/rshd.c   |    4 ++++
 3 files changed, 11 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Mon Nov 22 07:40:36 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1PKVhE-0003o5-5O
	for mharc-commit-inetutils@gnu.org; Mon, 22 Nov 2010 07:40:36 -0500
Received: from [140.186.70.92] (port=42085 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1PKVhB-0003m5-4e
	for commit-inetutils@gnu.org; Mon, 22 Nov 2010 07:40:34 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1PKVh9-0000si-SC
	for commit-inetutils@gnu.org; Mon, 22 Nov 2010 07:40:33 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:46407
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1PKVh9-0000se-PQ
	for commit-inetutils@gnu.org; Mon, 22 Nov 2010 07:40:31 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gnu@gisladisker.se>) id 1PKVh9-0006Du-FO
	for commit-inetutils@gnu.org; Mon, 22 Nov 2010 12:40:31 +0000
Received: from meand by vcs-noshell.in.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <meand@savannah.gnu.org>) id 1PKVh8-0007D4-EV
	for commit-inetutils@gnu.org; Mon, 22 Nov 2010 12:40:30 +0000
To: commit-inetutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: e5d39ad8e0eca30a626b1acefa6a8d77ed26cb8e
X-Git-Newrev: 4543b88b71d4598a3c9e49d44c59ab5ae54c4848
Message-Id: <E1PKVh8-0007D4-EV@vcs-noshell.in.savannah.gnu.org>
From: Mats Erik Andersson <gnu@gisladisker.se>
Date: Mon, 22 Nov 2010 12:40:30 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_8-69-g4543b88
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 22 Nov 2010 12:40:34 -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  4543b88b71d4598a3c9e49d44c59ab5ae54c4848 (commit)
       via  f49593cd1ad5b1e79eaf24585b5b4425f17f28f2 (commit)
       via  d6c6b355b3bf4da491003e79ee4790d13930a892 (commit)
      from  e5d39ad8e0eca30a626b1acefa6a8d77ed26cb8e (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=4543b88b71d4598a3c9e49d44c59ab5ae54c4848


commit 4543b88b71d4598a3c9e49d44c59ab5ae54c4848
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Mon Nov 22 11:13:34 2010 +0100

    inetd: Sanity check before using AI_V4MAPPED.

diff --git a/ChangeLog b/ChangeLog
index 79e5c92..daf9708 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-11-22  Mats Erik Andersson <gnu@gisladisker.se>
 
+	* src/inetd.c (inetd_getaddrinfo): Do not use AI_V4MAPPED with
+	address family AF_INET.  FreeBSD fails otherwise.
+
+2010-11-22  Mats Erik Andersson <gnu@gisladisker.se>
+
 	* ifconfig/flags.c (flag_char_tab): Protect the uses of
 	IFF_NOTRAILERS by `#ifdef'.
 
diff --git a/src/inetd.c b/src/inetd.c
index f5f7d32..ce7592e 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -743,7 +743,7 @@ inetd_getaddrinfo (struct servtab *sep, int proto, struct addrinfo **result)
 
   hints.ai_flags = AI_PASSIVE;
 #ifdef AI_V4MAPPED
-  if (sep->se_v4mapped)
+  if (sep->se_v4mapped && (sep->se_family != AF_INET))
     hints.ai_flags |= AI_V4MAPPED;
 #endif
   hints.ai_family = sep->se_family;

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


commit f49593cd1ad5b1e79eaf24585b5b4425f17f28f2
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Mon Nov 22 11:08:25 2010 +0100

    ifconfig: Condition the use of IFF_NOTRAILERS.

diff --git a/ChangeLog b/ChangeLog
index b1df099..79e5c92 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-11-22  Mats Erik Andersson <gnu@gisladisker.se>
 
+	* ifconfig/flags.c (flag_char_tab): Protect the uses of
+	IFF_NOTRAILERS by `#ifdef'.
+
+2010-11-22  Mats Erik Andersson <gnu@gisladisker.se>
+
 	Regression caused by fe539ae9...797d881c
 
 	* src/traceroute.c: Revert change from 2010-10-31.
diff --git a/ifconfig/flags.c b/ifconfig/flags.c
index 279b295..a4138df 100644
--- a/ifconfig/flags.c
+++ b/ifconfig/flags.c
@@ -398,7 +398,9 @@ static struct if_flag_char flag_char_tab[] = {
   { IFF_DYNAMIC,     'd' },
 #endif
   { IFF_PROMISC,     'P' },
+#ifdef IFF_NOTRAILERS
   { IFF_NOTRAILERS,  'N' },
+#endif
   { IFF_NOARP,       'O' },
   { IFF_POINTOPOINT, 'P' },
 #ifdef IFF_SLAVE

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


commit d6c6b355b3bf4da491003e79ee4790d13930a892
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Mon Nov 22 11:03:10 2010 +0100

    traceroute: Regression in handling of IP_TTL.

diff --git a/ChangeLog b/ChangeLog
index 7a520f8..b1df099 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-22  Mats Erik Andersson <gnu@gisladisker.se>
+
+	Regression caused by fe539ae9...797d881c
+
+	* src/traceroute.c: Revert change from 2010-10-31.
+	Change element `ttl' in `struct trace' to be plain `int'.
+	(trace_init): Change type of TTLP to be `const int *'.
+	Use `sizeof (*ttlp)' in both calls to setsockopt.
+	(trace_inc_ttl): Likewise.
+
 2010-11-21  Mike Frysinger <vapier@gentoo.org>
 
 	* configure.ac: Check for __rcmd_errstr.
diff --git a/src/traceroute.c b/src/traceroute.c
index f79e747..432e6e1 100644
--- a/src/traceroute.c
+++ b/src/traceroute.c
@@ -64,7 +64,7 @@ typedef struct trace
   int icmpfd, udpfd;
   enum trace_type type;
   struct sockaddr_in to, from;
-  unsigned char ttl;
+  int ttl;
   struct timeval tsent;
 } trace_t;
 
@@ -311,9 +311,9 @@ void
 trace_init (trace_t * t, const struct sockaddr_in to,
 	    const enum trace_type type)
 {
-  int ttl;
+  const int *ttlp;
   assert (t);
-  ttl = t->ttl;
+  ttlp = &t->ttl;
 
   t->type = type;
   t->to = to;
@@ -325,8 +325,8 @@ trace_init (trace_t * t, const struct sockaddr_in to,
       if (t->udpfd < 0)
         error (EXIT_FAILURE, errno, "socket");
 
-      if (setsockopt (t->udpfd, IPPROTO_IP, IP_TTL, &ttl,
-		      sizeof (ttl)) < 0)
+      if (setsockopt (t->udpfd, IPPROTO_IP, IP_TTL, ttlp,
+		      sizeof (*ttlp)) < 0)
         error (EXIT_FAILURE, errno, "setsockopt");
     }
 
@@ -340,7 +340,7 @@ trace_init (trace_t * t, const struct sockaddr_in to,
             error (EXIT_FAILURE, errno, "socket");
 
 	  if (setsockopt (t->icmpfd, IPPROTO_IP, IP_TTL,
-			  &ttl, sizeof (ttl)) < 0)
+			  ttlp, sizeof (*ttlp)) < 0)
             error (EXIT_FAILURE, errno, "setsockopt");
 	}
       else
@@ -520,14 +520,14 @@ void
 trace_inc_ttl (trace_t * t)
 {
   int fd;
-  int ttl;
+  const int *ttlp;
 
   assert (t);
 
-  ttl = t->ttl;
+  ttlp = &t->ttl;
   t->ttl++;
   fd = (t->type == TRACE_UDP ? t->udpfd : t->icmpfd);
-  if (setsockopt (fd, IPPROTO_IP, IP_TTL, &ttl, sizeof (ttl)) < 0)
+  if (setsockopt (fd, IPPROTO_IP, IP_TTL, ttlp, sizeof (*ttlp)) < 0)
     error (EXIT_FAILURE, errno, "setsockopt");
 }
 

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

Summary of changes:
 ChangeLog        |   20 ++++++++++++++++++++
 ifconfig/flags.c |    2 ++
 src/inetd.c      |    2 +-
 src/traceroute.c |   18 +++++++++---------
 4 files changed, 32 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Tue Nov 23 08:17:23 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1PKskN-0003Se-J9
	for mharc-commit-inetutils@gnu.org; Tue, 23 Nov 2010 08:17:23 -0500
Received: from [140.186.70.92] (port=54114 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1PKsjs-00037Y-5e
	for commit-inetutils@gnu.org; Tue, 23 Nov 2010 08:17:21 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1PKsjW-0004gV-8V
	for commit-inetutils@gnu.org; Tue, 23 Nov 2010 08:16:52 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:40647
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <simon@josefsson.org>) id 1PKsjW-0004gL-6s
	for commit-inetutils@gnu.org; Tue, 23 Nov 2010 08:16:30 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <simon@josefsson.org>) id 1PKsjV-0006Ry-OL
	for commit-inetutils@gnu.org; Tue, 23 Nov 2010 13:16:29 +0000
Received: from jas by vcs-noshell.in.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <jas@savannah.gnu.org>) id 1PKsjQ-0000D0-EG
	for commit-inetutils@gnu.org; Tue, 23 Nov 2010 13:16:24 +0000
To: commit-inetutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4543b88b71d4598a3c9e49d44c59ab5ae54c4848
X-Git-Newrev: 17819c31287e09170f7f8ac81987078f35175b1a
Message-Id: <E1PKsjQ-0000D0-EG@vcs-noshell.in.savannah.gnu.org>
From: Simon Josefsson <simon@josefsson.org>
Date: Tue, 23 Nov 2010 13:16:24 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_8-72-g17819c3
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Nov 2010 13:17:21 -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  17819c31287e09170f7f8ac81987078f35175b1a (commit)
       via  f8e234b23ae3296d34f943290a9feacdab1ea33a (commit)
       via  6e41c83785f48dcfc1937015e01e3a3e4884dad0 (commit)
      from  4543b88b71d4598a3c9e49d44c59ab5ae54c4848 (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=17819c31287e09170f7f8ac81987078f35175b1a


commit 17819c31287e09170f7f8ac81987078f35175b1a
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Mon Nov 22 16:54:34 2010 +0100

    traceroute: Make immune against `RES_OPTIONS=inet6'.
    
    Signed-off-by: Simon Josefsson <simon@josefsson.org>

diff --git a/ChangeLog b/ChangeLog
index bf7ab0b..e5eebd9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2010-11-22  Mats Erik Andersson <gnu@gisladisker.se>
 
+	* src/traceroute.c: Include "xalloc.h".
+	* src/traceroute.c (host): Deleted variable.
+	(hostname, addrstr): New variables;
+	(parse_opt) [ARGP_KEY_ARG]: Abolish gethostbyname. Only use
+	xstrdup to copy argument.
+	(main): Use getaddrinfo and getnameinfo for name resolving.
+	New variables HINTS and *RES of type `struct addrinfo'.
+
+2010-11-22  Mats Erik Andersson <gnu@gisladisker.se>
+
 	Resolve a double free issue.  Leads to segmentation faults.
 
 	* src/inetd.c (nextconfig): Do not use `freeconfig' unconditionally.
diff --git a/src/traceroute.c b/src/traceroute.c
index 432e6e1..9caeb00 100644
--- a/src/traceroute.c
+++ b/src/traceroute.c
@@ -47,6 +47,7 @@
 #include <argp.h>
 #include <icmp.h>
 
+#include "xalloc.h"
 #include "libinetutils.h"
 
 #define TRACE_UDP_PORT 33434
@@ -87,7 +88,8 @@ char *get_hostname (struct in_addr *addr);
 
 int stop = 0;
 int pid = 0;
-struct hostent *host;
+static char *hostname = NULL;
+char addrstr[INET6_ADDRSTRLEN];
 struct sockaddr_in dest;
 
 static enum trace_type opt_type = TRACE_ICMP;
@@ -158,9 +160,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
 
     case ARGP_KEY_ARG:
       host_is_given = true;
-      host = gethostbyname (arg);
-      if (host == NULL)
-        error (EXIT_FAILURE, 0, "unknown host");
+      hostname = xstrdup(arg);
       break;
 
     case ARGP_KEY_SUCCESS:
@@ -180,6 +180,7 @@ static struct argp argp = {argp_options, parse_opt, args_doc, doc};
 int
 main (int argc, char **argv)
 {
+  struct addrinfo hints, *res;
   trace_t trace;
 
   set_program_name (argv[0]);
@@ -188,15 +189,28 @@ main (int argc, char **argv)
   iu_argp_init ("traceroute", program_authors);
   argp_parse (&argp, argc, argv, 0, NULL, NULL);
 
+  /* Hostname lookup first for better information */
+  memset (&hints, 0, sizeof (hints));
+  hints.ai_family = AF_INET;
+  hints.ai_flags = AI_CANONNAME;
+
+  if ((hostname == NULL) || (*hostname == '\0')
+      || getaddrinfo (hostname, NULL, &hints, &res))
+    error (EXIT_FAILURE, 0, "unknown host");
+
   if (geteuid () != 0)
     error (EXIT_FAILURE, EPERM, "insufficient permissions");
 
-  dest.sin_addr = *(struct in_addr *) host->h_addr;
-  dest.sin_family = AF_INET;
+  memcpy (&dest, res->ai_addr, res->ai_addrlen);
   dest.sin_port = htons (opt_port);
 
+  getnameinfo (res->ai_addr, res->ai_addrlen, addrstr, sizeof (addrstr),
+                  NULL, 0, NI_NUMERICHOST);
+
   printf ("traceroute to %s (%s), %d hops max\n",
-	  host->h_name, inet_ntoa (dest.sin_addr), opt_max_hops);
+	  res->ai_canonname, addrstr, opt_max_hops);
+
+  freeaddrinfo (res);
 
   trace_init (&trace, dest, opt_type);
 

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


commit f8e234b23ae3296d34f943290a9feacdab1ea33a
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Mon Nov 22 15:55:16 2010 +0100

    inetd: Registration of services with multiple nodes.
    
    Signed-off-by: Simon Josefsson <simon@josefsson.org>

diff --git a/ChangeLog b/ChangeLog
index 05b7e56..bf7ab0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2010-11-22  Mats Erik Andersson <gnu@gisladisker.se>
 
+	Resolve a double free issue.  Leads to segmentation faults.
+
+	* src/inetd.c (nextconfig): Do not use `freeconfig' unconditionally.
+	Condition on SERV_NODE, which needs partial memory deallocation.
+
+2010-11-22  Mats Erik Andersson <gnu@gisladisker.se>
+
 	Partially revert changes introduced in fd64a202.
 
 	* src/inetd.c (nextconfig): Call `enter' for TCPMUX services,
diff --git a/src/inetd.c b/src/inetd.c
index 1af29d4..c3cec04 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -1168,7 +1168,10 @@ nextconfig (const char *file)
       else
 	expand_enter (sep);
 
-      freeconfig (sep);
+      if (serv_node)
+	free (sep->se_node);
+      else
+	freeconfig (sep);
     }
   endconfig (fconfig);
   /*

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


commit 6e41c83785f48dcfc1937015e01e3a3e4884dad0
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Mon Nov 22 15:43:53 2010 +0100

    inetd: Distinct service registration for TCPMUX.
    
    Signed-off-by: Simon Josefsson <simon@josefsson.org>

diff --git a/ChangeLog b/ChangeLog
index daf9708..05b7e56 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2010-11-22  Mats Erik Andersson <gnu@gisladisker.se>
 
+	Partially revert changes introduced in fd64a202.
+
+	* src/inetd.c (nextconfig): Call `enter' for TCPMUX services,
+	but `expand_enter' for every other service.
+
+2010-11-22  Mats Erik Andersson <gnu@gisladisker.se>
+
 	* src/inetd.c (inetd_getaddrinfo): Do not use AI_V4MAPPED with
 	address family AF_INET.  FreeBSD fails otherwise.
 
diff --git a/src/inetd.c b/src/inetd.c
index ce7592e..1af29d4 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -1163,8 +1163,11 @@ nextconfig (const char *file)
 	{
 	  sep->se_fd = -1;
 	  sep->se_checked = 1;
+	  enter (sep);
 	}
-      expand_enter (sep);
+      else
+	expand_enter (sep);
+
       freeconfig (sep);
     }
   endconfig (fconfig);

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

Summary of changes:
 ChangeLog        |   24 ++++++++++++++++++++++++
 src/inetd.c      |   10 ++++++++--
 src/traceroute.c |   28 +++++++++++++++++++++-------
 3 files changed, 53 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed Nov 24 13:24:35 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1PLK1C-0008QW-St
	for mharc-commit-inetutils@gnu.org; Wed, 24 Nov 2010 13:24:35 -0500
Received: from [140.186.70.92] (port=60579 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1PLK17-0008NL-OG
	for commit-inetutils@gnu.org; Wed, 24 Nov 2010 13:24:31 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1PLK15-0000LY-RC
	for commit-inetutils@gnu.org; Wed, 24 Nov 2010 13:24:29 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:41766
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1PLK15-0000LS-PP
	for commit-inetutils@gnu.org; Wed, 24 Nov 2010 13:24:27 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gnu@gisladisker.se>) id 1PLK15-0001N9-G5
	for commit-inetutils@gnu.org; Wed, 24 Nov 2010 18:24:27 +0000
Received: from meand by vcs-noshell.in.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <meand@savannah.gnu.org>) id 1PLK15-0000vH-5w
	for commit-inetutils@gnu.org; Wed, 24 Nov 2010 18:24:27 +0000
To: commit-inetutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 17819c31287e09170f7f8ac81987078f35175b1a
X-Git-Newrev: 37017d761e09d6f71f04196de9220b24326be9f3
Message-Id: <E1PLK15-0000vH-5w@vcs-noshell.in.savannah.gnu.org>
From: Mats Erik Andersson <gnu@gisladisker.se>
Date: Wed, 24 Nov 2010 18:24:27 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_8-74-g37017d7
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/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: <http://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Nov 2010 18:24:31 -0000

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

The branch, master has been updated
       via  37017d761e09d6f71f04196de9220b24326be9f3 (commit)
       via  7c9fd5d4c255c644fa9ed2a44b6e619f2f1e83ee (commit)
      from  17819c31287e09170f7f8ac81987078f35175b1a (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=37017d761e09d6f71f04196de9220b24326be9f3


commit 37017d761e09d6f71f04196de9220b24326be9f3
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed Nov 24 19:22:27 2010 +0100

    addrpeek: New test service for Inetd.

diff --git a/ChangeLog b/ChangeLog
index 81717cf..08c3b23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-11-24  Mats Erik Andersson <gnu@gisladisker.se>
 
+	* tests/addrpeek.c: New file.
+	* tests/Makefile.am: Register `addrpeek' using
+	`check_PROGRAMS', but conditioned on `ENABLE_inetd'.
+
+2010-11-24  Mats Erik Andersson <gnu@gisladisker.se>
+
 	* src/inetd.c (prepenv): New prototype:
 	`prepenv(int, struct sockaddr *, socklen_t)'.
 	(prepenv): Change type of IP to `char []' of fixed length.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index cce19ee..1327c5e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -21,6 +21,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/libinetutils -I$(top_srcdir)/lib
 LDADD = -L../libinetutils -linetutils  ../lib/libgnu.a
 
 check_PROGRAMS = localhost
+if ENABLE_inetd
+check_PROGRAMS += addrpeek
+endif
+
 dist_check_SCRIPTS =
 if ENABLE_ping
 dist_check_SCRIPTS += ping-localhost.sh
diff --git a/tests/addrpeek.c b/tests/addrpeek.c
new file mode 100644
index 0000000..02319b2
--- /dev/null
+++ b/tests/addrpeek.c
@@ -0,0 +1,135 @@
+/* addrpeek - testing service for Inetd: remote address, environment vars
+  Copyright (C) 2010 Free Software Foundation, Inc.
+
+  This file is part of GNU Inetutils.
+
+  GNU Inetutils is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or (at
+  your option) any later version.
+
+  GNU Inetutils is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see `http://www.gnu.org/licenses/'. */
+
+/* Written by Mats Erik Andersson.  */
+
+/* Addrpeek is a test client for examining Inetd, primarily TCP traffic.
+ * The client executes all those tasks that were listed as server
+ * arguments in the configuration file for Inetd:
+ *
+ *    addr : Reply with "Your address is $IP."
+ *    env  : Reply with all known environment variables and their values.
+ *
+ * Reasonable entries in `inetf.conf' could be
+ *
+ *    # Return numerical address of the calling client.
+ *    #
+ *    7890 stream tcp nowait nobody /tmp/addrpeek addrpeek addr
+ *    7890 stream tcp6 nowait nobody /tmp/addrpeek addrpeek addr
+ *    #
+ *    # Display all environment variables in use, and append
+ *    # the client's address at the end.
+ *    #
+ *    tcpmux stream tcp nowait nobody internal
+ *    tcpmux stream tcp6 nowait nobody internal
+ *    tcpmux/env stream tcp nowait nobody /tmp/addrpeek addrkeep env addr
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+
+#ifndef SEPARATOR
+# define SEPARATOR "\n"
+#endif
+
+/* TODO Develop some reliable test for the existence of ENVIRON.
+ * It is detectable using HAVE_DECL_ENVIRON for GNU/Linux and
+ * GNU/kFreeBSD. It is present, but not detectable for OpenBSD
+ * and FreeBSD.
+ */
+extern char **environ;
+
+static void
+write_address (int fd)
+{
+  int type;
+  size_t len;
+  socklen_t sslen;
+  char addr[INET6_ADDRSTRLEN], answer[128];
+  struct sockaddr_storage ss;
+
+  sslen = sizeof (type);
+  getsockopt (fd, SOL_SOCKET, SO_TYPE, &type, &sslen);
+
+  if (type == SOCK_STREAM)
+    {
+      sslen = sizeof (ss);
+      getpeername (fd, (struct sockaddr *) &ss, &sslen);
+    }
+  else if (type == SOCK_DGRAM)
+    {
+      sslen = sizeof (ss);
+      recvfrom (fd, answer, sizeof (answer), 0,
+                  (struct sockaddr *) &ss, &sslen);
+      shutdown (fd, SHUT_RD);
+    }
+  else
+      return;
+
+  getnameinfo ((struct sockaddr *) &ss, sslen, addr, sizeof (addr),
+                NULL, 0, NI_NUMERICHOST);
+
+  len = snprintf (answer, sizeof (answer),
+                  "Your address is %s." SEPARATOR, addr);
+
+  sendto (fd, answer, len, 0, (struct sockaddr *) &ss, sslen);
+}
+
+void
+write_environment (int fd, char *envp[])
+{
+  for ( ; *envp; ++envp)
+    {
+      write (fd, *envp, strlen (*envp));
+      write (fd, SEPARATOR, strlen (SEPARATOR));
+    }
+}
+
+int
+main (int argc, char *argv[])
+{
+  int j;
+
+  for (j = 1; j < argc; ++j)
+    {
+      if (strncmp (argv[j], "addr", strlen ("addr")) == 0)
+        {
+          write_address (STDOUT_FILENO);
+          continue;
+        }
+
+      if (strncmp (argv[j], "env", strlen ("env")) == 0)
+        {
+          write_environment (STDOUT_FILENO, environ);
+          continue;
+        }
+    }
+
+  close (STDIN_FILENO);
+  close (STDOUT_FILENO);
+  close (STDERR_FILENO);
+
+  return EXIT_SUCCESS;
+}

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


commit 7c9fd5d4c255c644fa9ed2a44b6e619f2f1e83ee
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed Nov 24 19:19:12 2010 +0100

    inetd: Environment variables also for IPv6.

diff --git a/ChangeLog b/ChangeLog
index e5eebd9..81717cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2010-11-24  Mats Erik Andersson <gnu@gisladisker.se>
+
+	* src/inetd.c (prepenv): New prototype:
+	`prepenv(int, struct sockaddr *, socklen_t)'.
+	(prepenv): Change type of IP to `char []' of fixed length.
+	Delete HOST.  New integer variable RET.
+	Make type of SA_SERVER depend on macro IPV6, either
+	`struct sockaddr_storage' or `struct sockaddr_in'.
+	(prepenv): Eliminate use of `inet_ntoa' and `gethostbyaddr'
+	by new calls to `getnameinfo', with and without restiction
+	to numeric results.  Debugging output for three select
+	environment variables.
+	(main): Make type of SA_CLIENT depend on macro IPV6, either
+	`struct sockaddr_storage' or `struct sockaddr_in'.  Adaptions
+	to the new prototype for `prepenv'.
+
 2010-11-22  Mats Erik Andersson <gnu@gisladisker.se>
 
 	* src/traceroute.c: Include "xalloc.h".
diff --git a/src/inetd.c b/src/inetd.c
index c3cec04..625ebff 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -1696,15 +1696,21 @@ tcpmux (int s, struct servtab *sep)
 
 /* Set TCP environment variables, modelled after djb's ucspi-tcp tools:
    http://cr.yp.to/ucspi-tcp/environment.html
-   FIXME: This needs support for IPv6.
 */
 void
-prepenv (int ctrl, struct sockaddr_in sa_client)
+prepenv (int ctrl, struct sockaddr *sa_client, socklen_t sa_len)
 {
   char str[16];
-  char *ip;
-  struct hostent *host;
+  /* IP is used both for numeric addresses and for symbolic ones.
+   * Being statically allocated, and only for logging purposes,
+   * a full MAXPATHLEN is exaggerated, so a compromise is made.  */
+  char ip[4 * INET6_ADDRSTRLEN];
+  int ret;
+#ifdef IPV6
+  struct sockaddr_storage sa_server;
+#else
   struct sockaddr_in sa_server;
+#endif
   socklen_t len = sizeof (sa_server);
 
   setenv ("PROTO", "TCP", 1);
@@ -1719,47 +1725,58 @@ prepenv (int ctrl, struct sockaddr_in sa_client)
     syslog (LOG_WARNING, "getsockname(): %m");
   else
     {
-      ip = inet_ntoa (sa_server.sin_addr);
-      if (ip)
+      ret = getnameinfo ((struct sockaddr *) &sa_server, len,
+			  ip, sizeof (ip), str, sizeof (str),
+			  NI_NUMERICHOST | NI_NUMERICSERV);
+      if (ret == 0)
 	{
 	  if (setenv ("TCPLOCALIP", ip, 1) < 0)
 	    syslog (LOG_WARNING, "setenv (TCPLOCALIP): %m");
-	}
+	  else if (debug)
+	    fprintf (stderr, "Assigned TCPLOCALIP = %s\n", ip);
 
-      snprintf (str, sizeof (str), "%d", ntohs (sa_server.sin_port));
-      setenv ("TCPLOCALPORT", str, 1);
+	  if (setenv ("TCPLOCALPORT", str, 1) < 0)
+	    syslog (LOG_WARNING, "setenv (TCPLOCALPORT): %m");
+	}
+      else
+	syslog (LOG_WARNING, "getnameinfo: %s", gai_strerror (ret));
 
       if (resolve_option)
 	{
-	  if ((host = gethostbyaddr ((char *) &sa_server.sin_addr,
-				     sizeof (sa_server.sin_addr),
-				     AF_INET)) == NULL)
-	    syslog (LOG_WARNING, "gethostbyaddr: %m");
-	  else if (setenv ("TCPLOCALHOST", host->h_name, 1) < 0)
+	  ret = getnameinfo ((struct sockaddr *) &sa_server, len,
+			      ip, sizeof (ip), NULL, 0, 0);
+	  if (ret != 0)
+	    syslog (LOG_WARNING, "getnameinfo: %s", gai_strerror (ret));
+	  else if (setenv ("TCPLOCALHOST", ip, 1) < 0)
 	    syslog (LOG_WARNING, "setenv(TCPLOCALHOST): %m");
 	}
     }
 
-  ip = inet_ntoa (sa_client.sin_addr);
-  if (ip)
+  ret = getnameinfo (sa_client, sa_len, ip, sizeof (ip), str, sizeof (str),
+		      NI_NUMERICHOST | NI_NUMERICSERV);
+  if (ret == 0)
     {
       if (setenv ("TCPREMOTEIP", ip, 1) < 0)
 	syslog (LOG_WARNING, "setenv(TCPREMOTEIP): %m");
-    }
+      else if (debug)
+	fprintf (stderr, "Assigned TCPREMOTEIP = %s\n", ip);
 
-  snprintf (str, sizeof (str), "%d", ntohs (sa_client.sin_port));
-  if (setenv ("TCPREMOTEPORT", str, 1) < 0)
-    syslog (LOG_WARNING, "setenv(TCPREMOTEPORT): %m");
+      if (setenv ("TCPREMOTEPORT", str, 1) < 0)
+	syslog (LOG_WARNING, "setenv(TCPREMOTEPORT): %m");
 
-  if (resolve_option)
-    {
-      if ((host = gethostbyaddr ((char *) &sa_client.sin_addr,
-				 sizeof (sa_client.sin_addr),
-				 AF_INET)) == NULL)
-	syslog (LOG_WARNING, "gethostbyaddr: %m");
-      else if (setenv ("TCPREMOTEHOST", host->h_name, 1) < 0)
-	syslog (LOG_WARNING, "setenv(TCPREMOTEHOST): %m");
+      if (resolve_option)
+	{
+	  ret = getnameinfo (sa_client, sa_len, ip, sizeof (ip), NULL, 0, 0);
+	  if (ret != 0)
+	    syslog (LOG_WARNING, "getnameinfo: %s", gai_strerror (ret));
+	  else if (setenv ("TCPREMOTEHOST", ip, 1) < 0)
+	    syslog (LOG_WARNING, "setenv(TCPREMOTEHOST): %m");
+	  else if (debug)
+	    fprintf (stderr, "Assigned TCPREMOTEHOST = %s\n", ip);
+	}
     }
+  else
+    syslog (LOG_WARNING, "getnameinfo: %s", gai_strerror (ret));
 }
 
 
@@ -1870,7 +1887,11 @@ main (int argc, char *argv[], char *envp[])
 	      fprintf (stderr, "someone wants %s\n", sep->se_service);
 	    if (!sep->se_wait && sep->se_socktype == SOCK_STREAM)
 	      {
+#ifdef IPV6
+		struct sockaddr_storage sa_client;
+#else
 		struct sockaddr_in sa_client;
+#endif
 		socklen_t len = sizeof (sa_client);
 
 		ctrl = accept (sep->se_fd, (struct sockaddr *) &sa_client,
@@ -1885,7 +1906,7 @@ main (int argc, char *argv[], char *envp[])
 		    continue;
 		  }
 		if (env_option)
-		  prepenv (ctrl, sa_client);
+		  prepenv (ctrl, (struct sockaddr *) &sa_client, len);
 	      }
 	    else
 	      ctrl = sep->se_fd;

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

Summary of changes:
 ChangeLog         |   22 +++++++++
 src/inetd.c       |   79 ++++++++++++++++++++-----------
 tests/Makefile.am |    4 ++
 tests/addrpeek.c  |  135 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 211 insertions(+), 29 deletions(-)
 create mode 100644 tests/addrpeek.c


hooks/post-receive
-- 
GNU Inetutils 


