emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r99526: (tramp-handle-insert-file-con


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99526: (tramp-handle-insert-file-contents): Set always the permissions of the
Date: Thu, 18 Feb 2010 11:03:12 +0100
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99526
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Thu 2010-02-18 11:03:12 +0100
message:
  (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 <address@hidden>.
modified:
  lisp/ChangeLog
  lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-02-18 06:05:45 +0000
+++ b/lisp/ChangeLog    2010-02-18 10:03:12 +0000
@@ -1,4 +1,11 @@
-2010-02-18  Glenn Morris  <address@hidden>
+2010-02-18  Michael Albinus  <address@hidden>
+
+       * 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 <address@hidden>.
+
+22010-02-18  Glenn Morris  <address@hidden>
 
        * emacs-lisp/authors.el (authors-renamed-files-alist):
        Add entries for INSTALL.CVS.

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2010-02-16 16:03:29 +0000
+++ b/lisp/net/tramp.el 2010-02-18 10:03:12 +0000
@@ -4781,12 +4781,16 @@
                        tramp-temp-buffer-file-name)
                       (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)
                         (tramp-get-method-parameter
                          method 'tramp-copy-keep-tmpfile))
                ;; We keep the local file for performance reasons,
                ;; useful for "rsync".
-               (set-file-modes local-copy (tramp-octal-to-decimal "0600"))
                (setq tramp-temp-buffer-file-name local-copy)
                (put 'tramp-temp-buffer-file-name 'permanent-local t))
 
@@ -8584,26 +8588,26 @@
 ;;   equivalent of the emacsclient -eval option in order to make this
 ;;   reasonably unproblematic.  And maybe trampclient should have some
 ;;   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
-;;   through the user's default shell. (Pete Forman)
+;;   through the user's default shell.  (Pete Forman)
 ;; * Make `tramp-default-user' obsolete.
 ;; * 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
 ;;   so, I think even a signal, when delivered directly to the local
 ;;   SSH instance, would correctly be propagated to the remote process
 ;;   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
-;;   isn't on the remote host. (Mark A. Hershberger)
-;; * Use lsh instead of ssh. (Alfred M. Szmidt)
+;;   isn't on the remote host.  (Mark A. Hershberger)
+;; * Use lsh instead of ssh.  (Alfred M. Szmidt)
 ;; * Implement a general server-local-variable mechanism, as there are
 ;;   probably other variables that need different values for different
 ;;   servers too.  The user could then configure a variable (such as
 ;;   tramp-server-local-variable-alist) to define any such variables
 ;;   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
 ;;   rsync).
 ;; * Keep a second connection open for out-of-band methods like scp or
@@ -8613,7 +8617,7 @@
 ;;   Unicode in Dired file names by default.  Is it possible to
 ;;   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 only English messages? (Juri Linkov)
+;;   expects only English messages?  (Juri Linkov)
 ;; * Make shadowfile.el grok Tramp filenames.  (Bug#4526, Bug#4846)
 ;; * Do not handle files with drive letter as remote.  (Bug#5447)
 ;; * Load Tramp subpackages only when needed.  (Bug#1529, Bug#5448)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]