GNU bug report logs - #22542
[PATCH] Add support for `doas` command.

Previous Next

Package: emacs;

Reported by: Xi Lu <lx <at> shellcodes.org>

Date: Wed, 3 Feb 2016 09:21:01 UTC

Severity: normal

Tags: patch

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22542 in the body.
You can then email your comments to 22542 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#22542; Package emacs. (Wed, 03 Feb 2016 09:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Xi Lu <lx <at> shellcodes.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 03 Feb 2016 09:21:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Xi Lu <lx <at> shellcodes.org>
To: bug-gnu-emacs <at> gnu.org
Cc: Xi Lu <lx <at> shellcodes.org>
Subject: [PATCH] Add support for `doas` command.
Date: Wed,  3 Feb 2016 17:19:33 +0800
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







Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Fri, 05 Feb 2016 17:09:01 GMT) Full text and rfc822 format available.

Notification sent to Xi Lu <lx <at> shellcodes.org>:
bug acknowledged by developer. (Fri, 05 Feb 2016 17:09:02 GMT) Full text and rfc822 format available.

Message #10 received at 22542-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Xi Lu <lx <at> shellcodes.org>
Cc: 22542-done <at> debbugs.gnu.org
Subject: Re: bug#22542: [PATCH] Add support for `doas` command.
Date: Fri, 05 Feb 2016 18:08:32 +0100
Xi Lu <lx <at> shellcodes.org> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 05 Mar 2016 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 111 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.