Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-07-19 12:36:32 +0400
committerCorinna Vinschen <corinna@vinschen.de>2007-07-19 12:36:32 +0400
commit5f9c8e2a8726a320619242b14802b7ac2a05161c (patch)
tree12955c9c87fde1d4a9478a560cc28806c3419af4 /winsup/cygwin/uinfo.cc
parentcce28460fe93c21d30e227331dcbbdf1d29a96b9 (diff)
* 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.cc8
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");