Mercurial > gnulib
diff lib/copy-acl.c @ 10181:5282ccc922b9
Add support for Cygwin ACLs.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 08 Jun 2008 16:52:23 +0200 |
parents | 90f51b86b088 |
children | 4a177f4b083f |
line wrap: on
line diff
--- a/lib/copy-acl.c Sun Jun 08 16:33:02 2008 +0200 +++ b/lib/copy-acl.c Sun Jun 08 16:52:23 2008 +0200 @@ -330,8 +330,7 @@ if (count == 0) return qset_acl (dst_name, dest_desc, mode); - did_chmod = 0; /* set to 1 once the mode bits in 0777 have been set, - set to 2 once the mode bits other than 0777 have been set */ + did_chmod = 0; /* set to 1 once the mode bits in 0777 have been set */ saved_errno = 0; /* the first non-ignorable error code */ /* If both ace_entries and entries are available, try SETACL before @@ -371,7 +370,8 @@ free (ace_entries); # endif - if (did_chmod <= ((mode & (S_ISUID | S_ISGID | S_ISVTX)) ? 1 : 0)) + if (!MODE_INSIDE_ACL + || did_chmod <= ((mode & (S_ISUID | S_ISGID | S_ISVTX)) ? 1 : 0)) { /* We did not call chmod so far, and either the mode and the ACL are separate or special bits are to be set which don't fit into ACLs. */