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
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;
}