Date: Tue, 21 Aug 2012 19:13:53 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r239521 - stable/9/lib/libpam/modules/pam_unix Message-ID: <201208211913.q7LJDrGd089538@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Tue Aug 21 19:13:53 2012 New Revision: 239521 URL: http://svn.freebsd.org/changeset/base/239521 Log: MFC r239100: Fix an instance in pam_krb5(8), where the variable 'user' could be used uninitialized. Found by: clang 3.2 Reviewed by: des Modified: stable/9/lib/libpam/modules/pam_unix/pam_unix.c Directory Properties: stable/9/lib/libpam/ (props changed) Modified: stable/9/lib/libpam/modules/pam_unix/pam_unix.c ============================================================================== --- stable/9/lib/libpam/modules/pam_unix/pam_unix.c Tue Aug 21 19:11:12 2012 (r239520) +++ stable/9/lib/libpam/modules/pam_unix/pam_unix.c Tue Aug 21 19:13:53 2012 (r239521) @@ -96,13 +96,13 @@ pam_sm_authenticate(pam_handle_t *pamh, const char *pass, *user, *realpw, *prompt; if (openpam_get_option(pamh, PAM_OPT_AUTH_AS_SELF)) { - pwd = getpwnam(getlogin()); + user = getlogin(); } else { retval = pam_get_user(pamh, &user, NULL); if (retval != PAM_SUCCESS) return (retval); - pwd = getpwnam(user); } + pwd = getpwnam(user); PAM_LOG("Got user: %s", user);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208211913.q7LJDrGd089538>