diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2002-08-26 09:56:06 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2002-08-26 09:56:06 +0000 |
commit | 38170b13ea763c0e62f7a5568f07d1f482e69232 (patch) | |
tree | d002674171164ad9dbd3cb0ebbf434cf7a82ba18 /winsup/cygwin/sec_acl.cc | |
parent | 2e2b268ce6c2cf278e255a8cccaf40cbdfe7b4ec (diff) | |
download | cygnal-38170b13ea763c0e62f7a5568f07d1f482e69232.tar.gz cygnal-38170b13ea763c0e62f7a5568f07d1f482e69232.tar.bz2 cygnal-38170b13ea763c0e62f7a5568f07d1f482e69232.zip |
* sec_acl.cc (getacl): Check ace_sid == well_known_world_sid
before owner_sid and group_sid so that well_known_world_sid
means "other" even when owner_sid and/or group_sid are Everyone.
* security.cc (get_attribute_from_acl): Created from code common
to get_nt_attribute() and get_nt_object_attribute(), with same
reordering as in getacl() above.
(get_nt_attribute): Call get_attribute_from_acl().
(get_nt_object_attribute): Ditto.
Diffstat (limited to 'winsup/cygwin/sec_acl.cc')
-rw-r--r-- | winsup/cygwin/sec_acl.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc index 26ab878c1..cd20cfd54 100644 --- a/winsup/cygwin/sec_acl.cc +++ b/winsup/cygwin/sec_acl.cc @@ -314,7 +314,12 @@ getacl (const char *file, DWORD attr, int nentries, __aclent16_t *aclbufp) int id; int type = 0; - if (ace_sid == owner_sid) + if (ace_sid == well_known_world_sid) + { + type = OTHER_OBJ; + id = 0; + } + else if (ace_sid == owner_sid) { type = USER_OBJ; id = uid; @@ -324,11 +329,6 @@ getacl (const char *file, DWORD attr, int nentries, __aclent16_t *aclbufp) type = GROUP_OBJ; id = gid; } - else if (ace_sid == well_known_world_sid) - { - type = OTHER_OBJ; - id = 0; - } else { id = ace_sid.get_id (FALSE, &type); |