From e2a11610122b032c651ec408ebae7dde1b99d79d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 8 Jun 2008 04:39:51 +0200 Subject: [PATCH] Avoid needing to know the textual representation of an ACL when possible. --- ChangeLog | 5 +++++ lib/set-mode-acl.c | 8 +------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index e373fd004..6b4b68e56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-06-07 Bruno Haible + * lib/set-mode-acl.c (qset_acl): Use acl_init(), not acl_from_text(), + to construct an empty ACL. + +2008-06-07 Bruno Haible + * lib/set-mode-acl.c (chmod_or_fchmod): Document return value precisely. * lib/copy-acl.c (qcopy_acl): Trivial code simplifications. diff --git a/lib/set-mode-acl.c b/lib/set-mode-acl.c index ae146c32b..cf5973865 100644 --- a/lib/set-mode-acl.c +++ b/lib/set-mode-acl.c @@ -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) -- 2.11.0