GNU bug report logs - #17810
24.3.91; file-acl does not return ACL on Mac OS X

Previous Next

Package: emacs;

Reported by: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>

Date: Thu, 19 Jun 2014 10:40:02 UTC

Severity: normal

Tags: moreinfo, patch

Found in version 24.3.91

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17810 in the body.
You can then email your comments to 17810 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17810; Package emacs. (Thu, 19 Jun 2014 10:40:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 19 Jun 2014 10:40:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.91; file-acl does not return ACL on Mac OS X
Date: Thu, 19 Jun 2014 19:39:14 +0900
On Mac OS X >= 10.5, the directory ~/Desktop has ACL, but (file-acl
"~/Desktop") returns nil.

  $ ls -lde ~/Desktop
  drwx------+ 4 mituharu  staff  136  6 11 12:04 /Users/mituharu/Desktop
   0: group:everyone deny delete

A comment in lib/qcopy-acl.c and lib/qset-acl.c says:

  # if !HAVE_ACL_TYPE_EXTENDED
    /* Linux, FreeBSD, IRIX, Tru64 */
...
  # else /* HAVE_ACL_TYPE_EXTENDED */
    /* Mac OS X */

    /* On Mac OS X,  acl_get_file (name, ACL_TYPE_ACCESS)
       and           acl_get_file (name, ACL_TYPE_DEFAULT)
       always return NULL / EINVAL.  You have to use
		     acl_get_file (name, ACL_TYPE_EXTENDED)
       or            acl_get_fd (open (name, ...))
       to retrieve an ACL.
       On the other hand,
		     acl_set_file (name, ACL_TYPE_ACCESS, acl)
       and           acl_set_file (name, ACL_TYPE_DEFAULT, acl)
       have the same effect as
		     acl_set_file (name, ACL_TYPE_EXTENDED, acl):
       Each of these calls sets the file's ACL.  */

So, the following lines in src/fileio.c seems to always result in
returning Qnil.

  acl = acl_get_file (SSDATA (absname), ACL_TYPE_ACCESS);
  if (acl == NULL)
    return Qnil;

If I change the above ACL_TYPE_ACCESS to ACL_TYPE_EXTENDED as an
experiment, then I get the following string as a result of (file-acl
"~/Desktop"):

  "!#acl 1
  group:ABCDEFAB-CDEF-ABCD-EFAB-CDEF0000000C:everyone:12:deny:delete
  "

And I could pass it to set-file-acl to set ACL of another file.

				     YAMAMOTO Mitsuharu
				mituharu <at> math.s.chiba-u.ac.jp





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17810; Package emacs. (Fri, 20 Jun 2014 06:37:02 GMT) Full text and rfc822 format available.

Message #8 received at 17810 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Cc: 17810 <at> debbugs.gnu.org
Subject: Re: 24.3.91; file-acl does not return ACL on Mac OS X
Date: Thu, 19 Jun 2014 23:35:52 -0700
[Message part 1 (text/plain, inline)]
Thanks for the bug report.  Does the attached patch fix things for you? 
 I can't easily test it myself, as I don't use OS X.
[acl.diff (text/plain, attachment)]

Added tag(s) patch. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Fri, 20 Jun 2014 06:44:02 GMT) Full text and rfc822 format available.

Added tag(s) moreinfo. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Fri, 20 Jun 2014 06:44:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17810; Package emacs. (Sat, 21 Jun 2014 03:49:01 GMT) Full text and rfc822 format available.

Message #15 received at 17810 <at> debbugs.gnu.org (full text, mbox):

From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 17810 <at> debbugs.gnu.org
Subject: Re: 24.3.91; file-acl does not return ACL on Mac OS X
Date: Sat, 21 Jun 2014 12:48:17 +0900
>>>>> On Thu, 19 Jun 2014 23:35:52 -0700, Paul Eggert <eggert <at> cs.ucla.edu> said:

> Thanks for the bug report.  Does the attached patch fix things for
> you?  I can't easily test it myself, as I don't use OS X.

Yes, it works for me.  Thanks.

				     YAMAMOTO Mitsuharu
				mituharu <at> math.s.chiba-u.ac.jp




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sat, 21 Jun 2014 07:05:02 GMT) Full text and rfc822 format available.

Notification sent to YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>:
bug acknowledged by developer. (Sat, 21 Jun 2014 07:05:03 GMT) Full text and rfc822 format available.

Message #20 received at 17810-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Cc: 17810-done <at> debbugs.gnu.org
Subject: Re: 24.3.91; file-acl does not return ACL on Mac OS X
Date: Sat, 21 Jun 2014 00:04:30 -0700
OK, I installed that patch as emacs-24 bzr 117271 and am marking this as 
done.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 19 Jul 2014 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 305 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.