Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/sec_acl.cc')
-rw-r--r--winsup/cygwin/sec_acl.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc
index e93073794..26ab878c1 100644
--- a/winsup/cygwin/sec_acl.cc
+++ b/winsup/cygwin/sec_acl.cc
@@ -128,7 +128,8 @@ setacl (const char *file, int nentries, __aclent16_t *aclbufp)
allow |= FILE_DELETE_CHILD;
/* Set inherit property. */
DWORD inheritance = (aclbufp[i].a_type & ACL_DEFAULT)
- ? INHERIT_ONLY : DONT_INHERIT;
+ ? (SUB_CONTAINERS_AND_OBJECTS_INHERIT | INHERIT_ONLY)
+ : NO_INHERITANCE;
/*
* If a specific acl contains a corresponding default entry with
* identical permissions, only one Windows ACE with proper
@@ -142,7 +143,7 @@ setacl (const char *file, int nentries, __aclent16_t *aclbufp)
&& pos < nentries
&& aclbufp[i].a_perm == aclbufp[pos].a_perm)
{
- inheritance = INHERIT_ALL;
+ inheritance = SUB_CONTAINERS_AND_OBJECTS_INHERIT;
/* This eliminates the corresponding default entry. */
aclbufp[pos].a_type = 0;
}
@@ -344,12 +345,12 @@ getacl (const char *file, DWORD attr, int nentries, __aclent16_t *aclbufp)
}
if (!type)
continue;
- if (!(ace->Header.AceFlags & INHERIT_ONLY_ACE))
+ if (!(ace->Header.AceFlags & INHERIT_ONLY))
{
if ((pos = searchace (lacl, MAX_ACL_ENTRIES, type, id)) >= 0)
getace (lacl[pos], type, id, ace->Mask, ace->Header.AceType);
}
- if ((ace->Header.AceFlags & INHERIT_ALL)
+ if ((ace->Header.AceFlags & SUB_CONTAINERS_AND_OBJECTS_INHERIT)
&& (attr & FILE_ATTRIBUTE_DIRECTORY))
{
type |= ACL_DEFAULT;