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
This commit is contained in:
parent
2251b30757
commit
1843e23c48
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user