all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#22542: [PATCH] Add support for `doas` command.
@ 2016-02-03  9:19 Xi Lu
  2016-02-05 17:08 ` Michael Albinus
  0 siblings, 1 reply; 2+ messages in thread
From: Xi Lu @ 2016-02-03  9:19 UTC (permalink / raw)
  To: 22542; +Cc: Xi Lu

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








^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#22542: [PATCH] Add support for `doas` command.
  2016-02-03  9:19 bug#22542: [PATCH] Add support for `doas` command Xi Lu
@ 2016-02-05 17:08 ` Michael Albinus
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Albinus @ 2016-02-05 17:08 UTC (permalink / raw)
  To: Xi Lu; +Cc: 22542-done

Xi Lu <lx@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.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-05 17:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-03  9:19 bug#22542: [PATCH] Add support for `doas` command Xi Lu
2016-02-05 17:08 ` Michael Albinus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.