Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3-0]: src/libexec/ftpd Pull up following revision(s) (requested b...



details:   https://anonhg.NetBSD.org/src/rev/45018403d967
branches:  netbsd-3-0
changeset: 579503:45018403d967
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu Sep 18 19:22:38 2008 +0000

description:
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

diffstat:

 libexec/ftpd/ftpd.c |  15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r 1f75e9bbb3d7 -r 45018403d967 libexec/ftpd/ftpd.c
--- a/libexec/ftpd/ftpd.c       Thu Sep 18 19:21:03 2008 +0000
+++ b/libexec/ftpd/ftpd.c       Thu Sep 18 19:22:38 2008 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftpd.c,v 1.164.2.1.2.5 2008/09/18 19:21:03 bouyer Exp $        */
+/*     $NetBSD: ftpd.c,v 1.164.2.1.2.6 2008/09/18 19:22:38 bouyer Exp $        */
 
 /*
  * Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
 #if 0
 static char sccsid[] = "@(#)ftpd.c     8.5 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: ftpd.c,v 1.164.2.1.2.5 2008/09/18 19:21:03 bouyer Exp $");
+__RCSID("$NetBSD: ftpd.c,v 1.164.2.1.2.6 2008/09/18 19:22:38 bouyer Exp $");
 #endif
 #endif /* not lint */
 
@@ -3581,6 +3581,17 @@
                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:



Home | Main Index | Thread Index | Old Index