diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-07-19 09:06:54 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-07-19 09:06:54 +0000 |
commit | 63a87c815a3b539fff5a16c7e86f9adffacadc1e (patch) | |
tree | 18d653b6f888008233794b50fb023fa6932136ea /winsup/cygwin/security.cc | |
parent | 5f9c8e2a8726a320619242b14802b7ac2a05161c (diff) | |
download | cygnal-63a87c815a3b539fff5a16c7e86f9adffacadc1e.tar.gz cygnal-63a87c815a3b539fff5a16c7e86f9adffacadc1e.tar.bz2 cygnal-63a87c815a3b539fff5a16c7e86f9adffacadc1e.zip |
* 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.
Diffstat (limited to 'winsup/cygwin/security.cc')
-rw-r--r-- | winsup/cygwin/security.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index d76bbb1d8..df4953a44 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -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)) |