* autoload.cc (SetSecurityDescriptorControl): Drop.

* security.cc (alloc_sd): Set security descriptor control flag without
	calling SetSecurityDescriptorControl function.
	* wincap.h (wincapc::has_dacl_protect): Rename from
	has_security_descriptor_control.
	* wincap.cc: Ditto throughout.
This commit is contained in:
Corinna Vinschen
2007-07-19 09:06:54 +00:00
parent 5f9c8e2a87
commit 63a87c815a
5 changed files with 25 additions and 22 deletions

View File

@ -1631,14 +1631,10 @@ alloc_sd (__uid32_t uid, __gid32_t gid, int attribute,
return NULL;
}
/*
* We set the SE_DACL_PROTECTED flag here to prevent the DACL from being
* modified by inheritable ACEs.
* This flag as well as the SetSecurityDescriptorControl call are available
* only since Win2K.
*/
if (wincap.has_security_descriptor_control ())
SetSecurityDescriptorControl (&sd, SE_DACL_PROTECTED, SE_DACL_PROTECTED);
/* We set the SE_DACL_PROTECTED flag here to prevent the DACL from being
* modified by inheritable ACEs. This flag is available since Win2K. */
if (wincap.has_dacl_protect ())
sd.Control |= SE_DACL_PROTECTED;
/* Create owner for local security descriptor. */
if (!SetSecurityDescriptorOwner (&sd, owner_sid, FALSE))