summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-cache.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2021-06-14 11:25:13 +0200
committerMichael Albinus <michael.albinus@gmx.de>2021-06-14 11:25:13 +0200
commit6536112bdce592eed9f3d71022aafbe6be44da45 (patch)
tree7d11f9feef445fb803883d2e89b06dc36885f299 /lisp/net/tramp-cache.el
parentd0c7d8bc22a935f2a79747a96b4043f0b449a212 (diff)
downloademacs-6536112bdce592eed9f3d71022aafbe6be44da45.tar.gz
emacs-6536112bdce592eed9f3d71022aafbe6be44da45.tar.bz2
emacs-6536112bdce592eed9f3d71022aafbe6be44da45.zip
Handle sensitive auto-save or backup remote files (Bug#45245)
* doc/misc/tramp.texi (Auto-save and Backup): Describe tramp-allow-unsafe-temporary-files. (Ad-hoc multi-hops): Use proper format. * etc/NEWS: Mention confirmation for writing sensitive auto-save or backup remote files to the local temporary directory.. * lisp/net/tramp-cache.el (tramp-dump-connection-properties): Strengthen test. * lisp/net/tramp.el (tramp-allow-unsafe-temporary-files): New defcustom. (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name): Don't expose sensible auto-save or backup files on local temporary directory. (Bug#45245) * test/lisp/net/tramp-tests.el (tramp--test-always): New defalias. (tramp-test10-write-region, tramp-test21-file-links) (tramp--test--deftest-direct-async-process): Use it. (tramp-test37-make-auto-save-file-name) (tramp-test38-find-backup-file-name): Extend tests.
Diffstat (limited to 'lisp/net/tramp-cache.el')
-rw-r--r--lisp/net/tramp-cache.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index fdde7fbe44e..a41620ab9f7 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -70,7 +70,8 @@
;; process key retrieved by `tramp-get-process' (the main connection
;; process). Other processes could reuse these properties, avoiding
;; recomputation when a new asynchronous process is created by
-;; `make-process'. Examples are "remote-path" or "device" (tramp-adb.el).
+;; `make-process'. Examples are "remote-path",
+;; "unsafe-temporary-file" or "device" (tramp-adb.el).
;;; Code:
@@ -470,11 +471,11 @@ used to cache connection properties of the local machine."
;; don't save either, because all other properties might
;; depend on the login name, and we want to give the
;; possibility to use another login name later on. Key
- ;; "started" exists for the "ftp" method only, which must be
+ ;; "started" exists for the "ftp" method only, which must not
;; be kept persistent.
(maphash
(lambda (key value)
- (if (and (tramp-file-name-p key) value
+ (if (and (tramp-file-name-p key) (hash-table-p value)
(not (string-equal
(tramp-file-name-method key) tramp-archive-method))
(not (tramp-file-name-localname key))