diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2013-01-02 11:15:31 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2013-01-02 11:15:31 +0100 |
commit | aca3d51dfa45794fa68a2ffb6269e34fcee2ec6c (patch) | |
tree | d3384ef4fc417bf28a207fbf1ccf7e871bd41f84 /lisp/net/tramp-smb.el | |
parent | 9d9ffa13100af63fdb4fd2c6d2595d8abc0dde8b (diff) | |
download | emacs-aca3d51dfa45794fa68a2ffb6269e34fcee2ec6c.tar.gz emacs-aca3d51dfa45794fa68a2ffb6269e34fcee2ec6c.tar.bz2 emacs-aca3d51dfa45794fa68a2ffb6269e34fcee2ec6c.zip |
* net/tramp-sh.el (tramp-sh-handle-set-file-acl): Add argument to
`error' call.
(tramp-do-copy-or-rename-file): Ignore errors when calling
`set-file-extended-attributes'.
* net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add
handler for `file-acl'.
(tramp-smb-handle-file-acl): New defun.
Diffstat (limited to 'lisp/net/tramp-smb.el')
-rw-r--r-- | lisp/net/tramp-smb.el | 19 |
1 files changed, 17 insertions, 2 deletions
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.") (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-acl . tramp-smb-handle-file-acl) (file-attributes . tramp-smb-handle-file-attributes) (file-directory-p . tramp-smb-handle-file-directory-p) (file-executable-p . tramp-handle-file-exists-p) @@ -641,6 +641,22 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." method user host (tramp-run-real-handler 'expand-file-name (list localname)))))) +(defun tramp-smb-handle-file-acl (filename) + "Like `file-acl' for Tramp files." + (with-parsed-tramp-file-name filename nil + (with-tramp-file-property v localname "file-acl" + (when (tramp-smb-send-command + v (format "getfacl \"%s\"" (tramp-smb-get-localname v))) + (with-current-buffer (tramp-get-connection-buffer v) + (goto-char (point-min)) + (while (looking-at-p "^#") + (forward-line) + (delete-region (point-min) (point))) + (goto-char (point-max)) + (delete-blank-lines) + (when (> (point-max) (point-min)) + (substring-no-properties (buffer-string)))))))) + (defun tramp-smb-handle-file-attributes (filename &optional id-format) "Like `file-attributes' for Tramp files." (unless id-format (setq id-format 'integer)) @@ -1815,6 +1831,5 @@ 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 |