diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-07-19 08:36:32 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-07-19 08:36:32 +0000 |
commit | 5f9c8e2a8726a320619242b14802b7ac2a05161c (patch) | |
tree | 12955c9c87fde1d4a9478a560cc28806c3419af4 /winsup/cygwin/uinfo.cc | |
parent | cce28460fe93c21d30e227331dcbbdf1d29a96b9 (diff) | |
download | cygnal-5f9c8e2a8726a320619242b14802b7ac2a05161c.tar.gz cygnal-5f9c8e2a8726a320619242b14802b7ac2a05161c.tar.bz2 cygnal-5f9c8e2a8726a320619242b14802b7ac2a05161c.zip |
* autoload.cc (SetUserObjectSecurity): Drop.
* pinfo.cc (pinfo::set_acl): Use NtSetSecurityObject instead of
SetKernelObjectSecurity.
* spawn.cc (spawn_guts): Use NtSetSecurityObject instead of
SetUserObjectSecurity.
* uinfo.cc (cygheap_user::init): Ditto.
Diffstat (limited to 'winsup/cygwin/uinfo.cc')
-rw-r--r-- | winsup/cygwin/uinfo.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index c582b629e..a6d8c41b3 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -30,6 +30,7 @@ details. */ #include "child_info.h" #include "environ.h" #include "pwdgrp.h" +#include "ntdll.h" /* Initialize the part of cygheap_user that does not depend on files. The information is used in shared.cc for the user shared. @@ -72,12 +73,15 @@ cygheap_user::init () if (GetSecurityDescriptorDacl (psd, &acl_exists, &dacl.DefaultDacl, &dummy) && acl_exists && dacl.DefaultDacl) { + NTSTATUS status; + /* Set the default DACL and the process DACL */ if (!SetTokenInformation (hProcToken, TokenDefaultDacl, &dacl, sizeof (dacl))) system_printf ("SetTokenInformation (TokenDefaultDacl), %E"); - if (!SetKernelObjectSecurity (hMainProc, DACL_SECURITY_INFORMATION, psd)) - system_printf ("SetKernelObjectSecurity, %E"); + if ((status = NtSetSecurityObject (hMainProc, DACL_SECURITY_INFORMATION, + psd))) + system_printf ("NtSetSecurityObject, %lx", status); } else system_printf("Cannot get dacl, %E"); |