aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/net/tramp-sh.el8
-rw-r--r--lisp/net/tramp-smb.el19
3 files changed, 33 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f3a84967aaf..72e8959d8ef 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,14 @@
12013-01-02 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp-sh.el (tramp-sh-handle-set-file-acl): Add argument to
4 `error' call.
5 (tramp-do-copy-or-rename-file): Ignore errors when calling
6 `set-file-extended-attributes'.
7
8 * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add
9 handler for `file-acl'.
10 (tramp-smb-handle-file-acl): New defun.
11
12013-01-02 Jay Belanger <jay.p.belanger@gmail.com> 122013-01-02 Jay Belanger <jay.p.belanger@gmail.com>
2 13
3 * calc/README: Mention ISO 8601 week-numbering dates. 14 * calc/README: Mention ISO 8601 week-numbering dates.
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index e46b32c85a5..c359bab0830 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1570,7 +1570,7 @@ and gid of the corresponding user is taken. Both parameters must be integers."
1570 v (format 1570 v (format
1571 "setfacl -m %s %s" 1571 "setfacl -m %s %s"
1572 line (tramp-shell-quote-argument localname))) 1572 line (tramp-shell-quote-argument localname)))
1573 (error)))) 1573 (error nil))))
1574 ;; In case of errors, we return `nil'. 1574 ;; In case of errors, we return `nil'.
1575 (error 1575 (error
1576 (tramp-set-file-property v localname "file-acl" 'undef) 1576 (tramp-set-file-property v localname "file-acl" 'undef)
@@ -2097,9 +2097,11 @@ file names."
2097 ;; One of them must be a Tramp file. 2097 ;; One of them must be a Tramp file.
2098 (error "Tramp implementation says this cannot happen"))) 2098 (error "Tramp implementation says this cannot happen")))
2099 2099
2100 ;; Handle `preserve-extended-attributes'. 2100 ;; Handle `preserve-extended-attributes'. We ignore possible
2101 ;; errors, because ACL strings could be incompatible.
2101 (when attributes 2102 (when attributes
2102 (apply 'set-file-extended-attributes (list newname attributes))) 2103 (ignore-errors
2104 (apply 'set-file-extended-attributes (list newname attributes))))
2103 2105
2104 ;; In case of `rename', we must flush the cache of the source file. 2106 ;; In case of `rename', we must flush the cache of the source file.
2105 (when (and t1 (eq op 'rename)) 2107 (when (and t1 (eq op 'rename))
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index af1e36350f5..dbb711e9595 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -195,7 +195,7 @@ See `tramp-actions-before-shell' for more info.")
195 (dired-uncache . tramp-handle-dired-uncache) 195 (dired-uncache . tramp-handle-dired-uncache)
196 (expand-file-name . tramp-smb-handle-expand-file-name) 196 (expand-file-name . tramp-smb-handle-expand-file-name)
197 (file-accessible-directory-p . tramp-smb-handle-file-directory-p) 197 (file-accessible-directory-p . tramp-smb-handle-file-directory-p)
198 (file-acl . ignore) 198 (file-acl . tramp-smb-handle-file-acl)
199 (file-attributes . tramp-smb-handle-file-attributes) 199 (file-attributes . tramp-smb-handle-file-attributes)
200 (file-directory-p . tramp-smb-handle-file-directory-p) 200 (file-directory-p . tramp-smb-handle-file-directory-p)
201 (file-executable-p . tramp-handle-file-exists-p) 201 (file-executable-p . tramp-handle-file-exists-p)
@@ -641,6 +641,22 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
641 method user host 641 method user host
642 (tramp-run-real-handler 'expand-file-name (list localname)))))) 642 (tramp-run-real-handler 'expand-file-name (list localname))))))
643 643
644(defun tramp-smb-handle-file-acl (filename)
645 "Like `file-acl' for Tramp files."
646 (with-parsed-tramp-file-name filename nil
647 (with-tramp-file-property v localname "file-acl"
648 (when (tramp-smb-send-command
649 v (format "getfacl \"%s\"" (tramp-smb-get-localname v)))
650 (with-current-buffer (tramp-get-connection-buffer v)
651 (goto-char (point-min))
652 (while (looking-at-p "^#")
653 (forward-line)
654 (delete-region (point-min) (point)))
655 (goto-char (point-max))
656 (delete-blank-lines)
657 (when (> (point-max) (point-min))
658 (substring-no-properties (buffer-string))))))))
659
644(defun tramp-smb-handle-file-attributes (filename &optional id-format) 660(defun tramp-smb-handle-file-attributes (filename &optional id-format)
645 "Like `file-attributes' for Tramp files." 661 "Like `file-attributes' for Tramp files."
646 (unless id-format (setq id-format 'integer)) 662 (unless id-format (setq id-format 'integer))
@@ -1815,6 +1831,5 @@ Returns nil if an error message has appeared."
1815;; * Try to remove the inclusion of dummy "" directory. Seems to be at 1831;; * Try to remove the inclusion of dummy "" directory. Seems to be at
1816;; several places, especially in `tramp-smb-handle-insert-directory'. 1832;; several places, especially in `tramp-smb-handle-insert-directory'.
1817;; * Ignore case in file names. 1833;; * Ignore case in file names.
1818;; * Implement `tramp-smb-handle-file-acl' for proper Samba versions.
1819 1834
1820;;; tramp-smb.el ends here 1835;;; tramp-smb.el ends here