all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
@ 2012-12-19 12:24 Michael Albinus
  2012-12-19 14:32 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Michael Albinus @ 2012-12-19 12:24 UTC (permalink / raw)
  To: 13226

File ACLs have different formats on MS Windows and POSIX systems:

--8<---------------cut here---------------start------------->8---
(file-acl "~/.emacs")

"O:S-1-5-21-3955186872-1115707380-970145838-1000G:S-1-5-21-3955186872-1115707380-970145838-513D:(A;;FA;;;SY)(A;;FA;;;BA)(A;;FA;;;S-1-5-21-3955186872-1115707380-970145838-1000)"

(file-acl "/plink:albinus@ford:~/.emacs")

"user::rwx
group::rwx
other::r-x
"
--8<---------------cut here---------------end--------------->8---

If one copies a file with POSIX ACLs to MS Windows, `set-file-acl'
raises an error. This shall be suppressed:

--8<---------------cut here---------------start------------->8---
(copy-file "/plink:albinus@ford:~/.emacs" temporary-file-directory t t t t)

Debugger entered--Lisp error: (file-error "Converting ACL" "invalid argument" "c:/Users/Michael/AppData/Local/Temp/.emacs")
  set-file-acl("c:/Users/Michael/AppData/Local/Temp/.emacs" "user::rwx\ngroup::rwx\nother::r-x\n")
  set-file-extended-attributes("c:/Users/Michael/AppData/Local/Temp/.emacs" ((acl . "user::rwx\ngroup::rwx\nother::r-x\n") (selinux-context nil nil nil nil)))
  apply(set-file-extended-attributes ("c:/Users/Michael/AppData/Local/Temp/.emacs" ((acl . "user::rwx\ngroup::rwx\nother::r-x\n") (selinux-context nil nil nil nil))))
  (progn (apply (quote set-file-extended-attributes) (list newname attributes)))
  (if attributes (progn (apply (quote set-file-extended-attributes) (list newname attributes))))
  (let ((tramp-message-show-progress-reporter-message (and tramp-message-show-progress-reporter-message (not tm)))) (cond ((and t1 t2) (let* ((v1 (tramp-dissect-file-name filename)) (v1-method (tramp-file-name-method v1)) (v1-user (tramp-file-name-user v1)) (v1-host (tramp-file-name-host v1)) (v1-localname (tramp-file-name-localname v1)) (v1-hop (tramp-file-name-hop v1))) (let* ((v2 (tramp-dissect-file-name newname)) (v2-method (tramp-file-name-method v2)) (v2-user (tramp-file-name-user v2)) (v2-host (tramp-file-name-host v2)) (v2-localname (tramp-file-name-localname v2)) (v2-hop (tramp-file-name-hop v2))) (cond ((tramp-equal-remote filename newname) (tramp-do-copy-or-rename-file-directly op filename newname ok-if-already-exists keep-date preserve-uid-gid)) ((and ... ...) (tramp-do-copy-or-rename-file-out-of-band op filename newname keep-date)) (t (tramp-do-copy-or-rename-file-via-buffer op filename newname keep-date)))))) ((or t1 t2) (cond ((tramp-local-host-p v) (tramp-do-copy-or-rename-file-directly op filename newname ok-if-already-exists keep-date preserve-uid-gid)) ((tramp-method-out-of-band-p v length) (tramp-do-copy-or-rename-file-out-of-band op filename newname keep-date)) (t (tramp-do-copy-or-rename-file-via-buffer op filename newname keep-date)))) (t (error "Tramp implementation says this cannot happen"))) (if attributes (progn (apply (quote set-file-extended-attributes) (list newname attributes)))) (if (and t1 (eq op (quote rename))) (progn (let* ((v1 (tramp-dissect-file-name filename)) (v1-method (tramp-file-name-method v1)) (v1-user (tramp-file-name-user v1)) (v1-host (tramp-file-name-host v1)) (v1-localname (tramp-file-name-localname v1)) (v1-hop (tramp-file-name-hop v1))) (tramp-flush-file-property v1 (file-name-directory localname)) (tramp-flush-file-property v1 localname)))) (if t2 (progn (let* ((v2 (tramp-dissect-file-name newname)) (v2-method (tramp-file-name-method v2)) (v2-user (tramp-file-name-user v2)) (v2-host (tramp-file-name-host v2)) (v2-localname (tramp-file-name-localname v2)) (v2-hop (tramp-file-name-hop v2))) (tramp-flush-file-property v2 (file-name-directory localname)) (tramp-flush-file-property v2 localname)))))
  (unwind-protect (let ((tramp-message-show-progress-reporter-message (and tramp-message-show-progress-reporter-message (not tm)))) (cond ((and t1 t2) (let* ((v1 (tramp-dissect-file-name filename)) (v1-method (tramp-file-name-method v1)) (v1-user (tramp-file-name-user v1)) (v1-host (tramp-file-name-host v1)) (v1-localname (tramp-file-name-localname v1)) (v1-hop (tramp-file-name-hop v1))) (let* ((v2 ...) (v2-method ...) (v2-user ...) (v2-host ...) (v2-localname ...) (v2-hop ...)) (cond (... ...) (... ...) (t ...))))) ((or t1 t2) (cond ((tramp-local-host-p v) (tramp-do-copy-or-rename-file-directly op filename newname ok-if-already-exists keep-date preserve-uid-gid)) ((tramp-method-out-of-band-p v length) (tramp-do-copy-or-rename-file-out-of-band op filename newname keep-date)) (t (tramp-do-copy-or-rename-file-via-buffer op filename newname keep-date)))) (t (error "Tramp implementation says this cannot happen"))) (if attributes (progn (apply (quote set-file-extended-attributes) (list newname attributes)))) (if (and t1 (eq op (quote rename))) (progn (let* ((v1 (tramp-dissect-file-name filename)) (v1-method (tramp-file-name-method v1)) (v1-user (tramp-file-name-user v1)) (v1-host (tramp-file-name-host v1)) (v1-localname (tramp-file-name-localname v1)) (v1-hop (tramp-file-name-hop v1))) (tramp-flush-file-property v1 (file-name-directory localname)) (tramp-flush-file-property v1 localname)))) (if t2 (progn (let* ((v2 (tramp-dissect-file-name newname)) (v2-method (tramp-file-name-method v2)) (v2-user (tramp-file-name-user v2)) (v2-host (tramp-file-name-host v2)) (v2-localname (tramp-file-name-localname v2)) (v2-hop (tramp-file-name-hop v2))) (tramp-flush-file-property v2 (file-name-directory localname)) (tramp-flush-file-property v2 localname))))) (if tm (if (or (subrp (quote cancel-timer)) (functionp (quote cancel-timer))) (progn (with-no-warnings (funcall (quote cancel-timer) tm))))) (tramp-message v 0 "%s...done" (format "%s %s to %s" (if (eq op (quote copy)) "Copying" "Renaming") filename newname)))
  (let (pr tm) (tramp-message v 0 "%s..." (format "%s %s to %s" (if (eq op (quote copy)) "Copying" "Renaming") filename newname)) (if (and tramp-message-show-progress-reporter-message tramp-message-show-message (<= 0 (min tramp-verbose 3))) (progn (condition-case nil (progn (setq pr (if (or ... ...) (progn ...)) tm (if pr (progn ...)))) (error nil)))) (unwind-protect (let ((tramp-message-show-progress-reporter-message (and tramp-message-show-progress-reporter-message (not tm)))) (cond ((and t1 t2) (let* ((v1 ...) (v1-method ...) (v1-user ...) (v1-host ...) (v1-localname ...) (v1-hop ...)) (let* (... ... ... ... ... ...) (cond ... ... ...)))) ((or t1 t2) (cond ((tramp-local-host-p v) (tramp-do-copy-or-rename-file-directly op filename newname ok-if-already-exists keep-date preserve-uid-gid)) ((tramp-method-out-of-band-p v length) (tramp-do-copy-or-rename-file-out-of-band op filename newname keep-date)) (t (tramp-do-copy-or-rename-file-via-buffer op filename newname keep-date)))) (t (error "Tramp implementation says this cannot happen"))) (if attributes (progn (apply (quote set-file-extended-attributes) (list newname attributes)))) (if (and t1 (eq op (quote rename))) (progn (let* ((v1 ...) (v1-method ...) (v1-user ...) (v1-host ...) (v1-localname ...) (v1-hop ...)) (tramp-flush-file-property v1 (file-name-directory localname)) (tramp-flush-file-property v1 localname)))) (if t2 (progn (let* ((v2 ...) (v2-method ...) (v2-user ...) (v2-host ...) (v2-localname ...) (v2-hop ...)) (tramp-flush-file-property v2 (file-name-directory localname)) (tramp-flush-file-property v2 localname))))) (if tm (if (or (subrp (quote cancel-timer)) (functionp (quote cancel-timer))) (progn (with-no-warnings (funcall (quote cancel-timer) tm))))) (tramp-message v 0 "%s...done" (format "%s %s to %s" (if (eq op (quote copy)) "Copying" "Renaming") filename newname))))
  (let* ((v (tramp-dissect-file-name (if t1 filename newname))) (method (tramp-file-name-method v)) (user (tramp-file-name-user v)) (host (tramp-file-name-host v)) (localname (tramp-file-name-localname v)) (hop (tramp-file-name-hop v))) (if (and (not ok-if-already-exists) (file-exists-p newname)) (progn (tramp-error v (quote file-already-exists) "File %s already exists" newname))) (let (pr tm) (tramp-message v 0 "%s..." (format "%s %s to %s" (if (eq op (quote copy)) "Copying" "Renaming") filename newname)) (if (and tramp-message-show-progress-reporter-message tramp-message-show-message (<= 0 (min tramp-verbose 3))) (progn (condition-case nil (progn (setq pr (if ... ...) tm (if pr ...))) (error nil)))) (unwind-protect (let ((tramp-message-show-progress-reporter-message (and tramp-message-show-progress-reporter-message (not tm)))) (cond ((and t1 t2) (let* (... ... ... ... ... ...) (let* ... ...))) ((or t1 t2) (cond (... ...) (... ...) (t ...))) (t (error "Tramp implementation says this cannot happen"))) (if attributes (progn (apply (quote set-file-extended-attributes) (list newname attributes)))) (if (and t1 (eq op (quote rename))) (progn (let* (... ... ... ... ... ...) (tramp-flush-file-property v1 ...) (tramp-flush-file-property v1 localname)))) (if t2 (progn (let* (... ... ... ... ... ...) (tramp-flush-file-property v2 ...) (tramp-flush-file-property v2 localname))))) (if tm (if (or (subrp (quote cancel-timer)) (functionp (quote cancel-timer))) (progn (with-no-warnings (funcall ... tm))))) (tramp-message v 0 "%s...done" (format "%s %s to %s" (if (eq op (quote copy)) "Copying" "Renaming") filename newname)))))
  (let ((t1 (tramp-tramp-file-p filename)) (t2 (tramp-tramp-file-p newname)) (length (nth 7 (file-attributes (file-truename filename)))) (attributes (and preserve-extended-attributes (apply (quote file-extended-attributes) (list filename)))) pr tm) (let* ((v (tramp-dissect-file-name (if t1 filename newname))) (method (tramp-file-name-method v)) (user (tramp-file-name-user v)) (host (tramp-file-name-host v)) (localname (tramp-file-name-localname v)) (hop (tramp-file-name-hop v))) (if (and (not ok-if-already-exists) (file-exists-p newname)) (progn (tramp-error v (quote file-already-exists) "File %s already exists" newname))) (let (pr tm) (tramp-message v 0 "%s..." (format "%s %s to %s" (if (eq op (quote copy)) "Copying" "Renaming") filename newname)) (if (and tramp-message-show-progress-reporter-message tramp-message-show-message (<= 0 (min tramp-verbose 3))) (progn (condition-case nil (progn (setq pr ... tm ...)) (error nil)))) (unwind-protect (let ((tramp-message-show-progress-reporter-message (and tramp-message-show-progress-reporter-message ...))) (cond ((and t1 t2) (let* ... ...)) ((or t1 t2) (cond ... ... ...)) (t (error "Tramp implementation says this cannot happen"))) (if attributes (progn (apply ... ...))) (if (and t1 (eq op ...)) (progn (let* ... ... ...))) (if t2 (progn (let* ... ... ...)))) (if tm (if (or (subrp ...) (functionp ...)) (progn (with-no-warnings ...)))) (tramp-message v 0 "%s...done" (format "%s %s to %s" (if (eq op ...) "Copying" "Renaming") filename newname))))))
  tramp-do-copy-or-rename-file(copy "/plink:admin@ford:/share/albinus/.emacs" "c:/Users/Michael/AppData/Local/Temp/.emacs" t t t t)
  (cond ((or (tramp-tramp-file-p filename) (tramp-tramp-file-p newname)) (tramp-do-copy-or-rename-file (quote copy) filename newname ok-if-already-exists keep-date preserve-uid-gid preserve-extended-attributes)) (preserve-extended-attributes (tramp-run-real-handler (quote copy-file) (list filename newname ok-if-already-exists keep-date preserve-uid-gid preserve-extended-attributes))) (preserve-uid-gid (tramp-run-real-handler (quote copy-file) (list filename newname ok-if-already-exists keep-date preserve-uid-gid))) (t (tramp-run-real-handler (quote copy-file) (list filename newname ok-if-already-exists keep-date))))
  tramp-sh-handle-copy-file("/plink:admin@ford:/share/albinus/.emacs" "c:/Users/Michael/AppData/Local/Temp/.emacs" t t t t)
  apply(tramp-sh-handle-copy-file ("/plink:admin@ford:/share/albinus/.emacs" "c:/Users/Michael/AppData/Local/Temp/.emacs" t t t t))
  (if fn (apply (cdr fn) args) (tramp-run-real-handler operation args))
  (let ((fn (assoc operation tramp-sh-file-name-handler-alist))) (if fn (apply (cdr fn) args) (tramp-run-real-handler operation args)))
  (progn (let ((fn (assoc operation tramp-sh-file-name-handler-alist))) (if fn (apply (cdr fn) args) (tramp-run-real-handler operation args))))
  (unwind-protect (progn (let ((fn (assoc operation tramp-sh-file-name-handler-alist))) (if fn (apply (cdr fn) args) (tramp-run-real-handler operation args)))) (set-match-data save-match-data-internal (quote evaporate)))
  (let ((save-match-data-internal (match-data))) (unwind-protect (progn (let ((fn (assoc operation tramp-sh-file-name-handler-alist))) (if fn (apply (cdr fn) args) (tramp-run-real-handler operation args)))) (set-match-data save-match-data-internal (quote evaporate))))
  (let ((tramp-locker t)) (let ((save-match-data-internal (match-data))) (unwind-protect (progn (let ((fn (assoc operation tramp-sh-file-name-handler-alist))) (if fn (apply (cdr fn) args) (tramp-run-real-handler operation args)))) (set-match-data save-match-data-internal (quote evaporate)))))
  (progn (setq tramp-locked t) (let ((tramp-locker t)) (let ((save-match-data-internal (match-data))) (unwind-protect (progn (let ((fn ...)) (if fn (apply ... args) (tramp-run-real-handler operation args)))) (set-match-data save-match-data-internal (quote evaporate))))))
  (unwind-protect (progn (setq tramp-locked t) (let ((tramp-locker t)) (let ((save-match-data-internal (match-data))) (unwind-protect (progn (let (...) (if fn ... ...))) (set-match-data save-match-data-internal (quote evaporate)))))) (setq tramp-locked tl))
  (let ((tl tramp-locked)) (unwind-protect (progn (setq tramp-locked t) (let ((tramp-locker t)) (let ((save-match-data-internal (match-data))) (unwind-protect (progn (let ... ...)) (set-match-data save-match-data-internal (quote evaporate)))))) (setq tramp-locked tl)))
  tramp-sh-file-name-handler(copy-file "/plink:admin@ford:/share/albinus/.emacs" "c:/Users/Michael/AppData/Local/Temp/.emacs" t t t t)
  apply(tramp-sh-file-name-handler copy-file ("/plink:admin@ford:/share/albinus/.emacs" "c:/Users/Michael/AppData/Local/Temp/.emacs" t t t t))
  (catch (quote suppress) (apply foreign operation args))
  (catch (quote non-essential) (catch (quote suppress) (apply foreign operation args)))
  (setq result (catch (quote non-essential) (catch (quote suppress) (apply foreign operation args))))
  (let ((sf (symbol-function foreign)) result) (if (and (listp sf) (eq (car sf) (quote autoload))) (progn (let ((default-directory (tramp-compat-temporary-file-directory))) (load (cadr sf) (quote noerror) (quote nomessage))))) (setq result (catch (quote non-essential) (catch (quote suppress) (apply foreign operation args)))) (cond ((eq result (quote non-essential)) (tramp-message v 5 "Non-essential received in operation %s" (append (list operation) args)) (tramp-run-real-handler operation args)) ((eq result (quote suppress)) (let (tramp-message-show-message) (tramp-message v 1 "Suppress received in operation %s" (append (list operation) args)) (tramp-cleanup v) (tramp-run-real-handler operation args))) (t result)))
  (lambda nil (let ((sf (symbol-function foreign)) result) (if (and (listp sf) (eq (car sf) (quote autoload))) (progn (let ((default-directory (tramp-compat-temporary-file-directory))) (load (cadr sf) (quote noerror) (quote nomessage))))) (setq result (catch (quote non-essential) (catch (quote suppress) (apply foreign operation args)))) (cond ((eq result (quote non-essential)) (tramp-message v 5 "Non-essential received in operation %s" (append (list operation) args)) (tramp-run-real-handler operation args)) ((eq result (quote suppress)) (let (tramp-message-show-message) (tramp-message v 1 "Suppress received in operation %s" (append (list operation) args)) (tramp-cleanup v) (tramp-run-real-handler operation args))) (t result))))()
  funcall((lambda nil (let ((sf (symbol-function foreign)) result) (if (and (listp sf) (eq (car sf) (quote autoload))) (progn (let ((default-directory (tramp-compat-temporary-file-directory))) (load (cadr sf) (quote noerror) (quote nomessage))))) (setq result (catch (quote non-essential) (catch (quote suppress) (apply foreign operation args)))) (cond ((eq result (quote non-essential)) (tramp-message v 5 "Non-essential received in operation %s" (append (list operation) args)) (tramp-run-real-handler operation args)) ((eq result (quote suppress)) (let (tramp-message-show-message) (tramp-message v 1 "Suppress received in operation %s" (append (list operation) args)) (tramp-cleanup v) (tramp-run-real-handler operation args))) (t result)))))
  (if debug-on-error (funcall body) (condition-case err (funcall body) ((debug quit) (let (tramp-message-show-message) (tramp-message v 1 "Interrupt received in operation %s" (append (list operation) args))) (signal (car err) (cdr err))) (error (cond ((and completion (zerop (length localname)) (memq operation (quote ...))) t) ((and completion (zerop (length localname)) (memq operation (quote ...))) filename) (t (signal (car err) (cdr err)))))))
  (let ((body (function (lambda nil (let ((sf ...) result) (if (and ... ...) (progn ...)) (setq result (catch ... ...)) (cond (... ... ...) (... ...) (t result))))))) (if debug-on-error (funcall body) (condition-case err (funcall body) ((debug quit) (let (tramp-message-show-message) (tramp-message v 1 "Interrupt received in operation %s" (append (list operation) args))) (signal (car err) (cdr err))) (error (cond ((and completion (zerop ...) (memq operation ...)) t) ((and completion (zerop ...) (memq operation ...)) filename) (t (signal (car err) (cdr err))))))))
  (if foreign (let ((body (function (lambda nil (let (... result) (if ... ...) (setq result ...) (cond ... ... ...)))))) (if debug-on-error (funcall body) (condition-case err (funcall body) ((debug quit) (let (tramp-message-show-message) (tramp-message v 1 "Interrupt received in operation %s" (append ... args))) (signal (car err) (cdr err))) (error (cond ((and completion ... ...) t) ((and completion ... ...) filename) (t (signal ... ...))))))) (tramp-run-real-handler operation args))
  (let* ((v (tramp-dissect-file-name filename)) (method (tramp-file-name-method v)) (user (tramp-file-name-user v)) (host (tramp-file-name-host v)) (localname (tramp-file-name-localname v)) (hop (tramp-file-name-hop v))) (if foreign (let ((body (function (lambda nil (let ... ... ... ...))))) (if debug-on-error (funcall body) (condition-case err (funcall body) ((debug quit) (let (tramp-message-show-message) (tramp-message v 1 "Interrupt received in operation %s" ...)) (signal (car err) (cdr err))) (error (cond (... t) (... filename) (t ...)))))) (tramp-run-real-handler operation args)))
  (let* ((filename (tramp-replace-environment-variables (apply (quote tramp-file-name-for-operation) operation args))) (completion (tramp-completion-mode-p)) (foreign (tramp-find-foreign-file-name-handler filename))) (let* ((v (tramp-dissect-file-name filename)) (method (tramp-file-name-method v)) (user (tramp-file-name-user v)) (host (tramp-file-name-host v)) (localname (tramp-file-name-localname v)) (hop (tramp-file-name-hop v))) (if foreign (let ((body (function (lambda nil ...)))) (if debug-on-error (funcall body) (condition-case err (funcall body) ((debug quit) (let ... ...) (signal ... ...)) (error (cond ... ... ...))))) (tramp-run-real-handler operation args))))
  (progn (let* ((filename (tramp-replace-environment-variables (apply (quote tramp-file-name-for-operation) operation args))) (completion (tramp-completion-mode-p)) (foreign (tramp-find-foreign-file-name-handler filename))) (let* ((v (tramp-dissect-file-name filename)) (method (tramp-file-name-method v)) (user (tramp-file-name-user v)) (host (tramp-file-name-host v)) (localname (tramp-file-name-localname v)) (hop (tramp-file-name-hop v))) (if foreign (let ((body (function ...))) (if debug-on-error (funcall body) (condition-case err (funcall body) (... ... ...) (error ...)))) (tramp-run-real-handler operation args)))))
  (unwind-protect (progn (let* ((filename (tramp-replace-environment-variables (apply (quote tramp-file-name-for-operation) operation args))) (completion (tramp-completion-mode-p)) (foreign (tramp-find-foreign-file-name-handler filename))) (let* ((v (tramp-dissect-file-name filename)) (method (tramp-file-name-method v)) (user (tramp-file-name-user v)) (host (tramp-file-name-host v)) (localname (tramp-file-name-localname v)) (hop (tramp-file-name-hop v))) (if foreign (let ((body ...)) (if debug-on-error (funcall body) (condition-case err ... ... ...))) (tramp-run-real-handler operation args))))) (set-match-data save-match-data-internal (quote evaporate)))
  (let ((save-match-data-internal (match-data))) (unwind-protect (progn (let* ((filename (tramp-replace-environment-variables (apply ... operation args))) (completion (tramp-completion-mode-p)) (foreign (tramp-find-foreign-file-name-handler filename))) (let* ((v (tramp-dissect-file-name filename)) (method (tramp-file-name-method v)) (user (tramp-file-name-user v)) (host (tramp-file-name-host v)) (localname (tramp-file-name-localname v)) (hop (tramp-file-name-hop v))) (if foreign (let (...) (if debug-on-error ... ...)) (tramp-run-real-handler operation args))))) (set-match-data save-match-data-internal (quote evaporate))))
  (if tramp-mode (let ((save-match-data-internal (match-data))) (unwind-protect (progn (let* ((filename (tramp-replace-environment-variables ...)) (completion (tramp-completion-mode-p)) (foreign (tramp-find-foreign-file-name-handler filename))) (let* ((v ...) (method ...) (user ...) (host ...) (localname ...) (hop ...)) (if foreign (let ... ...) (tramp-run-real-handler operation args))))) (set-match-data save-match-data-internal (quote evaporate)))) (tramp-run-real-handler operation args))
  tramp-file-name-handler(copy-file "/plink:admin@ford:/share/albinus/.emacs" "c:/Users/Michael/AppData/Local/Temp/.emacs" t t t t)
  copy-file("/plink:admin@ford:/share/albinus/.emacs" "c:/Users/Michael/AppData/Local/Temp/" t t t t)
  eval((copy-file "/plink:admin@ford:/share/albinus/.emacs" temporary-file-directory t t t t) nil)
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)
--8<---------------cut here---------------end--------------->8---




In GNU Emacs 24.3.50.1 (i386-mingw-nt6.1.7600)
 of 2012-12-18 on MS-W7-DANI
Bzr revision: 111265 eliz@gnu.org-20121218190556-x9wmq083vwecgu0f
Windowing system distributor `Microsoft Corp.', version 6.1.7600
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -Ic:/emacs/libs/libXpm-3.5.10/include -Ic:/emacs/libs/libXpm-3.5.10/src
 -Ic:/emacs/libs/libpng-dev_1.4.3-1_win32/include
 -Ic:/emacs/libs/zlib-dev_1.2.5-2_win32/include
 -Ic:/emacs/libs/giflib-4.1.4-1-lib/include
 -Ic:/emacs/libs/jpeg-6b-4-lib/include
 -Ic:/emacs/libs/tiff-3.8.2-1-lib/include
 -Ic:/emacs/libs/libxml2-2.7.8-w32-bin/include/libxml2
 -Ic:/emacs/libs/gnutls-3.0.9-w32-bin/include
 -Ic:/emacs/libs/libiconv-1.9.2-1-lib/include'

Important settings:
  value of $LANG: DEU
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<escape> x r e p o <tab> r <tab> <delete> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...
delete-forward-char: End of buffer

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils help-mode easymenu time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns
disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer button faces cus-face
macroexp files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process w32notify w32 multi-tty emacs)





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 12:24 bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format Michael Albinus
@ 2012-12-19 14:32 ` Stefan Monnier
  2012-12-19 14:38   ` Michael Albinus
  2012-12-19 16:33   ` Eli Zaretskii
  2012-12-19 14:34 ` Stefan Monnier
  2012-12-19 16:23 ` Eli Zaretskii
  2 siblings, 2 replies; 20+ messages in thread
From: Stefan Monnier @ 2012-12-19 14:32 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 13226

> (file-acl "~/.emacs")

> "O:S-1-5-21-3955186872-1115707380-970145838-1000G:S-1-5-21-3955186872-1115707380-970145838-513D:(A;;FA;;;SY)(A;;FA;;;BA)(A;;FA;;;S-1-5-21-3955186872-1115707380-970145838-1000)"

This looks thoroughly unportable.

> (file-acl "/plink:albinus@ford:~/.emacs")

> "user::rwx
> group::rwx
> other::r-x
> "

We should probably change file-acl so that its return value is tagged
with the "acl-system" it uses.  It could be a prefix like "w32:".
Then we can change set-file-acl so that it can either try to perform
conversion or signal a proper error that copy-file can handle.


        Stefan





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 12:24 bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format Michael Albinus
  2012-12-19 14:32 ` Stefan Monnier
@ 2012-12-19 14:34 ` Stefan Monnier
  2012-12-19 14:59   ` Michael Albinus
  2012-12-19 16:23 ` Eli Zaretskii
  2 siblings, 1 reply; 20+ messages in thread
From: Stefan Monnier @ 2012-12-19 14:34 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 13226

> (file-acl "/plink:albinus@ford:~/.emacs")

> "user::rwx
> group::rwx
> other::r-x
> "

BTW, the above is 100% redundant with the file-modes info.  Is there
some way to get "the ACL data minus the part that's already in
file-modes".  E.g. in the above case it could return nil.


        Stefan





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 14:32 ` Stefan Monnier
@ 2012-12-19 14:38   ` Michael Albinus
  2012-12-19 16:25     ` Eli Zaretskii
  2012-12-19 16:33   ` Eli Zaretskii
  1 sibling, 1 reply; 20+ messages in thread
From: Michael Albinus @ 2012-12-19 14:38 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 13226

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> We should probably change file-acl so that its return value is tagged
> with the "acl-system" it uses.  It could be a prefix like "w32:".
> Then we can change set-file-acl so that it can either try to perform
> conversion or signal a proper error that copy-file can handle.

D'accord. Instead of a prefix, `file-acl' could return a cons cell like
'(w32 . "ACL-STRING").

>         Stefan

Best regards, Michael.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 14:34 ` Stefan Monnier
@ 2012-12-19 14:59   ` Michael Albinus
  2012-12-19 15:46     ` Romain Francoise
  2012-12-19 16:29     ` Eli Zaretskii
  0 siblings, 2 replies; 20+ messages in thread
From: Michael Albinus @ 2012-12-19 14:59 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Romain Francoise, 13226

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> (file-acl "/plink:albinus@ford:~/.emacs")
>
>> "user::rwx
>> group::rwx
>> other::r-x
>> "
>
> BTW, the above is 100% redundant with the file-modes info.  Is there
> some way to get "the ACL data minus the part that's already in
> file-modes".  E.g. in the above case it could return nil.

The "getfacl" command has the "--skip-base" option:

--8<---------------cut here---------------start------------->8---
~> getfacl --access --omit-header ~/.emacs 2>/dev/null
user::rwx
group::rwx
other::r-x
~> getfacl --access --omit-header --skip-base ~/.emacs
~> 
--8<---------------cut here---------------end--------------->8---

I could apply this. And it shall be possible in the native Ffile_acl
function as well. Romain?

>         Stefan

Best regards, Michael.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 14:59   ` Michael Albinus
@ 2012-12-19 15:46     ` Romain Francoise
  2012-12-19 15:57       ` Michael Albinus
  2012-12-19 16:29     ` Eli Zaretskii
  1 sibling, 1 reply; 20+ messages in thread
From: Romain Francoise @ 2012-12-19 15:46 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 13226

Michael Albinus <michael.albinus@gmx.de> writes:

> And it shall be possible in the native Ffile_acl function as well.
> Romain?

Yes, we can use the `acl_equiv_mode' function for that. However, it's not
part of the standard API, it's a Linux-specific extension in libacl. So it
wouldn't be supported on all platforms.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 15:46     ` Romain Francoise
@ 2012-12-19 15:57       ` Michael Albinus
  0 siblings, 0 replies; 20+ messages in thread
From: Michael Albinus @ 2012-12-19 15:57 UTC (permalink / raw)
  To: Romain Francoise; +Cc: 13226

Romain Francoise <romain@orebokech.com> writes:

> Yes, we can use the `acl_equiv_mode' function for that. However, it's not
> part of the standard API, it's a Linux-specific extension in libacl. So it
> wouldn't be supported on all platforms.

The same would happen for Tramp, if the remote platform is not
GNU/Linux. In that case, we might tolerate that the basic ACLs are
returned by file-acl as well.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 12:24 bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format Michael Albinus
  2012-12-19 14:32 ` Stefan Monnier
  2012-12-19 14:34 ` Stefan Monnier
@ 2012-12-19 16:23 ` Eli Zaretskii
  2012-12-19 16:55   ` Michael Albinus
  2 siblings, 1 reply; 20+ messages in thread
From: Eli Zaretskii @ 2012-12-19 16:23 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 13226

> From: Michael Albinus <michael.albinus@gmx.de>
> Date: Wed, 19 Dec 2012 13:24:45 +0100
> 
> File ACLs have different formats on MS Windows and POSIX systems:
> 
> --8<---------------cut here---------------start------------->8---
> (file-acl "~/.emacs")
> 
> "O:S-1-5-21-3955186872-1115707380-970145838-1000G:S-1-5-21-3955186872-1115707380-970145838-513D:(A;;FA;;;SY)(A;;FA;;;BA)(A;;FA;;;S-1-5-21-3955186872-1115707380-970145838-1000)"
> 
> (file-acl "/plink:albinus@ford:~/.emacs")
> 
> "user::rwx
> group::rwx
> other::r-x
> "
> --8<---------------cut here---------------end--------------->8---
> 
> If one copies a file with POSIX ACLs to MS Windows, `set-file-acl'
> raises an error. This shall be suppressed:

I assume that you want the error suppressed on MS-Windows, is that
right?  (The Subject of the report says "shall check the ACL string",
which the code already does; I guess you wanted to say "shall not" or
some such.)

If so, I don't think I agree, for several reasons.

First, this is in no way Windows specific.  In fact, when I added ACL
support for MS-Windows, I didn't change a single line in set-file-acl,
the code which tested for errors and signaled a file_error was already
there.  If I try this on GNU/Unix:

  (set-file-acl "foobar" "foo bar")

I get the same error:

  Debugger entered--Lisp error: (file-error "Converting ACL" "invalid argument" "/home/e/eliz/foobar")
    set-file-acl("foobar" "foo bar")

Which doesn't surprise me, since the code is not Windows specific, and
acl_from_text is documented to be able to produce EINVAL when its
string argument could not be converted to a valid ACL.

Second, I think it would be wrong to remove the error-checking code
from set-file-acl.  That function is a primitive, so signaling an
error when it cannot do its job is TRT; removing that would at best
take away a valuable diagnostics, and at worst disable your last line
of defense in some cases.  After all, whoever wants to set the file's
ACL to something does that for a reason; silently failing to do that
would give them no chance to take some corrective action.

OTOH, if an application, in this case Tramp, decides that it can
ignore these errors in some cases, it should catch the error and
ignore it.  It shouldn't pass the baton to primitives, IMO.  IOW, if
you want this suppressed, I think you should do it inside the Tramp
handler for copy-file.

Finally, I question the whole idea of copying ACLs between machines,
because they are inherently system-dependent, and even if both
machines run the same system, a user "foo" and a group "bar" on both
machines are likely to map to very different users and groups, at
least on Posix hosts.  (On Windows, the Security Identifiers, or SIDs,
of the user and the group that are recorded in the ACL are universal,
so this problem doesn't exist.)  So I'd actually suggest that we
explicitly refrain from doing this with remote files.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 14:38   ` Michael Albinus
@ 2012-12-19 16:25     ` Eli Zaretskii
  0 siblings, 0 replies; 20+ messages in thread
From: Eli Zaretskii @ 2012-12-19 16:25 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 13226

> From: Michael Albinus <michael.albinus@gmx.de>
> Date: Wed, 19 Dec 2012 15:38:12 +0100
> Cc: 13226@debbugs.gnu.org
> 
> Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
> 
> > We should probably change file-acl so that its return value is tagged
> > with the "acl-system" it uses.  It could be a prefix like "w32:".
> > Then we can change set-file-acl so that it can either try to perform
> > conversion or signal a proper error that copy-file can handle.
> 
> D'accord. Instead of a prefix, `file-acl' could return a cons cell like
> '(w32 . "ACL-STRING").

What would that solve?  You cannot trust the ACL string obtained on
one machine to work on another anyway.  Adding the above will just add
unnecessary ballast that no one will ever be able to do anything
useful with.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 14:59   ` Michael Albinus
  2012-12-19 15:46     ` Romain Francoise
@ 2012-12-19 16:29     ` Eli Zaretskii
  2012-12-19 16:42       ` Romain Francoise
  2012-12-19 18:36       ` Stefan Monnier
  1 sibling, 2 replies; 20+ messages in thread
From: Eli Zaretskii @ 2012-12-19 16:29 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 13226

> From: Michael Albinus <michael.albinus@gmx.de>
> Date: Wed, 19 Dec 2012 15:59:05 +0100
> Cc: Romain Francoise <romain@orebokech.com>, 13226@debbugs.gnu.org
> 
> Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
> 
> >> (file-acl "/plink:albinus@ford:~/.emacs")
> >
> >> "user::rwx
> >> group::rwx
> >> other::r-x
> >> "
> >
> > BTW, the above is 100% redundant with the file-modes info.  Is there
> > some way to get "the ACL data minus the part that's already in
> > file-modes".  E.g. in the above case it could return nil.
> 
> The "getfacl" command has the "--skip-base" option:
> 
> --8<---------------cut here---------------start------------->8---
> ~> getfacl --access --omit-header ~/.emacs 2>/dev/null
> user::rwx
> group::rwx
> other::r-x
> ~> getfacl --access --omit-header --skip-base ~/.emacs
> ~> 
> --8<---------------cut here---------------end--------------->8---
> 
> I could apply this. And it shall be possible in the native Ffile_acl
> function as well. Romain?

I don't think this is a good idea.  You cannot do this portably.  In
particular, on MS-Windows this is impossible, because the set of
access rights is much richer than on Posix, and there are various
"inheritance" parts in the ACL that cannot be expressed as mode bits.

Even on Posix, there's the "default" ACL which in practice affects the
access rights, and is invisible in the "access" ACL.

I think we are taking this feature out of proportions.  It was
supposed to allow copying extended attributes from file to file; for
that, we don't need to care whether the ACL is trivial or not.  But
now we seem to start down the road of trying to interpret the ACL,
which would need much more complex machinery.  Do we really need that?





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 14:32 ` Stefan Monnier
  2012-12-19 14:38   ` Michael Albinus
@ 2012-12-19 16:33   ` Eli Zaretskii
  1 sibling, 0 replies; 20+ messages in thread
From: Eli Zaretskii @ 2012-12-19 16:33 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: michael.albinus, 13226

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Date: Wed, 19 Dec 2012 09:32:36 -0500
> Cc: 13226@debbugs.gnu.org
> 
> > (file-acl "~/.emacs")
> 
> > "O:S-1-5-21-3955186872-1115707380-970145838-1000G:S-1-5-21-3955186872-1115707380-970145838-513D:(A;;FA;;;SY)(A;;FA;;;BA)(A;;FA;;;S-1-5-21-3955186872-1115707380-970145838-1000)"
> 
> This looks thoroughly unportable.

It is explicitly documented as platform-specific in the ELisp manual.

Once again, the original design had a modest goal: allow to copy these
attributes from file to file.  Are you sure we want to extend that to
a much more complex system which would allow a Lisp program to
interpret those strings in a platform-independent manner?

> We should probably change file-acl so that its return value is tagged
> with the "acl-system" it uses.  It could be a prefix like "w32:".

As I wrote elsewhere, I don't see the rationale.

> Then we can change set-file-acl so that it can either try to perform
> conversion or signal a proper error that copy-file can handle.

copy-file the primitive is not affected, it already does TRT with this
scenario.  copy-file handler for remote files should simply catch and
ignore the errors, like the primitive does.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 16:29     ` Eli Zaretskii
@ 2012-12-19 16:42       ` Romain Francoise
  2012-12-19 16:56         ` Eli Zaretskii
  2012-12-19 18:36       ` Stefan Monnier
  1 sibling, 1 reply; 20+ messages in thread
From: Romain Francoise @ 2012-12-19 16:42 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Michael Albinus, 13226

Eli Zaretskii <eliz@gnu.org> writes:

> I think we are taking this feature out of proportions. It was supposed
> to allow copying extended attributes from file to file; for that, we
> don't need to care whether the ACL is trivial or not. But now we seem to
> start down the road of trying to interpret the ACL, which would need
> much more complex machinery. Do we really need that?

I agree with the sentiment, although it's not so much interpreting as just
avoiding having to carry the ACL if it doesn't convey any interesting
information... And at least on GNU/Linux it's not a lot of code:

diff --git a/configure.ac b/configure.ac
index 3c8be79..30740a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2206,6 +2206,10 @@ if test "${with_acl}" = "yes"; then
   if test "$HAVE_POSIX_ACL" = yes; then
     AC_DEFINE(HAVE_POSIX_ACL, 1, [Define to 1 if using POSIX ACL support.])
     LIBACL_LIBS=-lacl
+    OLD_LIBS="$LIBS"
+    LIBS="$LIBACL_LIBS $LIBS"
+    AC_CHECK_FUNCS(acl_equiv_mode)
+    LIBS="$OLD_LIBS"
   else
     AC_CHECK_FUNC(acl_set_file, HAVE_POSIX_ACL=yes, HAVE_POSIX_ACL=no)
     if test "$HAVE_POSIX_ACL" = yes; then
diff --git a/src/fileio.c b/src/fileio.c
index 26150a7..872e2be 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2030,6 +2030,15 @@ entries (depending on how Emacs was built).  */)
       acl = acl_get_fd (ifd);
       if (acl == NULL && errno != ENOTSUP)
 	report_file_error ("Getting ACL", Fcons (file, Qnil));
+#ifdef HAVE_ACL_EQUIV_MODE
+      if (acl != NULL && acl_equiv_mode (acl, NULL) == 0)
+	{
+	  /* All permissions can be represented by traditional file
+	     permission bits, ignore ACL.  */
+	  acl_free (acl);
+	  acl = NULL;
+	}
+#endif
 #endif
     }
 
@@ -3042,6 +3051,16 @@ files if the file handler returns nil for the file's ACL entries.  */)
   if (acl == NULL)
     return Qnil;
 
+#ifdef HAVE_ACL_EQUIV_MODE
+  if (acl_equiv_mode (acl, NULL) == 0)
+    {
+      /* All permissions can be represented by traditional file
+	 permission bits, ignore ACL.  */
+      acl_free (acl);
+      return Qnil;
+    }
+#endif
+
   str = acl_to_text (acl, NULL);
   if (str == NULL)
     {





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 16:23 ` Eli Zaretskii
@ 2012-12-19 16:55   ` Michael Albinus
  0 siblings, 0 replies; 20+ messages in thread
From: Michael Albinus @ 2012-12-19 16:55 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 13226

Eli Zaretskii <eliz@gnu.org> writes:

> Finally, I question the whole idea of copying ACLs between machines,
> because they are inherently system-dependent, and even if both
> machines run the same system, a user "foo" and a group "bar" on both
> machines are likely to map to very different users and groups, at
> least on Posix hosts.

Maybe. But a user "root" is comparable on different hosts.

And copying ACLs between two different files on the same remote host
sounds useful.

What might be sufficient is that `set-file-acl' raises another error but
`file-error' in case the operation fails. `file-error' would be good, if
the file itself does not exist, and alike. Tramp could decide then what
to do.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 16:42       ` Romain Francoise
@ 2012-12-19 16:56         ` Eli Zaretskii
  2012-12-19 17:44           ` Michael Albinus
  0 siblings, 1 reply; 20+ messages in thread
From: Eli Zaretskii @ 2012-12-19 16:56 UTC (permalink / raw)
  To: Romain Francoise; +Cc: michael.albinus, 13226

> From: Romain Francoise <romain@orebokech.com>
> Cc: Michael Albinus <michael.albinus@gmx.de>,  monnier@IRO.UMontreal.CA,  13226@debbugs.gnu.org
> Date: Wed, 19 Dec 2012 17:42:18 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > I think we are taking this feature out of proportions. It was supposed
> > to allow copying extended attributes from file to file; for that, we
> > don't need to care whether the ACL is trivial or not. But now we seem to
> > start down the road of trying to interpret the ACL, which would need
> > much more complex machinery. Do we really need that?
> 
> I agree with the sentiment, although it's not so much interpreting as just
> avoiding having to carry the ACL if it doesn't convey any interesting
> information...

Why avoid that in the first place?  It won't do any harm.

> And at least on GNU/Linux it's not a lot of code:

I don't think this is worth supporting on a single platform.  All it
does is save a single call to acl_set_file, which is not expensive
enough to avoid at the price of yet another system-dependent code
snippet.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 16:56         ` Eli Zaretskii
@ 2012-12-19 17:44           ` Michael Albinus
  0 siblings, 0 replies; 20+ messages in thread
From: Michael Albinus @ 2012-12-19 17:44 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 13226

Eli Zaretskii <eliz@gnu.org> writes:

> I don't think this is worth supporting on a single platform.  All it
> does is save a single call to acl_set_file, which is not expensive
> enough to avoid at the price of yet another system-dependent code
> snippet.

In Tramp, it is a little bit more expensive. And as Romain already said,
it would work only on GNU/Linux systems. If we do it with a single line
of code, and if we don't expect basic attributes to be filtered out
mandatory, I don't see how it could harm.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 16:29     ` Eli Zaretskii
  2012-12-19 16:42       ` Romain Francoise
@ 2012-12-19 18:36       ` Stefan Monnier
  2012-12-19 21:18         ` Eli Zaretskii
  1 sibling, 1 reply; 20+ messages in thread
From: Stefan Monnier @ 2012-12-19 18:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Michael Albinus, 13226

> I think we are taking this feature out of proportions.  It was
> supposed to allow copying extended attributes from file to file; for
> that, we don't need to care whether the ACL is trivial or not.  But
> now we seem to start down the road of trying to interpret the ACL,
> which would need much more complex machinery.

That makes sense, yes.  BTW, I don't think we should document that
file-acl returns a string.  The representation should be documented
as undocumented and prone to change (ideally opaque).


        Stefan





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 18:36       ` Stefan Monnier
@ 2012-12-19 21:18         ` Eli Zaretskii
  2012-12-20  0:53           ` Stefan Monnier
  0 siblings, 1 reply; 20+ messages in thread
From: Eli Zaretskii @ 2012-12-19 21:18 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: michael.albinus, 13226

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Michael Albinus <michael.albinus@gmx.de>,  romain@orebokech.com,  13226@debbugs.gnu.org
> Date: Wed, 19 Dec 2012 13:36:43 -0500
> 
> I don't think we should document that file-acl returns a string.
> The representation should be documented as undocumented and prone to
> change (ideally opaque).

Currently, it could be either a string or nil.  The latter means "no
ACL".  Do you want to undocument both of these possibilities?  It
sounds too radical to me.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-19 21:18         ` Eli Zaretskii
@ 2012-12-20  0:53           ` Stefan Monnier
  2012-12-22 14:19             ` Eli Zaretskii
  0 siblings, 1 reply; 20+ messages in thread
From: Stefan Monnier @ 2012-12-20  0:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: romain, michael.albinus, 13226

> Currently, it could be either a string or nil.  The latter means "no
> ACL".  Do you want to undocument both of these possibilities?  It
> sounds too radical to me.

Of course nil is perfectly fine, but the string one shouldn't
be documented (and ideally, the it shouldn't be a string but an opaque
object).


        Stefan





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-20  0:53           ` Stefan Monnier
@ 2012-12-22 14:19             ` Eli Zaretskii
  2013-01-04 13:20               ` Michael Albinus
  0 siblings, 1 reply; 20+ messages in thread
From: Eli Zaretskii @ 2012-12-22 14:19 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: romain, michael.albinus, 13226

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: michael.albinus@gmx.de,  romain@orebokech.com,  13226@debbugs.gnu.org
> Date: Wed, 19 Dec 2012 19:53:08 -0500
> 
> > Currently, it could be either a string or nil.  The latter means "no
> > ACL".  Do you want to undocument both of these possibilities?  It
> > sounds too radical to me.
> 
> Of course nil is perfectly fine, but the string one shouldn't
> be documented (and ideally, the it shouldn't be a string but an opaque
> object).

Done (the documentation part) in trunk revision 111296.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format
  2012-12-22 14:19             ` Eli Zaretskii
@ 2013-01-04 13:20               ` Michael Albinus
  0 siblings, 0 replies; 20+ messages in thread
From: Michael Albinus @ 2013-01-04 13:20 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: romain, 13226-done

Tramp has implemented to return nil if `set-file-acl' could not set the
attributes. Furthermore, the call of `set-file-extended-attributes' has
been protected in Tramp.

Closing the bug.





^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2013-01-04 13:20 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-19 12:24 bug#13226: 24.3.50; set-file-acl on MS Windows shall check ACL string format Michael Albinus
2012-12-19 14:32 ` Stefan Monnier
2012-12-19 14:38   ` Michael Albinus
2012-12-19 16:25     ` Eli Zaretskii
2012-12-19 16:33   ` Eli Zaretskii
2012-12-19 14:34 ` Stefan Monnier
2012-12-19 14:59   ` Michael Albinus
2012-12-19 15:46     ` Romain Francoise
2012-12-19 15:57       ` Michael Albinus
2012-12-19 16:29     ` Eli Zaretskii
2012-12-19 16:42       ` Romain Francoise
2012-12-19 16:56         ` Eli Zaretskii
2012-12-19 17:44           ` Michael Albinus
2012-12-19 18:36       ` Stefan Monnier
2012-12-19 21:18         ` Eli Zaretskii
2012-12-20  0:53           ` Stefan Monnier
2012-12-22 14:19             ` Eli Zaretskii
2013-01-04 13:20               ` Michael Albinus
2012-12-19 16:23 ` Eli Zaretskii
2012-12-19 16:55   ` Michael Albinus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.