From 53b6a8b11383585ae8a175bf53964e35e889d338 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 17 Dec 2012 15:38:07 +0100 Subject: Add support for preserving ACL entries of files. * net/tramp.el (tramp-file-name-for-operation): Add `file-acl' and `set-file-acl' handlers. * net/tramp-adb.el (tramp-adb-handle-copy-file): Handle PRESERVE-EXTENDED-ATTRIBUTES. * net/tramp-compat.el (tramp-compat-copy-file): Handle PRESERVE-EXTENDED-ATTRIBUTES. * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `file-acl' and `set-file-acl' handlers. (tramp-gvfs-handle-copy-file): Handle PRESERVE-EXTENDED-ATTRIBUTES. (tramp-gvfs-handle-file-acl, tramp-gvfs-handle-set-file-acl): New defuns. * net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `file-acl' and `set-file-acl' handlers. (tramp-remote-acl-p, tramp-sh-handle-file-acl) (tramp-sh-handle-set-file-acl): New defuns. (tramp-sh-handle-copy-file, tramp-do-copy-or-rename-file): Handle PRESERVE-EXTENDED-ATTRIBUTES. * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `file-acl' and `set-file-acl' handlers. (tramp-smb-handle-copy-file): Handle PRESERVE-EXTENDED-ATTRIBUTES. --- lisp/net/tramp-smb.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lisp/net/tramp-smb.el') diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index d4386a5374c..f97d4620b97 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -195,6 +195,7 @@ See `tramp-actions-before-shell' for more info.") (dired-uncache . tramp-handle-dired-uncache) (expand-file-name . tramp-smb-handle-expand-file-name) (file-accessible-directory-p . tramp-smb-handle-file-directory-p) + (file-acl . ignore) (file-attributes . tramp-smb-handle-file-attributes) (file-directory-p . tramp-smb-handle-file-directory-p) (file-executable-p . tramp-handle-file-exists-p) @@ -227,6 +228,7 @@ See `tramp-actions-before-shell' for more info.") (make-symbolic-link . tramp-smb-handle-make-symbolic-link) (process-file . tramp-smb-handle-process-file) (rename-file . tramp-smb-handle-rename-file) + (set-file-acl . ignore) (set-file-modes . tramp-smb-handle-set-file-modes) ;; `set-file-selinux-context' performed by default handler. (set-file-times . ignore) @@ -487,10 +489,10 @@ pass to the OPERATION." (defun tramp-smb-handle-copy-file (filename newname &optional ok-if-already-exists keep-date - preserve-uid-gid preserve-selinux-context) + preserve-uid-gid preserve-extended-attributes) "Like `copy-file' for Tramp files. KEEP-DATE has no effect in case NEWNAME resides on an SMB server. -PRESERVE-UID-GID and PRESERVE-SELINUX-CONTEXT are completely ignored." +PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." (setq filename (expand-file-name filename) newname (expand-file-name newname)) (with-tramp-progress-reporter @@ -1813,5 +1815,6 @@ Returns nil if an error message has appeared." ;; * Try to remove the inclusion of dummy "" directory. Seems to be at ;; several places, especially in `tramp-smb-handle-insert-directory'. ;; * Ignore case in file names. +;; * Implement `tramp-smb-handle-file-acl' for proper Samba versions. ;;; tramp-smb.el ends here -- cgit v1.2.1