* 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:
Corinna Vinschen
2002-08-26 09:56:06 +00:00
parent 2e2b268ce6
commit 38170b13ea
3 changed files with 108 additions and 170 deletions

View File

@@ -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);