summaryrefslogtreecommitdiff
path: root/lib/copy-acl.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2008-06-08 16:52:23 +0200
committerBruno Haible <bruno@clisp.org>2008-06-08 16:52:23 +0200
commitc3dcd03b1c12d7a7e80e573dd09168feb469b1e2 (patch)
treef5173a74ba0a42abb8866796b4a575a7d217a6c0 /lib/copy-acl.c
parent1a8b4204eb2da184d514e1f23789d45d1ebc7c85 (diff)
downloadgnulib-c3dcd03b1c12d7a7e80e573dd09168feb469b1e2.tar.gz
Add support for Cygwin ACLs.
Diffstat (limited to 'lib/copy-acl.c')
-rw-r--r--lib/copy-acl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/copy-acl.c b/lib/copy-acl.c
index 34f02923a4..d20fa04bb1 100644
--- a/lib/copy-acl.c
+++ b/lib/copy-acl.c
@@ -330,8 +330,7 @@ qcopy_acl (const char *src_name, int source_desc, const char *dst_name,
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 @@ qcopy_acl (const char *src_name, int source_desc, const char *dst_name,
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. */