aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2014-03-25 10:49:37 +0100
committerMichael Albinus2014-03-25 10:49:37 +0100
commit08cf935b84a0778fdf60992960f2c5a6dbad4d82 (patch)
treecc1958c1fa542e16a5c04d302e0b4b7e7a1186c1
parent1f73d6c67588cc489b3e3b445710d2fd06792170 (diff)
downloademacs-08cf935b84a0778fdf60992960f2c5a6dbad4d82.tar.gz
emacs-08cf935b84a0778fdf60992960f2c5a6dbad4d82.zip
* net/tramp-sh.el (tramp-do-copy-or-rename-file-directly): In the
`rename' case, check whether source directory has set the sticky bit.
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/net/tramp-sh.el6
2 files changed, 8 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ce0afc89d12..e3a9a669e48 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -7,6 +7,8 @@
7 `remote-file-name-inhibit-cache' to nil in the second pass. 7 `remote-file-name-inhibit-cache' to nil in the second pass.
8 (tramp-find-executable): Do not call "which" on SunOS. 8 (tramp-find-executable): Do not call "which" on SunOS.
9 (tramp-send-command-and-check): Fix docstring. 9 (tramp-send-command-and-check): Fix docstring.
10 (tramp-do-copy-or-rename-file-directly): In the `rename' case,
11 check whether source directory has set the sticky bit.
10 12
112014-03-24 Barry O'Reilly <gundaetiapo@gmail.com> 132014-03-24 Barry O'Reilly <gundaetiapo@gmail.com>
12 14
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 9cc913724fd..22ea7714743 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2110,6 +2110,12 @@ the uid and gid from FILENAME."
2110 ;; We can do it directly. 2110 ;; We can do it directly.
2111 ((let (file-name-handler-alist) 2111 ((let (file-name-handler-alist)
2112 (and (file-readable-p localname1) 2112 (and (file-readable-p localname1)
2113 ;; No sticky bit when renaming.
2114 (or (eq op 'copy)
2115 (zerop
2116 (logand
2117 (file-modes (file-name-directory localname1))
2118 (tramp-compat-octal-to-decimal "1000"))))
2113 (file-writable-p (file-name-directory localname2)) 2119 (file-writable-p (file-name-directory localname2))
2114 (or (file-directory-p localname2) 2120 (or (file-directory-p localname2)
2115 (file-writable-p localname2)))) 2121 (file-writable-p localname2))))