aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMichael Albinus2018-12-16 15:49:07 +0100
committerMichael Albinus2018-12-16 15:49:07 +0100
commite8199e765f81968be840d8e7e3978f5974c1be9d (patch)
tree354c9b7af9c126a49e614b716225c49135d702b4 /doc
parent4f230e8dd551d711433e2a8095a19c2ce00c9b4c (diff)
downloademacs-e8199e765f81968be840d8e7e3978f5974c1be9d.tar.gz
emacs-e8199e765f81968be840d8e7e3978f5974c1be9d.zip
Add Tramp sudoedit method
* doc/misc/tramp.texi (Quick Start Guide): New section "Using sudoedit". (External methods) <sudoedit>: Describe. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist) * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add handler. * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-uid-gid): Rename from `tramp-sh-handle-set-file-uid-gid'. Handle only remote file names. * lisp/net/tramp-sudoedit.el: New file. * lisp/net/tramp.el (tramp-file-name-for-operation): Handle also `tramp-set-file-uid-gid'. (tramp-set-file-uid-gid): New defun. (tramp-get-local-uid, tramp-get-local-gid): Cache result. * test/lisp/net/tramp-tests.el (tramp--test-sudoedit-p): New defun. (tramp-test20-file-modes, tramp-test22-file-times) (tramp--test-sudoedit-p): Use it.
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/tramp.texi37
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index a4946f0b8de..c9f1e75d8e6 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -468,6 +468,19 @@ The method @option{sg} stands for ``switch group''; the changed group
468must be used here as user name. The default host name is the same. 468must be used here as user name. The default host name is the same.
469 469
470 470
471@anchor{Quick Start Guide: @option{sudoedit} method}
472@section Using @command{sudoedit}
473@cindex method @option{sudoedit}
474@cindex @option{sudoedit} method
475
476The @option{sudoedit} method is similar to the @option{sudo} method.
477However, it is a different implementation: it does not keep an open
478session running in the background. This is for security reasons; on
479the backside this method is less performant than the @option{sudo}
480method, it is restricted to the @samp{localhost} only, and it does not
481support external processes.
482
483
471@anchor{Quick Start Guide: @option{smb} method} 484@anchor{Quick Start Guide: @option{smb} method}
472@section Using @command{smbclient} 485@section Using @command{smbclient}
473@cindex method @option{smb} 486@cindex method @option{smb}
@@ -919,6 +932,30 @@ NAS hosts. These dumb devices have severely restricted local shells,
919such as the @command{busybox} and do not host any other encode or 932such as the @command{busybox} and do not host any other encode or
920decode programs. 933decode programs.
921 934
935@item @option{sudoedit}
936@cindex method @option{sudoedit}
937@cindex @option{sudoedit} method
938
939The @option{sudoedit} method allows to edit a file as a different user
940on the local host. You could regard this as @value{tramp}'s
941implementation of the @command{sudoedit}. Contrary to the
942@option{sudo} method, all magic file name functions are implemented by
943single @command{sudo @dots{}} commands. The purpose is to make
944editing such a file as secure as possible; there must be no session
945running in the Emacs background which could be attacked from inside
946Emacs.
947
948Consequently, external processes are not implemented.
949
950The host name of such remote file names must represent the local host.
951Since the default value is already proper, it is recommended not to
952use any host name in the remote file name, like
953@file{@trampfn{sudoedit,,/path/to/file}} or
954@file{@trampfn{sudoedit,user@@,/path/to/file}}.
955
956Like the @option{sudo} method, a @option{sudoedit} password expires
957after a predefined timeout.
958
922@item @option{ftp} 959@item @option{ftp}
923@cindex method @option{ftp} 960@cindex method @option{ftp}
924@cindex @option{ftp} method 961@cindex @option{ftp} method