aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2010-02-18 11:03:12 +0100
committerMichael Albinus2010-02-18 11:03:12 +0100
commit6e4f5731f6620d147d4937ed2be2544720e01041 (patch)
tree21bdf4b3172a5bd76d36d2001cc8d227e9e5762a
parent272f6ebf1e639e3d3d3b106a3b8c665436d386db (diff)
downloademacs-6e4f5731f6620d147d4937ed2be2544720e01041.tar.gz
emacs-6e4f5731f6620d147d4937ed2be2544720e01041.zip
(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>.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/net/tramp.el22
2 files changed, 21 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 39db27f85e2..8f531fcaec2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,4 +1,11 @@
12010-02-18 Glenn Morris <rgm@gnu.org> 12010-02-18 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-handle-insert-file-contents): Set always the
4 permissions of the temporary file to "0600". In case the remote
5 file has no read permissions for the owner, there might be
6 problems otherwise. Reported by Ole Laursen <olau@iola.dk>.
7
822010-02-18 Glenn Morris <rgm@gnu.org>
2 9
3 * emacs-lisp/authors.el (authors-renamed-files-alist): 10 * emacs-lisp/authors.el (authors-renamed-files-alist):
4 Add entries for INSTALL.CVS. 11 Add entries for INSTALL.CVS.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 77a3875eeb4..d15d245d01f 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4781,12 +4781,16 @@ coding system might not be determined. This function repairs it."
4781 tramp-temp-buffer-file-name) 4781 tramp-temp-buffer-file-name)
4782 (t (file-local-copy filename))))) 4782 (t (file-local-copy filename)))))
4783 4783
4784 ;; When the file is not readable for the owner, it
4785 ;; cannot be inserted, even it is redable for the group
4786 ;; or for everybody.
4787 (set-file-modes local-copy (tramp-octal-to-decimal "0600"))
4788
4784 (when (and (null remote-copy) 4789 (when (and (null remote-copy)
4785 (tramp-get-method-parameter 4790 (tramp-get-method-parameter
4786 method 'tramp-copy-keep-tmpfile)) 4791 method 'tramp-copy-keep-tmpfile))
4787 ;; We keep the local file for performance reasons, 4792 ;; We keep the local file for performance reasons,
4788 ;; useful for "rsync". 4793 ;; useful for "rsync".
4789 (set-file-modes local-copy (tramp-octal-to-decimal "0600"))
4790 (setq tramp-temp-buffer-file-name local-copy) 4794 (setq tramp-temp-buffer-file-name local-copy)
4791 (put 'tramp-temp-buffer-file-name 'permanent-local t)) 4795 (put 'tramp-temp-buffer-file-name 'permanent-local t))
4792 4796
@@ -8584,26 +8588,26 @@ Only works for Bourne-like shells."
8584;; equivalent of the emacsclient -eval option in order to make this 8588;; equivalent of the emacsclient -eval option in order to make this
8585;; reasonably unproblematic. And maybe trampclient should have some 8589;; reasonably unproblematic. And maybe trampclient should have some
8586;; way of passing credentials, like by using an SSL socket or 8590;; way of passing credentials, like by using an SSL socket or
8587;; something. (David Kastrup) 8591;; something. (David Kastrup)
8588;; * Reconnect directly to a compliant shell without first going 8592;; * Reconnect directly to a compliant shell without first going
8589;; through the user's default shell. (Pete Forman) 8593;; through the user's default shell. (Pete Forman)
8590;; * Make `tramp-default-user' obsolete. 8594;; * Make `tramp-default-user' obsolete.
8591;; * How can I interrupt the remote process with a signal 8595;; * How can I interrupt the remote process with a signal
8592;; (interrupt-process seems not to work)? (Markus Triska) 8596;; (interrupt-process seems not to work)? (Markus Triska)
8593;; * Avoid the local shell entirely for starting remote processes. If 8597;; * Avoid the local shell entirely for starting remote processes. If
8594;; so, I think even a signal, when delivered directly to the local 8598;; so, I think even a signal, when delivered directly to the local
8595;; SSH instance, would correctly be propagated to the remote process 8599;; SSH instance, would correctly be propagated to the remote process
8596;; automatically; possibly SSH would have to be started with 8600;; automatically; possibly SSH would have to be started with
8597;; "-t". (Markus Triska) 8601;; "-t". (Markus Triska)
8598;; * It makes me wonder if tramp couldn't fall back to ssh when scp 8602;; * It makes me wonder if tramp couldn't fall back to ssh when scp
8599;; isn't on the remote host. (Mark A. Hershberger) 8603;; isn't on the remote host. (Mark A. Hershberger)
8600;; * Use lsh instead of ssh. (Alfred M. Szmidt) 8604;; * Use lsh instead of ssh. (Alfred M. Szmidt)
8601;; * Implement a general server-local-variable mechanism, as there are 8605;; * Implement a general server-local-variable mechanism, as there are
8602;; probably other variables that need different values for different 8606;; probably other variables that need different values for different
8603;; servers too. The user could then configure a variable (such as 8607;; servers too. The user could then configure a variable (such as
8604;; tramp-server-local-variable-alist) to define any such variables 8608;; tramp-server-local-variable-alist) to define any such variables
8605;; that they need to, which would then be let bound as appropriate 8609;; that they need to, which would then be let bound as appropriate
8606;; in tramp functions. (Jason Rumney) 8610;; in tramp functions. (Jason Rumney)
8607;; * Optimize out-of-band copying, when both methods are scp-like (not 8611;; * Optimize out-of-band copying, when both methods are scp-like (not
8608;; rsync). 8612;; rsync).
8609;; * Keep a second connection open for out-of-band methods like scp or 8613;; * Keep a second connection open for out-of-band methods like scp or
@@ -8613,7 +8617,7 @@ Only works for Bourne-like shells."
8613;; Unicode in Dired file names by default. Is it possible to 8617;; Unicode in Dired file names by default. Is it possible to
8614;; improve Tramp to set LC_ALL to "C" only for commands where Tramp 8618;; improve Tramp to set LC_ALL to "C" only for commands where Tramp
8615;; expects English? Or just to set LC_MESSAGES to "C" if Tramp 8619;; expects English? Or just to set LC_MESSAGES to "C" if Tramp
8616;; expects only English messages? (Juri Linkov) 8620;; expects only English messages? (Juri Linkov)
8617;; * Make shadowfile.el grok Tramp filenames. (Bug#4526, Bug#4846) 8621;; * Make shadowfile.el grok Tramp filenames. (Bug#4526, Bug#4846)
8618;; * Do not handle files with drive letter as remote. (Bug#5447) 8622;; * Do not handle files with drive letter as remote. (Bug#5447)
8619;; * Load Tramp subpackages only when needed. (Bug#1529, Bug#5448) 8623;; * Load Tramp subpackages only when needed. (Bug#1529, Bug#5448)