emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 14bbebc: Match password prompts from new OpenSSH


From: Lars Ingebrigtsen
Subject: master 14bbebc: Match password prompts from new OpenSSH
Date: Sun, 7 Nov 2021 15:34:50 -0500 (EST)

branch: master
commit 14bbebcf1d217dcfc679fc95f195867cdf267f89
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Match password prompts from new OpenSSH
    
    * lisp/comint.el (comint-password-prompt-regexp): Add support for
    the openssh-8.6p1 "(user@host) Password:" format (bug#51666).
---
 lisp/comint.el            | 6 ++++--
 test/lisp/comint-tests.el | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/comint.el b/lisp/comint.el
index c114bdf..adae971 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -385,10 +385,12 @@ This variable is buffer-local."
    "\\(?: [[:alpha:]]+ .+\\)?[[:blank:]]*[::៖][[:space:]]*\\'"
    ;; The ccrypt encryption dialogue doesn't end with a colon, so
    ;; treat it specially.
-   "\\|^Enter encryption key: (repeat) *\\'")
+   "\\|^Enter encryption key: (repeat) *\\'"
+   ;; openssh-8.6p1 format: "(user@host) Password:".
+   "\\|^([^)@ \t\n]+@[^)@ \t\n]+) Password: *\\'")
   "Regexp matching prompts for passwords in the inferior process.
 This is used by `comint-watch-for-password-prompt'."
-  :version "28.1"
+  :version "29.1"
   :type 'regexp
   :group 'comint)
 
diff --git a/test/lisp/comint-tests.el b/test/lisp/comint-tests.el
index e1bac81..0bd5c1e 100644
--- a/test/lisp/comint-tests.el
+++ b/test/lisp/comint-tests.el
@@ -43,6 +43,7 @@
     "PIN for user:"        ; Bug#35523
     "Password (again):"
     "Enter password:"
+    "(user@host) Password: " ; openssh-8.6p1
     "Current password:"    ; "passwd" (to change password) in Debian.
     "Enter encryption key: " ; ccrypt
     "Enter decryption key: " ; ccrypt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]