Function: tramp-smb-handle-file-acl
tramp-smb-handle-file-acl is a byte-compiled function defined in
tramp-smb.el.gz.
Signature
(tramp-smb-handle-file-acl FILENAME)
Documentation
Like file-acl for Tramp files.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-smb.el.gz
(defun tramp-smb-handle-file-acl (filename)
"Like `file-acl' for Tramp files."
(ignore-errors
(with-parsed-tramp-file-name filename nil
(with-tramp-file-property v localname "file-acl"
(when (tramp-smb-remote-acl-p v)
(let* ((share (tramp-smb-get-share v))
(localname (string-replace
"\\" "/" (tramp-smb-get-localname v)))
(args (list (concat "//" host "/" share) "-E"))
(options tramp-smb-options))
(setq args
(append args
(if (tramp-string-empty-or-nil-p user)
(list "-N")
(list "-U" (if domain (concat domain "/" user) user)))
(when port (list "-p" port))))
(when tramp-smb-conf
(setq args (append args (list "-s" tramp-smb-conf))))
(while options
(setq args
(append args `("--option" ,(format "%s" (car options))))
options (cdr options)))
(setq
args
(append args (list (tramp-unquote-shell-quote-argument localname)
(concat "2>" (tramp-get-remote-null-device v)))))
(with-tramp-saved-connection-properties
v '(" process-name" " process-buffer")
(with-temp-buffer
;; Set the transfer process properties.
(tramp-set-connection-property
v " process-name" (buffer-name (current-buffer)))
(tramp-set-connection-property
v " process-buffer" (current-buffer))
;; Use an asynchronous process. By this, password
;; can be handled.
(let ((p (apply
#'tramp-start-process v
(tramp-get-connection-name v)
(tramp-get-connection-buffer v)
tramp-smb-acl-program args)))
(tramp-process-actions p v nil tramp-smb-actions-get-acl)
(when (> (point-max) (point-min))
(substring-no-properties (buffer-string))))))))))))