Avoid needing to know the textual representation of an ACL when possible.
authorBruno Haible <bruno@clisp.org>
Sun, 8 Jun 2008 02:39:51 +0000 (04:39 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 8 Jun 2008 02:39:51 +0000 (04:39 +0200)
ChangeLog
lib/set-mode-acl.c

index e373fd0046cd489bffb70ec27cc1e7fbb11255f2..6b4b68e56fd747aff840c30d6330f372efcb5ebf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-07  Bruno Haible  <bruno@clisp.org>
+
+       * lib/set-mode-acl.c (qset_acl): Use acl_init(), not acl_from_text(),
+       to construct an empty ACL.
+
 2008-06-07  Bruno Haible  <bruno@clisp.org>
 
        * lib/set-mode-acl.c (chmod_or_fchmod): Document return value
index ae146c32b362eb18dc8af25e808d70f768ba34c9..cf59738659bed98bd330438d4fc73833765cc1bc 100644 (file)
@@ -153,13 +153,7 @@ qset_acl (char const *name, int desc, mode_t mode)
     acl = acl_get_file (name, ACL_TYPE_ACCESS);
   if (acl)
     {
-#   if HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP /* MacOS X */
-      static const char empty_acl_text[] = "!#acl 1\n";
-#   else /* Unknown flavor of POSIX-like ACLs */
-#    error Unknown flavor of POSIX-like ACLs - add support for your platform.
-#   endif
-
-      acl = acl_from_text (empty_acl_text);
+      acl = acl_init (0);
       if (acl)
        {
          if (HAVE_ACL_SET_FD && desc != -1)