NetBSD Problem Report #35449
From shigeya@shigeya.org Sat Jan 20 08:50:42 2007
Return-Path: <shigeya@shigeya.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id DC70A63B8CE
for <gnats-bugs@gnats.NetBSD.org>; Sat, 20 Jan 2007 08:50:41 +0000 (UTC)
Message-Id: <20070120074551.750CD23D5F@pooh.shigeya.org>
Date: Sat, 20 Jan 2007 16:45:51 +0900 (JST)
From: shigeya@wide.ad.jp
Reply-To: shigeya@wide.ad.jp
To: gnats-bugs@NetBSD.org
Cc: shigeya@wide.ad.jp
Subject: ftpd does not register socket address into PAM
X-Send-Pr-Version: 3.95
>Number: 35449
>Category: bin
>Synopsis: ftpd does not register socket address into PAM +FIX
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Jan 20 08:55:00 +0000 2007
>Closed-Date: Sat Jan 20 17:27:27 +0000 2007
>Last-Modified: Thu Sep 18 19:25:07 +0000 2008
>Originator: Shigeya Suzuki
>Release: NetBSD 3.1
>Organization:
USC/ISI
>Environment:
System: NetBSD tallac.isi.edu 3.1 NetBSD 3.1 (GENERIC.MP) #0: Tue Oct 31 04:42:38 UTC 2006 builds@b0.netbsd.org:/home/builds/ab/netbsd-3-1-RELEASE/i386/200610302053Z-obj/home/builds/ab/netbsd-3-1-RELEASE/src/sys/arch/i386/compile/GENERIC.MP i386
Architecture: i386
Machine: i386
>Description:
ftpd does not register socket address into PAM. Thus, it is impossible
to retrieve address from PAM modules. It is possible to retrieve it
by name (RHOST) but it is useful to get socket address.
May be other program need similar change.
>How-To-Repeat:
Try to grab socket address via pam_get_item(pamh, PAM_SOCKADDR,...);
>Fix:
Index: ftpd.c
===================================================================
RCS file: /cvsroot/src/libexec/ftpd/ftpd.c,v
retrieving revision 1.164.2.1
diff -c -r1.164.2.1 ftpd.c
*** ftpd.c 5 Jul 2005 21:48:49 -0000 1.164.2.1
--- ftpd.c 20 Jan 2007 07:34:20 -0000
***************
*** 3580,3585 ****
--- 3580,3596 ----
return -1;
}
+ e = pam_set_item(pamh, PAM_SOCKADDR, &his_addr);
+ if (e != PAM_SUCCESS) {
+ syslog(LOG_ERR, "pam_set_item(PAM_SOCKADDR): %s",
+ pam_strerror(pamh, e));
+ if ((e = pam_end(pamh, e)) != PAM_SUCCESS) {
+ syslog(LOG_ERR, "pam_end: %s", pam_strerror(pamh, e));
+ }
+ pamh = NULL;
+ return -1;
+ }
+
e = pam_authenticate(pamh, 0);
switch (e) {
case PAM_SUCCESS:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: christos@netbsd.org
State-Changed-When: Sat, 20 Jan 2007 12:27:27 -0500
State-Changed-Why:
fixed, thanks
From: Christos Zoulas <christos@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/35449 CVS commit: src/libexec/ftpd
Date: Sat, 20 Jan 2007 17:26:32 +0000 (UTC)
Module Name: src
Committed By: christos
Date: Sat Jan 20 17:26:32 UTC 2007
Modified Files:
src/libexec/ftpd: ftpd.c
Log Message:
PR/35449: Shigeya Suzuki: ftpd does not register socket address into PAM +FIX
To generate a diff of this commit:
cvs rdiff -r1.178 -r1.179 src/libexec/ftpd/ftpd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/35449 CVS commit: [netbsd-4-0] src/libexec/ftpd
Date: Thu, 18 Sep 2008 18:09:22 +0000 (UTC)
Module Name: src
Committed By: bouyer
Date: Thu Sep 18 18:09:22 UTC 2008
Modified Files:
src/libexec/ftpd [netbsd-4-0]: ftpd.c
Log Message:
Pull up following revision(s) (requested by lukem in ticket #1199):
libexec/ftpd/ftpd.c: revision 1.179
PR/35449: Shigeya Suzuki: ftpd does not register socket address into PAM +FIX
To generate a diff of this commit:
cvs rdiff -r1.177 -r1.177.6.1 src/libexec/ftpd/ftpd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/35449 CVS commit: [netbsd-4] src/libexec/ftpd
Date: Thu, 18 Sep 2008 18:10:30 +0000 (UTC)
Module Name: src
Committed By: bouyer
Date: Thu Sep 18 18:10:30 UTC 2008
Modified Files:
src/libexec/ftpd [netbsd-4]: ftpd.c
Log Message:
Pull up following revision(s) (requested by lukem in ticket #1199):
libexec/ftpd/ftpd.c: revision 1.179
PR/35449: Shigeya Suzuki: ftpd does not register socket address into PAM +FIX
To generate a diff of this commit:
cvs rdiff -r1.177 -r1.177.2.1 src/libexec/ftpd/ftpd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/35449 CVS commit: [netbsd-3] src/libexec/ftpd
Date: Thu, 18 Sep 2008 19:22:25 +0000 (UTC)
Module Name: src
Committed By: bouyer
Date: Thu Sep 18 19:22:25 UTC 2008
Modified Files:
src/libexec/ftpd [netbsd-3]: ftpd.c
Log Message:
Pull up following revision(s) (requested by lukem in ticket #1963):
libexec/ftpd/ftpd.c: revision 1.179
PR/35449: Shigeya Suzuki: ftpd does not register socket address into PAM +FIX
To generate a diff of this commit:
cvs rdiff -r1.164.2.6 -r1.164.2.7 src/libexec/ftpd/ftpd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/35449 CVS commit: [netbsd-3-0] src/libexec/ftpd
Date: Thu, 18 Sep 2008 19:22:38 +0000 (UTC)
Module Name: src
Committed By: bouyer
Date: Thu Sep 18 19:22:38 UTC 2008
Modified Files:
src/libexec/ftpd [netbsd-3-0]: ftpd.c
Log Message:
Pull up following revision(s) (requested by lukem in ticket #1963):
libexec/ftpd/ftpd.c: revision 1.179
PR/35449: Shigeya Suzuki: ftpd does not register socket address into PAM +FIX
To generate a diff of this commit:
cvs rdiff -r1.164.2.1.2.5 -r1.164.2.1.2.6 src/libexec/ftpd/ftpd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/35449 CVS commit: [netbsd-3-1] src/libexec/ftpd
Date: Thu, 18 Sep 2008 19:22:44 +0000 (UTC)
Module Name: src
Committed By: bouyer
Date: Thu Sep 18 19:22:44 UTC 2008
Modified Files:
src/libexec/ftpd [netbsd-3-1]: ftpd.c
Log Message:
Pull up following revision(s) (requested by lukem in ticket #1963):
libexec/ftpd/ftpd.c: revision 1.179
PR/35449: Shigeya Suzuki: ftpd does not register socket address into PAM +FIX
To generate a diff of this commit:
cvs rdiff -r1.164.2.1.4.5 -r1.164.2.1.4.6 src/libexec/ftpd/ftpd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.