* bug#43846: [PATCH] Match OpenBSD doas password prompt in comint
@ 2020-10-07 6:56 Nick Gasson
2020-10-09 4:57 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Nick Gasson @ 2020-10-07 6:56 UTC (permalink / raw)
To: 43846; +Cc: Nick Gasson
* lisp/comint.el (comint-password-prompt-regexp): match OpenBSD doas
password prompt. OpenBSD 5.8 replaced sudo with doas in the base
install.
* test/lisp/comint-tests.el (comint-testsuite-password-strings): test
that the doas password prompt is matched.
---
lisp/comint.el | 3 ++-
test/lisp/comint-tests.el | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/comint.el b/lisp/comint.el
index 6119476..944e1ae 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -362,6 +362,7 @@ This variable is buffer-local."
;; Some implementations of passwd use "Password (again)" as the 2nd prompt.
;; Something called "perforce" uses "Enter password:".
;; OpenVPN prints a prompt like: "Enter Auth Password:".
+;; OpenBSD doas prints "doas (user@host) password:".
;; See ert test `comint-test-password-regexp'.
(defcustom comint-password-prompt-regexp
(concat
@@ -370,7 +371,7 @@ This variable is buffer-local."
'("Enter" "enter" "Enter same" "enter same" "Enter the" "enter the"
"Enter Auth" "enter auth" "Old" "old" "New" "new" "'s" "login"
"Kerberos" "CVS" "UNIX" " SMB" "LDAP" "PEM" "SUDO"
- "[sudo]" "Repeat" "Bad" "Retype")
+ "[sudo]" "doas" "Repeat" "Bad" "Retype")
t)
;; Allow for user name to precede password equivalent (Bug#31075).
" +.*\\)"
diff --git a/test/lisp/comint-tests.el b/test/lisp/comint-tests.el
index 5b59340..923f588 100644
--- a/test/lisp/comint-tests.el
+++ b/test/lisp/comint-tests.el
@@ -39,6 +39,7 @@
"Passphrase for key root@GNU.ORG: " ; plink
"[sudo] password for user:" ; Ubuntu sudo
"[sudo] user 的密码:" ; localized
+ "doas (user@host) password:" ; OpenBSD doas
"PIN for user:" ; Bug#35523
"Password (again):"
"Enter password:"
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#43846: [PATCH] Match OpenBSD doas password prompt in comint
2020-10-07 6:56 bug#43846: [PATCH] Match OpenBSD doas password prompt in comint Nick Gasson
@ 2020-10-09 4:57 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-09 4:57 UTC (permalink / raw)
To: Nick Gasson; +Cc: 43846
Nick Gasson <nick@nickg.me.uk> writes:
> * lisp/comint.el (comint-password-prompt-regexp): match OpenBSD doas
> password prompt. OpenBSD 5.8 replaced sudo with doas in the base
> install.
>
> * test/lisp/comint-tests.el (comint-testsuite-password-strings): test
> that the doas password prompt is matched.
Thanks; applied to Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-09 4:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-07 6:56 bug#43846: [PATCH] Match OpenBSD doas password prompt in comint Nick Gasson
2020-10-09 4:57 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).