From: Michael Albinus Date: Fri, 5 Feb 2016 17:57:35 +0000 (+0100) Subject: Minor cleanup for Tramp "doas". X-Git-Tag: emacs-26.0.90~2729 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=05570f0002a6bcecf2b72ea3f22d6653e00a45a6;p=emacs.git 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) : Add `tramp-remote-shell-args'. --- diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 16ff76b887d..294a3a9ecdf 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -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 diff --git a/etc/NEWS b/etc/NEWS index 3b520ec50b1..95ade416d39 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -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 diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 5771269417e..c2ab67b6f4f 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -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.