summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-crypt.el
Commit message (Collapse)AuthorAgeFilesLines
...
* Still fixes for Tramp directory-files-*Michael Albinus2020-11-051-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-handle-directory-files): * lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes): Fix COUNT. * lisp/net/tramp-crypt.el (tramp-crypt-handle-directory-files): Implement COUNT. * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-byte-array-to-string): * lisp/net/tramp-integration.el (tramp-eshell-directory-change): Use `nbutlast'. * lisp/net/tramp-rclone.el (tramp-rclone-handle-delete-directory) (tramp-rclone-handle-delete-file): Reorder cache flushing. (tramp-rclone-handle-directory-files): Use `tramp-compat-directory-files'. * lisp/net/tramp-sh.el (tramp-sh-handle-directory-files-and-attributes): Fix NOSORT and COUNT. * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Fix NOSORT. * test/lisp/net/tramp-tests.el (tramp--test-share-p): New defun. (tramp-test05-expand-file-name-relative): Use it. (tramp-test16-directory-files) (tramp-test19-directory-files-and-attributes): Strengthen test. (tramp-test20-file-modes): Simplify check.
* Trash remote files to local trash (Bug#44216)Michael Albinus2020-11-011-5/+6
| | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Frequently Asked Questions): Add trashing. * lisp/net/tramp-adb.el (tramp-adb-handle-delete-directory) (tramp-adb-handle-delete-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-delete-file): * lisp/net/tramp-sh.el (tramp-sh-handle-delete-directory) (tramp-sh-handle-delete-file): * lisp/net/tramp-smb.el (tramp-smb-handle-delete-directory) (tramp-smb-handle-delete-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-delete-directory) (tramp-sudoedit-handle-delete-file): Implement local trash. (Bug#44216) * lisp/net/tramp-crypt.el (tramp-crypt-handle-delete-directory) (tramp-crypt-handle-delete-file): Do not trash. * lisp/net/tramp.el (tramp-skeleton-delete-directory): New defmacro. * test/lisp/net/tramp-tests.el (tramp-test07-file-exists-p) (tramp-test14-delete-directory): Add trashing.
* Fix some defcustom typesLars Ingebrigtsen2020-09-251-1/+1
| | | | | | | | | | * lisp/whitespace.el (whitespace-style): * lisp/gnus/message.el (message-screenshot-command): * lisp/progmodes/compile.el (compilation-transform-file-match-alist): * lisp/progmodes/gdb-mi.el (gdb-default-window-configuration-file): * lisp/progmodes/python.el (python-pdbtrack-exit-command): Fix the defcustom types. * lisp/progmodes/sql.el (sql-password-wallet): Fix the value.
* Fix remaining problems with tramp-crypt.elMichael Albinus2020-06-211-10/+10
| | | | | | | | | | | | | | | | | | * lisp/net/tramp-compat.el (tramp-compat-make-temp-file): Simplify implementation. * lisp/net/tramp-crypt.el (tramp-crypt-handle-delete-file) (tramp-crypt-handle-file-attributes, tramp-crypt-handle-file-system-info) (tramp-crypt-handle-make-directory): Let-bind `tramp-crypt-enabled' to nil. * lisp/net/tramp.el (tramp-file-name-for-operation): Fix for operations with two arguments. (tramp-handle-load): Suppress `signal-hook-function' when NOERROR is non-nil. * test/lisp/net/tramp-tests.el (tramp-test41-utf8) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Skip if needed.
* Some Tramp cleanups, mainly in tramp-crypt.elMichael Albinus2020-06-181-9/+9
| | | | | | | | | | | | | | | | | * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `add-name-to-file', `make-directory-internal', `make-nearby-temp-file', `temporary-file-directory' and `unhandled-file-name-directory'. (tramp-crypt-file-name-for-operation): Use `tramp-compat-temporary-file-directory'. (tramp-crypt-do-encrypt-or-decrypt-file-name) (tramp-crypt-do-encrypt-or-decrypt-file): Fix syntax error in `tramp-error'. * lisp/net/tramp.el (tramp-autoload-file-name-handler): * lisp/net/tramp-rclone.el (tramp-rclone-mounted-p) (tramp-rclone-flush-directory-cache): Use `tramp-compat-temporary-file-directory'.
* Fix some Tramp problems seen during testsMichael Albinus2020-06-151-6/+36
| | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `access-file'. (tramp-crypt-file-name-for-operation): Rewrite. Take second argument into account. (tramp-crypt-file-name-handler): Use it. (tramp-crypt-send-command): Set buffer multibyte (but utf8 files still don't work). (tramp-crypt-handle-access-file): New defun. (tramp-crypt-do-copy-or-rename-file): Short track if both files are on a crypted remote dir. * lisp/net/tramp.el (file-notify-rm-watch): Declare. (tramp-inhibit-progress-reporter): New defvar. (tramp-message): Display message only if not suppressed by progress reporter. (with-tramp-progress-reporter): Suppress concurrent progress reporter messages. (tramp-file-notify-process-sentinel): Simplify.
* Rearrange detecting remote uid and gid in TrampMichael Albinus2020-06-141-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-ownership-preserved-p'. (tramp-crypt-add-directory): Check, that NAME is not quoted. (tramp-crypt-handle-file-ownership-preserved-p): New defun. (tramp-crypt-handle-insert-directory): Fix docstring. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-gvfs-handle-file-readable-p): Call `tramp-get-remote-uid'. (tramp-gvfs-handle-get-remote-uid) (tramp-gvfs-handle-get-remote-gid): Rename from `tramp-gvfs-get-remote-{uid,gid}'. Do not cache result. (tramp-gvfs-maybe-open-connection): No special handling for remote uid and gid. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-sh-handle-get-remote-uid, tramp-sh-handle-get-remote-gid): Rename from `tramp-get-remote-{uid,gid}'. Do not cache result. (tramp-sh-handle-file-ownership-preserved-p): Distinguish by GROUP when caching. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-sudoedit-handle-get-remote-uid) (tramp-sudoedit-handle-get-remote-gid): Rename from `tramp-sudoedit-get-remote-{uid,gid}'. Do not cache result. (tramp-sudoedit-handle-set-file-uid-gid) (tramp-sudoedit-handle-write-region): Call `tramp-get-remote-uid' and `tramp-get-remote-gid'. (tramp-sudoedit-maybe-open-connection): No special handling for remote uid and gid. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-handle-write-region, tramp-check-cached-permissions): Call `tramp-get-remote-uid' and `tramp-get-remote-gid'. (tramp-get-remote-uid, tramp-get-remote-gid): New defuns. (tramp-local-host-p): Simplify `tramp-get-remote-uid' call. * test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards) Skip if needed.
* Further fixes while testing tramp-cryptMichael Albinus2020-06-121-52/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (External methods): Remove experimental note for rclone. (Keeping files encrypted): Mark file encryption as experimental. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Use `tramp-handle-file-truename'. (tramp-adb-handle-file-truename): Remove. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-writable-p'. (tramp-crypt-send-command): Return t if no error. (tramp-crypt-do-encrypt-or-decrypt-file-name) (tramp-crypt-do-encrypt-or-decrypt-file): Raise an error if it fails. (tramp-crypt-do-copy-or-rename-file): Flush file properties also when copying a directory. (tramp-crypt-handle-file-writable-p): New defun. (tramp-crypt-handle-insert-directory): Check for library `text-property-search'. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-uid-gid): Rename from `tramp-gvfs-set-file-uid-gid'. * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename): Use `tramp-handle-file-truename' as fallback. * lisp/net/tramp.el (tramp-handle-file-truename): Let-bind `tramp-crypt-enabled' to nil. (tramp-handle-write-region): Set also file ownership. * test/lisp/net/tramp-tests.el (tramp-test17-insert-directory): Skip if needed.
* Futher tramp-crypt implementation and documentationMichael Albinus2020-06-101-6/+13
| | | | | | | | | | | | | | | * doc/misc/tramp.texi (Top, Configuration): Insert section `Keeping files encrypted' in menu. (Keeping files encrypted): New node. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `tramp-set-file-uid-gid'. (tramp-crypt-maybe-open-connection): Simplify. (tramp-crypt-do-encrypt-or-decrypt-file): Use `binary' coding system. (tramp-crypt-handle-set-file-uid-gid): New defun. * test/lisp/net/tramp-tests.el (tramp-test09-insert-file-contents): Adapt test.
* Continue implementation of tramp-crypt.elMichael Albinus2020-06-091-23/+64
| | | | | | | | | | | | | | | | * lisp/net/tramp-crypt.el (tramp-crypt-do-encrypt-or-decrypt-file): Add leading "/" to infile. (tramp-crypt-add-directory): Fix docstring. Expand NAME. (tramp-crypt-remove-directory) (tramp-crypt-handle-file-name-all-completions) (tramp-crypt-handle-set-file-times): New defuns. (tramp-crypt-handle-file-executable-p) (tramp-crypt-handle-file-readable-p) (tramp-crypt-handle-file-system-info) (tramp-crypt-handle-set-file-modes): Fix implementation. * test/lisp/net/tramp-tests.el: Adapt call convention for (tramp--test-crypt-p).
* Add autoload problem in tramp-crypt.el.Michael Albinus2020-06-081-16/+20
| | | | | | | | | | * lisp/net/tramp-crypt.el (tramp-crypt-encfs-config): Add ;;;###tramp-autoload cookie. (tramp-crypt-directories): Move it up. (tramp-crypt-file-name-p): Move it up. Add ;;;###tramp-autoload cookie. Make it a defsubst. * test/lisp/net/tramp-tests.el (tramp-crypt): Do not require.
* Add file encryption to TrampMichael Albinus2020-06-071-0/+730
* lisp/net/tramp-crypt.el: New file. * lisp/net/tramp.el (tramp-run-real-handler): Add `tramp-crypt-file-name-handler'. (tramp-register-file-name-handlers): Call `tramp-register-crypt-file-name-handler'. (tramp-handle-insert-file-contents, tramp-local-host-p): Check for `tramp-crypt-enabled' * test/lisp/net/tramp-tests.el (tramp--test-crypt-p): New defun. (tramp-test24-file-acl, tramp-test25-file-selinux) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test31-interrupt-process) (tramp-test32-shell-command) (tramp-test32-shell-command-dont-erase-buffer) (tramp-test33-environment-variables) (tramp-test33-environment-variables-and-port-numbers) (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path) (tramp-test35-remote-path, tramp-test36-vc-registered) (tramp--test-check-files, tramp-test43-asynchronous-requests): Use it.