From: Xi Lu <lx@shellcodes.org>
To: 22542@debbugs.gnu.org
Cc: Xi Lu <lx@shellcodes.org>
Subject: bug#22542: [PATCH] Add support for `doas` command.
Date: Wed, 3 Feb 2016 17:19:33 +0800 [thread overview]
Message-ID: <1454491173-25230-1-git-send-email-lx@shellcodes.org> (raw)
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
next reply other threads:[~2016-02-03 9:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 9:19 Xi Lu [this message]
2016-02-05 17:08 ` bug#22542: [PATCH] Add support for `doas` command Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1454491173-25230-1-git-send-email-lx@shellcodes.org \
--to=lx@shellcodes.org \
--cc=22542@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.