Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jan 2004 11:59:06 -0500 (EST)
From:      Eric van Gyzen <vangyzen@stat.duke.edu>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        des@des.no
Subject:   bin/62036: src/libexec/ftpd/ftpd.c: local pam_handle_t shadows global
Message-ID:  <200401281659.i0SGx6Ig075139@trillian.vangyzen.net>
Resent-Message-ID: <200401281700.i0SH0btH077814@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         62036
>Category:       bin
>Synopsis:       src/libexec/ftpd/ftpd.c: local pam_handle_t shadows global
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 28 09:00:37 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Eric van Gyzen
>Release:        FreeBSD 5.2-RELEASE i386
>Organization:
>Environment:
FreeBSD 5.2-RELEASE

>Description:
The auth_pam function in src/libexec/ftpd/ftpd.c defines a local variable
    pam_handle_t *pamh = NULL;
which shadows the same variable in the global scope.  This seems 
unintentional, because the global pamh is never initialized by pam_start(), 
so the other functions in ftpd.c always operate on a NULL pam_handle_t.

>How-To-Repeat:
N/A

>Fix:

Index: src/libexec/ftpd/ftpd.c
===================================================================
RCS file: /build/cvsroot/src/libexec/ftpd/ftpd.c,v
retrieving revision 1.147
diff -u -r1.147 ftpd.c
--- src/libexec/ftpd/ftpd.c	15 Nov 2003 11:08:26 -0000	1.147
+++ src/libexec/ftpd/ftpd.c	28 Jan 2004 16:54:50 -0000
@@ -1238,7 +1238,6 @@
 static int
 auth_pam(struct passwd **ppw, const char *pass)
 {
-	pam_handle_t *pamh = NULL;
 	const char *tmpl_user;
 	const void *item;
 	int rval;
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401281659.i0SGx6Ig075139>