changeset 10170:75a6b6b966a8

Avoid needing to know the textual representation of an ACL when possible.
author Bruno Haible <bruno@clisp.org>
date Sun, 08 Jun 2008 04:39:51 +0200
parents 7215efd0ff4f
children f988df7e273d
files ChangeLog lib/set-mode-acl.c
diffstat 2 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Jun 08 04:34:52 2008 +0200
+++ b/ChangeLog	Sun Jun 08 04:39:51 2008 +0200
@@ -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
--- a/lib/set-mode-acl.c	Sun Jun 08 04:34:52 2008 +0200
+++ b/lib/set-mode-acl.c	Sun Jun 08 04:39:51 2008 +0200
@@ -153,13 +153,7 @@
     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)