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/spawn.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/spawn.cc')
-rw-r--r-- | winsup/cygwin/spawn.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 69a904314..604376880 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -34,6 +34,7 @@ details. */ #include "environ.h" #include "cygtls.h" #include "winf.h" +#include "ntdll.h" static suffix_info exe_suffixes[] = { @@ -514,15 +515,18 @@ loop: /* allow the child to interact with our window station/desktop */ HANDLE hwst, hdsk; SECURITY_INFORMATION dsi = DACL_SECURITY_INFORMATION; + NTSTATUS status; DWORD n; char wstname[1024]; char dskname[1024]; hwst = GetProcessWindowStation (); - SetUserObjectSecurity (hwst, &dsi, get_null_sd ()); + if ((status = NtSetSecurityObject (hwst, dsi, get_null_sd ()))) + system_printf ("NtSetSecurityObject, %lx", status); GetUserObjectInformation (hwst, UOI_NAME, wstname, 1024, &n); hdsk = GetThreadDesktop (GetCurrentThreadId ()); - SetUserObjectSecurity (hdsk, &dsi, get_null_sd ()); + if ((status = NtSetSecurityObject (hdsk, dsi, get_null_sd ()))) + system_printf ("NtSetSecurityObject, %lx", status); GetUserObjectInformation (hdsk, UOI_NAME, dskname, 1024, &n); strcat (wstname, "\\"); strcat (wstname, dskname); |