diff options
author | dim <dim@FreeBSD.org> | 2012-08-06 18:44:59 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-06 18:44:59 +0000 |
commit | e55724fcb2f630d9fabf2eb0f3d6e1b1aaf99381 (patch) | |
tree | 4e9638f7b7ff8d2d3932582b60c76239f8111630 /lib | |
parent | 74a518dd3c33db9ca48c1cb01d6e0a71528e7845 (diff) | |
download | FreeBSD-src-e55724fcb2f630d9fabf2eb0f3d6e1b1aaf99381.zip FreeBSD-src-e55724fcb2f630d9fabf2eb0f3d6e1b1aaf99381.tar.gz |
Fix an instance in pam_krb5(8), where the variable 'user' could be used
uninitialized.
Found by: clang 3.2
Reviewed by: des
MFC after: 1 week
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libpam/modules/pam_unix/pam_unix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libpam/modules/pam_unix/pam_unix.c b/lib/libpam/modules/pam_unix/pam_unix.c index 415004a..5881ecf 100644 --- a/lib/libpam/modules/pam_unix/pam_unix.c +++ b/lib/libpam/modules/pam_unix/pam_unix.c @@ -94,13 +94,13 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, 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); |