From: Eero Häkkinen Date: Fri, 15 Sep 2023 21:55:08 +0000 (+0300) Subject: Expose SSH_AUTH_INFO_0 always to PAM auth modules. X-Git-Tag: V_9_8_P1~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2c0bdd3e96b3ef66d77fccb85ff4962dc76caf0;p=thirdparty%2Fopenssh-portable.git Expose SSH_AUTH_INFO_0 always to PAM auth modules. This changes SSH_AUTH_INFO_0 to be exposed to PAM auth modules also when a password authentication method is in use and not only when a keyboard-interactive authentication method is in use. --- diff --git a/auth-pam.c b/auth-pam.c index b49d415e7..e143304e3 100644 --- a/auth-pam.c +++ b/auth-pam.c @@ -1375,6 +1375,8 @@ sshpam_auth_passwd(Authctxt *authctxt, const char *password) fatal("PAM: %s: failed to set PAM_CONV: %s", __func__, pam_strerror(sshpam_handle, sshpam_err)); + expose_authinfo(__func__); + sshpam_err = pam_authenticate(sshpam_handle, flags); sshpam_password = NULL; free(fake);