bin/62036: src/libexec/ftpd/ftpd.c: local pam_handle_t shadows
global
Eric van Gyzen
vangyzen at stat.duke.edu
Wed Jan 28 09:00:43 PST 2004
>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:
More information about the freebsd-bugs
mailing list