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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Xi Lu <lx <at> shellcodes.org>
Subject: bug#22542: closed (Re: bug#22542: [PATCH] Add support for `doas`
 command.)
Date: Fri, 05 Feb 2016 17:09:02 +0000
[Message part 1 (text/plain, inline)]
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 <at> debbugs.gnu.org.

-- 
22542: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22542
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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.

[Message part 3 (message/rfc822, inline)]
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






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

Previous Next


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