From: David Mulder Date: Mon, 26 Aug 2024 17:06:31 +0000 (-0600) Subject: Fix pam echo not displayed via ssh X-Git-Tag: tdb-1.4.13~876 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a75cb0e206fac3ed023840d1f38405471372bcb;p=thirdparty%2Fsamba.git Fix pam echo not displayed via ssh Necessary because of OpenSSH bug https://bugzilla.mindrot.org/show_bug.cgi?id=2876 - PAM_TEXT_INFO and PAM_ERROR_MSG conversation not honoured during PAM authentication Signed-off-by: David Mulder Reviewed-by: Alexander Bokovoy --- diff --git a/rust/pam/src/pam/mod.rs b/rust/pam/src/pam/mod.rs index 404ecf124f0..5ed73f7aeda 100755 --- a/rust/pam/src/pam/mod.rs +++ b/rust/pam/src/pam/mod.rs @@ -376,6 +376,12 @@ impl PamHooks for PamHimmelblau { } } + // Necessary because of OpenSSH bug + // https://bugzilla.mindrot.org/show_bug.cgi?id=2876 - + // PAM_TEXT_INFO and PAM_ERROR_MSG conversation not + // honoured during PAM authentication + let _ = conv.send(PAM_PROMPT_ECHO_OFF, "Press enter to continue"); + let mut poll_attempt = 0; loop { thread::sleep(Duration::from_secs(polling_interval.into()));