From unknown Tue Jun 17 22:27:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#43846: [PATCH] Match OpenBSD doas password prompt in comint Resent-From: Nick Gasson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Oct 2020 14:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43846 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 43846@debbugs.gnu.org Cc: Nick Gasson X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160207945817060 (code B ref -1); Wed, 07 Oct 2020 14:05:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Oct 2020 14:04:18 +0000 Received: from localhost ([127.0.0.1]:57626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQA3D-0004R4-TY for submit@debbugs.gnu.org; Wed, 07 Oct 2020 10:04:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:59086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQ3sH-0004Wi-N7 for submit@debbugs.gnu.org; Wed, 07 Oct 2020 03:28:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQ3sH-00021R-A5 for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 03:28:33 -0400 Received: from outmail149043.authsmtp.co.uk ([62.13.149.43]:59152) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQ3sE-0001uO-Gg for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 03:28:32 -0400 Received: from mail-c233.authsmtp.com (mail-c233.authsmtp.com [62.13.128.233]) by punt18.authsmtp.com. (8.15.2/8.15.2) with ESMTP id 0976ugnL037526 for ; Wed, 7 Oct 2020 07:56:42 +0100 (BST) (envelope-from nick@nickg.me.uk) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nickg.me.uk; s=authsmtp; t=1602053802; bh=+PWnjWaYVAeyH/1K3ZNX/voMSiNDZ77bs9FpX2iSI5Y=; h=Date:From:To:Subject; b=PQy52GjdO1pLtbiBEAs/8IPT7DY8muiedzuNJRPzfP9Eh+MqG+gDZ/9eGzCuOQCFg qWeFQ1MqyAXne5LJTC5+Pq/OO4IUr6hYVix0uT1BbOTivp7ENr73vGy2d0y424UJJM F8hdOpXfZToKGnsVO4aNqHSa+bGcRVBpAopwci0E= Received: from asterix.nickg.me.uk (asterix.nickg.me.uk [85.119.83.229]) (authenticated bits=0) by mail.authsmtp.com (8.15.2/8.15.2) with ESMTPA id 0976uetU011751 for ; Wed, 7 Oct 2020 07:56:41 +0100 (BST) (envelope-from nick@nickg.me.uk) Received: from bertha.nickg.me.uk (unknown [120.204.58.13]) by asterix.nickg.me.uk (Postfix) with ESMTPSA id 906A5860B0; Wed, 7 Oct 2020 06:56:38 +0000 (UTC) Received: from localhost (bertha.nickg.me.uk [local]) by bertha.nickg.me.uk (OpenSMTPD) with ESMTPA id 636a9857; Wed, 7 Oct 2020 14:56:34 +0800 (CST) From: Nick Gasson Date: Wed, 7 Oct 2020 14:56:18 +0800 Message-Id: <20201007065618.43170-1-nick@nickg.me.uk> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Server-Quench: 40bd05ae-086a-11eb-80b4-84349711df28 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd0YgkXC1ZTTQ8Z IiUFByxPDwAoYABP FxUeIk5VJkdMWAFY OV1yIVxOdloGSkcB BHl0CBBLUl1zWXN1 bABUaw9ZYwRGWhtr UUFXSlFMFgdhHh4E GR5QUhB1cUATPBtw ZEdlW3EVXkBycQh5 QhwAFWhXMHpgYGZO TUFZIlFJeAMYegJN blN7XXQMYDFRZHIu LDcaAxsRCH16IThe QkkqNV8Ua30nVjI7 TgtKBTw0BlICXSl7 NwYhL0YAVEcXek41 NFonRTp/ X-Authentic-SMTP: 61633732313238.1021:7600 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 85.119.83.229/25 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. Received-SPF: pass client-ip=62.13.149.43; envelope-from=nick@nickg.me.uk; helo=outmail149043.authsmtp.co.uk X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/07 02:56:42 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Mailman-Approved-At: Wed, 07 Oct 2020 10:04:14 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * 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 From unknown Tue Jun 17 22:27:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#43846: [PATCH] Match OpenBSD doas password prompt in comint Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Oct 2020 04:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43846 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Nick Gasson Cc: 43846@debbugs.gnu.org Received: via spool by 43846-submit@debbugs.gnu.org id=B43846.160221947731011 (code B ref 43846); Fri, 09 Oct 2020 04:58:02 +0000 Received: (at 43846) by debbugs.gnu.org; 9 Oct 2020 04:57:57 +0000 Received: from localhost ([127.0.0.1]:33908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQkTd-000846-9z for submit@debbugs.gnu.org; Fri, 09 Oct 2020 00:57:57 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQkTc-00083q-4B for 43846@debbugs.gnu.org; Fri, 09 Oct 2020 00:57:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3WqEJOIgXb1B8gx5lRF5LmeDP5bz9+becAi2y7O0h5U=; b=Pn0Ytjziel/Y4S/9CHup3e8kjP xqU+lqvO4fTSgZcxtnVQ2Mwrrakewah/HcZu87GQnF+BtXZJev5zT14RkK2WdUtuGc0ESdZNHFIn6 +SML2pzel8qiPhL50LIRCknuNofu4Lpsi1Y9cU7NFnUH4FBVEVJt6PWeThz3RYxsm+Kg=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kQkTT-0008BD-KW; Fri, 09 Oct 2020 06:57:50 +0200 From: Lars Ingebrigtsen References: <20201007065618.43170-1-nick@nickg.me.uk> X-Now-Playing: Alva Noto and Ryuichi Sakamoto's _Vrioon_: "Noon" Date: Fri, 09 Oct 2020 06:57:46 +0200 In-Reply-To: <20201007065618.43170-1-nick@nickg.me.uk> (Nick Gasson's message of "Wed, 7 Oct 2020 14:56:18 +0800") Message-ID: <87pn5s3sj9.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Nick Gasson 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-p [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Nick Gasson 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 09 00:58:04 2020 Received: (at control) by debbugs.gnu.org; 9 Oct 2020 04:58:04 +0000 Received: from localhost ([127.0.0.1]:33912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQkTk-00084r-Hk for submit@debbugs.gnu.org; Fri, 09 Oct 2020 00:58:04 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQkTj-00084E-8a for control@debbugs.gnu.org; Fri, 09 Oct 2020 00:58:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=J9Fj/aAvK0IMtwc2ijU2q7h88R7dASrWa9oB6CQ0jic=; b=pAFVox5xE4YPuhuKYF5XjQyIWJ WGmnr3WBe38HxiJn3cUjelDAMvNWv8nEKjbkdPkA/CsjNllpQ491XORPx8mEJvZLxABAUCBTy9G7j SvQAPawdSzb3mR6qXQYSTPL/m8toRUM07Ic/igzKtJJUwtTAizD+Ezvby+qZPyyvGyUE=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kQkTb-0008BM-D5 for control@debbugs.gnu.org; Fri, 09 Oct 2020 06:57:57 +0200 Date: Fri, 09 Oct 2020 06:57:54 +0200 Message-Id: <87o8lc3sj1.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #43846 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 43846 fixed close 43846 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 43846 fixed close 43846 28.1 quit