Mercurial > hg > octave-nkf > gnulib-hg
diff lib/copy-acl.c @ 10158:73042342e7f6
New function for testing triviality of ACL with POSIX-draft like API.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Wed, 04 Jun 2008 22:48:48 +0200 |
parents | 3df501903792 |
children | 873cd96bbc65 |
line wrap: on
line diff
--- a/lib/copy-acl.c +++ b/lib/copy-acl.c @@ -68,15 +68,11 @@ if (ACL_NOT_WELL_SUPPORTED (errno)) { - int n = acl_entries (acl); + int nontrivial = acl_access_nontrivial (acl); acl_free (acl); - /* On most hosts with MODE_INSIDE_ACL an ACL is trivial if n == 3, - and it cannot be less than 3. - For simplicity and safety, assume the ACL is trivial if n <= 3. - Also see file-has-acl.c for some of the other possibilities; - it's not clear whether that complexity is needed here. */ - if (n <= 3 * MODE_INSIDE_ACL) + + if (!nontrivial) { if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0) saved_errno = errno;