From unknown Mon Jun 23 07:53:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22542: [PATCH] Add support for `doas` command. Resent-From: Xi Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Feb 2016 09:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22542 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 22542@debbugs.gnu.org Cc: Xi Lu X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14544912071221 (code B ref -1); Wed, 03 Feb 2016 09:21:01 +0000 Received: (at submit) by debbugs.gnu.org; 3 Feb 2016 09:20:07 +0000 Received: from localhost ([127.0.0.1]:57459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQtbb-0000Jc-3L for submit@debbugs.gnu.org; Wed, 03 Feb 2016 04:20:07 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33307) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQtba-0000J5-A9 for submit@debbugs.gnu.org; Wed, 03 Feb 2016 04:20:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQtbU-0004cl-9x for submit@debbugs.gnu.org; Wed, 03 Feb 2016 04:20:01 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQtbU-0004ch-6p for submit@debbugs.gnu.org; Wed, 03 Feb 2016 04:20:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQtbT-00078A-BR for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 04:20:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQtbQ-0004br-4n for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 04:19:59 -0500 Received: from smtpbg65.qq.com ([103.7.28.233]:15432) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQtbP-0004bF-JU for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 04:19:56 -0500 X-QQ-mid: Xesmtp27t1454491183t301t0507 Received: from lx-pc (unknown [61.157.126.25]) by esmtp4.qq.com (ESMTP) with id ; Wed, 03 Feb 2016 17:19:41 +0800 (CST) X-QQ-SSF: B1000000000000F0FF103300000000Z X-QQ-FEAT: nSUdqPGu3ttOSRLS95sEmHRw6YzpcAtoKGQVhX3rrn2IykeuCN2alJ+lZ8J07 RS/5kMZ+WLwnlx0gY7fYOqcXzlp4fJfc4d2klI40qwTEveCCFprhBc923NlKuEf/0CVR64R lFXrF5XhvH44/y7xKkeF2NewdQK9GSTzBk6L3BlHNrIsMo6MnTOlbltSZDVRP3sGDFLandT cSpBCmlxFPNhuMgq+33Tt1ZYkT3lVSIdHJKMxfU9NDiC6BCz1qwnKYYFX0TH5a2c= X-QQ-GoodBg: 0 From: Xi Lu Date: Wed, 3 Feb 2016 17:19:33 +0800 Message-Id: <1454491173-25230-1-git-send-email-lx@shellcodes.org> X-Mailer: git-send-email 2.5.0 X-QQ-SENDSIZE: 520 X-QQ-Bgrelay: 1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.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: -5.0 (-----) In OpenBSD5.8, `sudo` has been replaced with b`doas`. --- lisp/net/tramp-sh.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 1f43747..11aa495 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -300,6 +300,13 @@ tramp-ssh-controlmaster-options (tramp-connection-timeout 10))) ;;;###tramp-autoload (add-to-list 'tramp-methods + '("doas" + (tramp-login-program "doas") + (tramp-login-args (("-u" "%u") ("-s"))) + (tramp-remote-shell "/bin/sh") + (tramp-connection-timeout 10))) +;;;###tramp-autoload +(add-to-list 'tramp-methods '("ksu" (tramp-login-program "ksu") (tramp-login-args (("%u") ("-q"))) @@ -401,7 +408,7 @@ tramp-ssh-controlmaster-options ;;;###tramp-autoload (add-to-list 'tramp-default-user-alist - `(,(concat "\\`" (regexp-opt '("su" "sudo" "ksu")) "\\'") + `(,(concat "\\`" (regexp-opt '("su" "sudo" "ksu" "doas")) "\\'") nil "root")) ;; Do not add "ssh" based methods, otherwise ~/.ssh/config would be ignored. ;; Do not add "plink" based methods, they ask interactively for the user. @@ -471,6 +478,7 @@ tramp-completion-function-alist-putty (tramp-set-completion-function "nc" tramp-completion-function-alist-telnet) (tramp-set-completion-function "su" tramp-completion-function-alist-su) (tramp-set-completion-function "sudo" tramp-completion-function-alist-su) + (tramp-set-completion-function "doas" tramp-completion-function-alist-su) (tramp-set-completion-function "ksu" tramp-completion-function-alist-su) (tramp-set-completion-function "krlogin" tramp-completion-function-alist-rsh) -- 2.5.0 From unknown Mon Jun 23 07:53:31 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Xi Lu Subject: bug#22542: closed (Re: bug#22542: [PATCH] Add support for `doas` command.) Message-ID: References: <877fijm6en.fsf@gmx.de> <1454491173-25230-1-git-send-email-lx@shellcodes.org> X-Gnu-PR-Message: they-closed 22542 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 22542@debbugs.gnu.org Date: Fri, 05 Feb 2016 17:09:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1454692142-8298-1" This is a multi-part message in MIME format... ------------=_1454692142-8298-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #22542: [PATCH] Add support for `doas` command. which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 22542@debbugs.gnu.org. --=20 22542: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D22542 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1454692142-8298-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 22542-done) by debbugs.gnu.org; 5 Feb 2016 17:08:48 +0000 Received: from localhost ([127.0.0.1]:34601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRjsG-00029R-4w for submit@debbugs.gnu.org; Fri, 05 Feb 2016 12:08:48 -0500 Received: from mout.gmx.net ([212.227.15.15]:64596) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRjsE-00029E-S8 for 22542-done@debbugs.gnu.org; Fri, 05 Feb 2016 12:08:47 -0500 Received: from detlef.gmx.de ([87.146.56.6]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MegbQ-1ah3pR3d7Y-00OIYv; Fri, 05 Feb 2016 18:08:34 +0100 From: Michael Albinus To: Xi Lu Subject: Re: bug#22542: [PATCH] Add support for `doas` command. References: <1454491173-25230-1-git-send-email-lx@shellcodes.org> Date: Fri, 05 Feb 2016 18:08:32 +0100 In-Reply-To: <1454491173-25230-1-git-send-email-lx@shellcodes.org> (Xi Lu's message of "Wed, 3 Feb 2016 17:19:33 +0800") Message-ID: <877fijm6en.fsf@gmx.de> User-Ag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+aGbxMZ5UG3FHg7wrqKlY0h1TZquPDyuA RgqkdZQVh4mMp1l6uEbPQx2hnFm9OnVdiI3qVXldMWNhA72AaxQY2a2Tr2X6IU9i03NqeSUhY 9qr+YOy X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22542-done Cc: 22542-done@debbugs.gnu.org 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: -0.7 (/) Xi Lu writes: > In OpenBSD5.8, `sudo` has been replaced with b`doas`. Thanks for the patch, I've installed it in both Tramp and Emacs repositories, in the master branch. Best regards, Michael. ------------=_1454692142-8298-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 3 Feb 2016 09:20:07 +0000 Received: from localhost ([127.0.0.1]:57459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQtbb-0000Jc-3L for submit@debbugs.gnu.org; Wed, 03 Feb 2016 04:20:07 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33307) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQtba-0000J5-A9 for submit@debbugs.gnu.org; Wed, 03 Feb 2016 04:20:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQtbU-0004cl-9x for submit@debbugs.gnu.org; Wed, 03 Feb 2016 04:20:01 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQtbU-0004ch-6p for submit@debbugs.gnu.org; Wed, 03 Feb 2016 04:20:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQtbT-00078A-BR for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 04:20:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQtbQ-0004br-4n for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 04:19:59 -0500 Received: from smtpbg65.qq.com ([103.7.28.233]:15432) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQtbP-0004bF-JU for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 04:19:56 -0500 X-QQ-mid: Xesmtp27t1454491183t301t0507 Received: from lx-pc (unknown [61.157.126.25]) by esmtp4.qq.com (ESMTP) with id ; Wed, 03 Feb 2016 17:19:41 +0800 (CST) X-QQ-SSF: B1000000000000F0FF103300000000Z X-QQ-FEAT: nSUdqPGu3ttOSRLS95sEmHRw6YzpcAtoKGQVhX3rrn2IykeuCN2alJ+lZ8J07 RS/5kMZ+WLwnlx0gY7fYOqcXzlp4fJfc4d2klI40qwTEveCCFprhBc923NlKuEf/0CVR64R lFXrF5XhvH44/y7xKkeF2NewdQK9GSTzBk6L3BlHNrIsMo6MnTOlbltSZDVRP3sGDFLandT cSpBCmlxFPNhuMgq+33Tt1ZYkT3lVSIdHJKMxfU9NDiC6BCz1qwnKYYFX0TH5a2c= X-QQ-GoodBg: 0 From: Xi Lu To: bug-gnu-emacs@gnu.org Subject: [PATCH] Add support for `doas` command. Date: Wed, 3 Feb 2016 17:19:33 +0800 Message-Id: <1454491173-25230-1-git-send-email-lx@shellcodes.org> X-Mailer: git-send-email 2.5.0 X-QQ-SENDSIZE: 520 X-QQ-Bgrelay: 1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: Xi Lu 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: -5.0 (-----) In OpenBSD5.8, `sudo` has been replaced with b`doas`. --- lisp/net/tramp-sh.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 1f43747..11aa495 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -300,6 +300,13 @@ tramp-ssh-controlmaster-options (tramp-connection-timeout 10))) ;;;###tramp-autoload (add-to-list 'tramp-methods + '("doas" + (tramp-login-program "doas") + (tramp-login-args (("-u" "%u") ("-s"))) + (tramp-remote-shell "/bin/sh") + (tramp-connection-timeout 10))) +;;;###tramp-autoload +(add-to-list 'tramp-methods '("ksu" (tramp-login-program "ksu") (tramp-login-args (("%u") ("-q"))) @@ -401,7 +408,7 @@ tramp-ssh-controlmaster-options ;;;###tramp-autoload (add-to-list 'tramp-default-user-alist - `(,(concat "\\`" (regexp-opt '("su" "sudo" "ksu")) "\\'") + `(,(concat "\\`" (regexp-opt '("su" "sudo" "ksu" "doas")) "\\'") nil "root")) ;; Do not add "ssh" based methods, otherwise ~/.ssh/config would be ignored. ;; Do not add "plink" based methods, they ask interactively for the user. @@ -471,6 +478,7 @@ tramp-completion-function-alist-putty (tramp-set-completion-function "nc" tramp-completion-function-alist-telnet) (tramp-set-completion-function "su" tramp-completion-function-alist-su) (tramp-set-completion-function "sudo" tramp-completion-function-alist-su) + (tramp-set-completion-function "doas" tramp-completion-function-alist-su) (tramp-set-completion-function "ksu" tramp-completion-function-alist-su) (tramp-set-completion-function "krlogin" tramp-completion-function-alist-rsh) -- 2.5.0 ------------=_1454692142-8298-1--