* 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.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user