From 8a75cb0e206fac3ed023840d1f38405471372bcb Mon Sep 17 00:00:00 2001 From: David Mulder Date: Mon, 26 Aug 2024 11:06:31 -0600 Subject: [PATCH] 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 --- rust/pam/src/pam/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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()));