]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Expose SSH_AUTH_INFO_0 always to PAM auth modules.
authorEero Häkkinen <Eero+git@xn--Hkkinen-5wa.fi>
Fri, 15 Sep 2023 21:55:08 +0000 (00:55 +0300)
committerDamien Miller <djm@mindrot.org>
Sat, 30 Mar 2024 05:48:04 +0000 (16:48 +1100)
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.

auth-pam.c

index b49d415e7c76928759b06ff42b270d9f7742f293..e143304e3fe0f9da0e8a004e1d29d49d85d5605c 100644 (file)
@@ -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);