Commit 6e4f5731 authored by Michael Albinus's avatar Michael Albinus
Browse files

(tramp-handle-insert-file-contents): Set always the permissions of the

temporary file to "0600". In case the remote
file has no read permissions for the owner, there might be
problems otherwise.  Reported by Ole Laursen <olau@iola.dk>.
parent 272f6ebf
2010-02-18 Glenn Morris <rgm@gnu.org> 2010-02-18 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-handle-insert-file-contents): Set always the
permissions of the temporary file to "0600". In case the remote
file has no read permissions for the owner, there might be
problems otherwise. Reported by Ole Laursen <olau@iola.dk>.
22010-02-18 Glenn Morris <rgm@gnu.org>
* emacs-lisp/authors.el (authors-renamed-files-alist): * emacs-lisp/authors.el (authors-renamed-files-alist):
Add entries for INSTALL.CVS. Add entries for INSTALL.CVS.
......
...@@ -4781,12 +4781,16 @@ coding system might not be determined. This function repairs it." ...@@ -4781,12 +4781,16 @@ coding system might not be determined. This function repairs it."
tramp-temp-buffer-file-name) tramp-temp-buffer-file-name)
(t (file-local-copy filename))))) (t (file-local-copy filename)))))
;; When the file is not readable for the owner, it
;; cannot be inserted, even it is redable for the group
;; or for everybody.
(set-file-modes local-copy (tramp-octal-to-decimal "0600"))
(when (and (null remote-copy) (when (and (null remote-copy)
(tramp-get-method-parameter (tramp-get-method-parameter
method 'tramp-copy-keep-tmpfile)) method 'tramp-copy-keep-tmpfile))
;; We keep the local file for performance reasons, ;; We keep the local file for performance reasons,
;; useful for "rsync". ;; useful for "rsync".
(set-file-modes local-copy (tramp-octal-to-decimal "0600"))
(setq tramp-temp-buffer-file-name local-copy) (setq tramp-temp-buffer-file-name local-copy)
(put 'tramp-temp-buffer-file-name 'permanent-local t)) (put 'tramp-temp-buffer-file-name 'permanent-local t))
...@@ -8584,26 +8588,26 @@ Only works for Bourne-like shells." ...@@ -8584,26 +8588,26 @@ Only works for Bourne-like shells."
;; equivalent of the emacsclient -eval option in order to make this ;; equivalent of the emacsclient -eval option in order to make this
;; reasonably unproblematic. And maybe trampclient should have some ;; reasonably unproblematic. And maybe trampclient should have some
;; way of passing credentials, like by using an SSL socket or ;; way of passing credentials, like by using an SSL socket or
;; something. (David Kastrup) ;; something. (David Kastrup)
;; * Reconnect directly to a compliant shell without first going ;; * Reconnect directly to a compliant shell without first going
;; through the user's default shell. (Pete Forman) ;; through the user's default shell. (Pete Forman)
;; * Make `tramp-default-user' obsolete. ;; * Make `tramp-default-user' obsolete.
;; * How can I interrupt the remote process with a signal ;; * How can I interrupt the remote process with a signal
;; (interrupt-process seems not to work)? (Markus Triska) ;; (interrupt-process seems not to work)? (Markus Triska)
;; * Avoid the local shell entirely for starting remote processes. If ;; * Avoid the local shell entirely for starting remote processes. If
;; so, I think even a signal, when delivered directly to the local ;; so, I think even a signal, when delivered directly to the local
;; SSH instance, would correctly be propagated to the remote process ;; SSH instance, would correctly be propagated to the remote process
;; automatically; possibly SSH would have to be started with ;; automatically; possibly SSH would have to be started with
;; "-t". (Markus Triska) ;; "-t". (Markus Triska)
;; * It makes me wonder if tramp couldn't fall back to ssh when scp ;; * It makes me wonder if tramp couldn't fall back to ssh when scp
;; isn't on the remote host. (Mark A. Hershberger) ;; isn't on the remote host. (Mark A. Hershberger)
;; * Use lsh instead of ssh. (Alfred M. Szmidt) ;; * Use lsh instead of ssh. (Alfred M. Szmidt)
;; * Implement a general server-local-variable mechanism, as there are ;; * Implement a general server-local-variable mechanism, as there are
;; probably other variables that need different values for different ;; probably other variables that need different values for different
;; servers too. The user could then configure a variable (such as ;; servers too. The user could then configure a variable (such as
;; tramp-server-local-variable-alist) to define any such variables ;; tramp-server-local-variable-alist) to define any such variables
;; that they need to, which would then be let bound as appropriate ;; that they need to, which would then be let bound as appropriate
;; in tramp functions. (Jason Rumney) ;; in tramp functions. (Jason Rumney)
;; * Optimize out-of-band copying, when both methods are scp-like (not ;; * Optimize out-of-band copying, when both methods are scp-like (not
;; rsync). ;; rsync).
;; * Keep a second connection open for out-of-band methods like scp or ;; * Keep a second connection open for out-of-band methods like scp or
...@@ -8613,7 +8617,7 @@ Only works for Bourne-like shells." ...@@ -8613,7 +8617,7 @@ Only works for Bourne-like shells."
;; Unicode in Dired file names by default. Is it possible to ;; Unicode in Dired file names by default. Is it possible to
;; improve Tramp to set LC_ALL to "C" only for commands where Tramp ;; improve Tramp to set LC_ALL to "C" only for commands where Tramp
;; expects English? Or just to set LC_MESSAGES to "C" if Tramp ;; expects English? Or just to set LC_MESSAGES to "C" if Tramp
;; expects only English messages? (Juri Linkov) ;; expects only English messages? (Juri Linkov)
;; * Make shadowfile.el grok Tramp filenames. (Bug#4526, Bug#4846) ;; * Make shadowfile.el grok Tramp filenames. (Bug#4526, Bug#4846)
;; * Do not handle files with drive letter as remote. (Bug#5447) ;; * Do not handle files with drive letter as remote. (Bug#5447)
;; * Load Tramp subpackages only when needed. (Bug#1529, Bug#5448) ;; * Load Tramp subpackages only when needed. (Bug#1529, Bug#5448)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment