diff options
| author | Michael Albinus | 2018-12-16 15:49:07 +0100 |
|---|---|---|
| committer | Michael Albinus | 2018-12-16 15:49:07 +0100 |
| commit | e8199e765f81968be840d8e7e3978f5974c1be9d (patch) | |
| tree | 354c9b7af9c126a49e614b716225c49135d702b4 /doc | |
| parent | 4f230e8dd551d711433e2a8095a19c2ce00c9b4c (diff) | |
| download | emacs-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.texi | 37 |
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 | |||
| 468 | must be used here as user name. The default host name is the same. | 468 | must 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 | |||
| 476 | The @option{sudoedit} method is similar to the @option{sudo} method. | ||
| 477 | However, it is a different implementation: it does not keep an open | ||
| 478 | session running in the background. This is for security reasons; on | ||
| 479 | the backside this method is less performant than the @option{sudo} | ||
| 480 | method, it is restricted to the @samp{localhost} only, and it does not | ||
| 481 | support 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, | |||
| 919 | such as the @command{busybox} and do not host any other encode or | 932 | such as the @command{busybox} and do not host any other encode or |
| 920 | decode programs. | 933 | decode programs. |
| 921 | 934 | ||
| 935 | @item @option{sudoedit} | ||
| 936 | @cindex method @option{sudoedit} | ||
| 937 | @cindex @option{sudoedit} method | ||
| 938 | |||
| 939 | The @option{sudoedit} method allows to edit a file as a different user | ||
| 940 | on the local host. You could regard this as @value{tramp}'s | ||
| 941 | implementation of the @command{sudoedit}. Contrary to the | ||
| 942 | @option{sudo} method, all magic file name functions are implemented by | ||
| 943 | single @command{sudo @dots{}} commands. The purpose is to make | ||
| 944 | editing such a file as secure as possible; there must be no session | ||
| 945 | running in the Emacs background which could be attacked from inside | ||
| 946 | Emacs. | ||
| 947 | |||
| 948 | Consequently, external processes are not implemented. | ||
| 949 | |||
| 950 | The host name of such remote file names must represent the local host. | ||
| 951 | Since the default value is already proper, it is recommended not to | ||
| 952 | use 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 | |||
| 956 | Like the @option{sudo} method, a @option{sudoedit} password expires | ||
| 957 | after 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 |