mirror of
https://github.com/openssh/openssh-portable.git
synced 2026-11-06 05:16:43 +00:00
properly bail out when PAM changes username
OpenSSH doesn't support PAM changing its conception of the username via a module calling pam_set_item(h, PAM_USER, ...). We were supposed to bail out here, but I messed up while "fixing" this last time and dropped a return statement. Reported by Mike Damm
This commit is contained in:
1 file changed
+1
@@ -474,6 +474,7 @@ check_pam_user(Authctxt *authctxt)
|
||||
if (strcmp(sshpam_initial_user, pam_user) != 0) {
|
||||
error_f("PAM user \"%s\" does not match previous \"%s\"",
|
||||
pam_user, sshpam_initial_user);
|
||||
return PAM_USER_UNKNOWN;
|
||||
}
|
||||
return PAM_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user