diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2002-07-02 08:11:15 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2002-07-02 08:11:15 +0000 |
commit | 654bad37a696e27a4cdcfcf23ee3ec7e58d34b35 (patch) | |
tree | 3e576e859a7611e11f995a8e538b88e3f7f49aca /winsup/cygwin/sec_acl.cc | |
parent | b23a38b29e7c49b4a897f511f30f5e054ae27b8f (diff) | |
download | cygnal-654bad37a696e27a4cdcfcf23ee3ec7e58d34b35.tar.gz cygnal-654bad37a696e27a4cdcfcf23ee3ec7e58d34b35.tar.bz2 cygnal-654bad37a696e27a4cdcfcf23ee3ec7e58d34b35.zip |
* security.h (DONT_INHERIT): Eliminate definition.
(INHERIT_ALL): Ditto.
(INHERIT_ONLY): Ditto.
* sec_acl.cc: Use appropriate defines from accctrl.h instead of the
above throughout.
* security.cc: Ditto.
Diffstat (limited to 'winsup/cygwin/sec_acl.cc')
-rw-r--r-- | winsup/cygwin/sec_acl.cc | 9 |
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; |