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:
authorCorinna Vinschen <corinna@vinschen.de>2002-08-26 13:56:06 +0400
committerCorinna Vinschen <corinna@vinschen.de>2002-08-26 13:56:06 +0400
commit38170b13ea763c0e62f7a5568f07d1f482e69232 (patch)
treed002674171164ad9dbd3cb0ebbf434cf7a82ba18 /winsup/cygwin/sec_acl.cc
parent2e2b268ce6c2cf278e255a8cccaf40cbdfe7b4ec (diff)
* 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.cc12
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);