--- hpn-ssh-hpn-18.4.2/auth-pam.c.orig +++ hpn-ssh-hpn-18.4.2/auth-pam.c @@ -1248,12 +1248,19 @@ sshpam_cred_established = 1; return; } + +#ifdef PAM_BUGFIX + /* Server will fatal out when pam_setcred() failed. */ + fatal("PAM: pam_setcred(): %s", pam_strerror(sshpam_handle, + sshpam_err)); +#else /* orig */ if (sshpam_authenticated) fatal("PAM: pam_setcred(): %s", pam_strerror(sshpam_handle, sshpam_err)); else debug("PAM: pam_setcred(): %s", pam_strerror(sshpam_handle, sshpam_err)); +#endif /* PAM_BUGFIX */ } static int @@ -1353,10 +1360,16 @@ if (sshpam_err == PAM_SUCCESS) sshpam_session_open = 1; else { +#ifdef PAM_BUGFIX + /* Server will fatal out when pam_open_session() failed */ + fatal("PAM: pam_open_session(): %s", + pam_strerror(sshpam_handle, sshpam_err)); +#else /* orig */ sshpam_session_open = 0; auth_restrict_session(ssh); error("PAM: pam_open_session(): %s", pam_strerror(sshpam_handle, sshpam_err)); +#endif /* PAM_BUGFIX */ } }