1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-04 20:27:45 +00:00

Minor cleanup for Tramp "doas".

* doc/misc/tramp.texi (Inline methods): Add "doas" method.

* etc/NEWS: Add Tramp connection method "doas".

* lisp/net/tramp-sh.el (tramp-methods) <doas>:
Add `tramp-remote-shell-args'.
This commit is contained in:
Michael Albinus 2016-02-05 18:57:35 +01:00
parent d66e8f7248
commit 05570f0002
3 changed files with 12 additions and 1 deletions

View File

@ -590,6 +590,12 @@ the host returned by the function @command{(system-name)}. See
Similar to @option{su} method, @option{sudo} uses @command{sudo}.
@command{sudo} must have sufficient rights to start a shell.
@item @option{doas}
@cindex method doas
@cindex doas method
This method is used on OpenBSD like the @command{sudo} command.
@item @option{sg}
@cindex method sg
@cindex sg method

View File

@ -67,9 +67,13 @@ for the ChangeLog file, if none already exists. Customize
** Tramp
+++
*** New connection method "sg", which allows to edit files under
different group ID.
+++
*** New connection method "doas" for OpenBSD hosts.
* New Modes and Packages in Emacs 25.2

View File

@ -312,6 +312,7 @@ The string is used in `tramp-methods'.")
(tramp-login-program "doas")
(tramp-login-args (("-u" "%u") ("-s")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)))
;;;###tramp-autoload
(add-to-list 'tramp-methods
@ -415,7 +416,7 @@ The string is used in `tramp-methods'.")
;;;###tramp-autoload
(add-to-list 'tramp-default-user-alist
`(,(concat "\\`" (regexp-opt '("su" "sudo" "ksu" "doas")) "\\'")
`(,(concat "\\`" (regexp-opt '("su" "sudo" "doas" "ksu")) "\\'")
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.