diff options
| author | Lars Ingebrigtsen | 2021-11-07 21:34:41 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-11-07 21:34:41 +0100 |
| commit | 14bbebcf1d217dcfc679fc95f195867cdf267f89 (patch) | |
| tree | 7d13803cf7d8d1e1c747c475c6dfa99dc0fc9ac9 | |
| parent | 86fc154317c605a4f6434694d8e754446d37b733 (diff) | |
| download | emacs-14bbebcf1d217dcfc679fc95f195867cdf267f89.tar.gz emacs-14bbebcf1d217dcfc679fc95f195867cdf267f89.zip | |
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).
| -rw-r--r-- | lisp/comint.el | 6 | ||||
| -rw-r--r-- | test/lisp/comint-tests.el | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index c114bdf758a..adae971eff2 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -385,10 +385,12 @@ This variable is buffer-local." | |||
| 385 | "\\(?: [[:alpha:]]+ .+\\)?[[:blank:]]*[::៖][[:space:]]*\\'" | 385 | "\\(?: [[:alpha:]]+ .+\\)?[[:blank:]]*[::៖][[:space:]]*\\'" |
| 386 | ;; The ccrypt encryption dialogue doesn't end with a colon, so | 386 | ;; The ccrypt encryption dialogue doesn't end with a colon, so |
| 387 | ;; treat it specially. | 387 | ;; treat it specially. |
| 388 | "\\|^Enter encryption key: (repeat) *\\'") | 388 | "\\|^Enter encryption key: (repeat) *\\'" |
| 389 | ;; openssh-8.6p1 format: "(user@host) Password:". | ||
| 390 | "\\|^([^)@ \t\n]+@[^)@ \t\n]+) Password: *\\'") | ||
| 389 | "Regexp matching prompts for passwords in the inferior process. | 391 | "Regexp matching prompts for passwords in the inferior process. |
| 390 | This is used by `comint-watch-for-password-prompt'." | 392 | This is used by `comint-watch-for-password-prompt'." |
| 391 | :version "28.1" | 393 | :version "29.1" |
| 392 | :type 'regexp | 394 | :type 'regexp |
| 393 | :group 'comint) | 395 | :group 'comint) |
| 394 | 396 | ||
diff --git a/test/lisp/comint-tests.el b/test/lisp/comint-tests.el index e1bac81a185..0bd5c1e9d15 100644 --- a/test/lisp/comint-tests.el +++ b/test/lisp/comint-tests.el | |||
| @@ -43,6 +43,7 @@ | |||
| 43 | "PIN for user:" ; Bug#35523 | 43 | "PIN for user:" ; Bug#35523 |
| 44 | "Password (again):" | 44 | "Password (again):" |
| 45 | "Enter password:" | 45 | "Enter password:" |
| 46 | "(user@host) Password: " ; openssh-8.6p1 | ||
| 46 | "Current password:" ; "passwd" (to change password) in Debian. | 47 | "Current password:" ; "passwd" (to change password) in Debian. |
| 47 | "Enter encryption key: " ; ccrypt | 48 | "Enter encryption key: " ; ccrypt |
| 48 | "Enter decryption key: " ; ccrypt | 49 | "Enter decryption key: " ; ccrypt |