]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Fix pam echo not displayed via ssh
authorDavid Mulder <dmulder@samba.org>
Mon, 26 Aug 2024 17:06:31 +0000 (11:06 -0600)
committerDavid Mulder <dmulder@samba.org>
Wed, 23 Oct 2024 14:21:34 +0000 (14:21 +0000)
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 <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
rust/pam/src/pam/mod.rs

index 404ecf124f070b6fed49f7e87ac86e2a1506ac15..5ed73f7aeda77d4e0445175ea14b6c0da687f541 100755 (executable)
@@ -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()));