Jim Meyering wrote: > Looks good. > You're welcome to commit regardless of the acl_trivial > issue mentioned below.
Thanks, applied with a tweak (attached below) that should fix a probable breakage on IRIX in the original proposal. > Once you've investigated Solaris ACLs you might want to adjust that > comment. I seem to recall seeing trivial ones with 4 or 5 entries. > ... > Have you considered using acl_trivial (also used in file-has-acl.c) > or a replacement that encapsulates this test? Haven't thought about it yet. Is it the syntactic or semantic triviality of the ACL which matters? (Example: If the file has the mode rwx------, owner = 101, and an additional ACL "user:150:---", the ACL is semantically trivial: the additional ACL has no effect, since user 150 cannot access the file anyway. But it's not syntactically trivial: 'ls' or getfacl displays it, and after the mode is changed to rwxrwx--- the additional ACL becomes effective.) Also, I'm not sure whether it's worth to use a function whose only known implementation (in Solaris) is buggy: http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6664043 Bruno --- ChangeLog.orig 2008-05-23 02:37:07.000000000 +0200 +++ ChangeLog 2008-05-23 02:36:17.000000000 +0200 @@ -9,8 +9,8 @@ * lib/copy-acl.c (copy_acl): Add support for platforms with !MODE_INSIDE_ACL. * lib/file-has-acl.c (file_has_acl): Likewise. - * m4/acl.m4 (gl_FUNC_ACL): Test for some functions that are witness - of FreeBSD or MacOS X, respectively. + * m4/acl.m4 (gl_FUNC_ACL): Test for some functions that are witness of + FreeBSD, MacOS X, or IRIX, respectively. 2008-05-22 Bruno Haible <[EMAIL PROTECTED]> --- lib/acl.c.orig 2008-05-23 02:37:07.000000000 +0200 +++ lib/acl.c 2008-05-23 02:34:00.000000000 +0200 @@ -83,7 +83,7 @@ would need to create a qualifier. I don't know how to do this. So create it using acl_from_text(). */ -# if HAVE_ACL_DELETE_FD_NP && HAVE_ACL_DELETE_FILE_NP /* FreeBSD */ +# if (HAVE_ACL_DELETE_FD_NP && HAVE_ACL_DELETE_FILE_NP) || HAVE_ACL_TO_SHORT_TEXT /* FreeBSD, IRIX */ char acl_text[] = "u::---,g::---,o::---"; if (mode & S_IRUSR) acl_text[ 3] = 'r'; --- m4/acl.m4.orig 2008-05-23 02:37:07.000000000 +0200 +++ m4/acl.m4 2008-05-23 02:33:13.000000000 +0200 @@ -37,7 +37,8 @@ acl_free acl_from_mode acl_from_text \ acl_delete_def_file acl_extended_file \ acl_delete_fd_np acl_delete_file_np \ - acl_copy_ext_native acl_create_entry_np]) + acl_copy_ext_native acl_create_entry_np \ + acl_to_short_text]) if test $ac_cv_func_acl_get_file = yes; then # If the acl_get_file bug is detected, disable all ACL support. gl_ACL_GET_FILE( , [use_acl=0])
