From f16706de978322fb69a39bae0dd817fb2fdaeaf2 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 18 Dec 2009 20:32:04 +0000 Subject: Throughout, replace hMainProc with GetCurrentProcess/NtCurrentProcess according to context. Throughout, replace hMainThread with GetCurrentThread/NtCurrentThread according to context. * dcrt0.cc (dll_crt0_0): Drop duplication of GetCurrentProcess to hMainProc. Drop duplication of GetCurrentThread to hMainThread. * dtable.cc (dtable::stdio_init): Remove useless comment. * globals.cc (hMainProc): Remove. (hMainThread): Remove. * ntdll.h (NtCurrentProcess): Define. (NtCurrentThread: Define. --- winsup/cygwin/uinfo.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/uinfo.cc') diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 440efbb38..2695d8176 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -78,8 +78,8 @@ cygheap_user::init () if (!SetTokenInformation (hProcToken, TokenDefaultDacl, &dacl, sizeof (dacl))) system_printf ("SetTokenInformation (TokenDefaultDacl), %E"); - if ((status = NtSetSecurityObject (hMainProc, DACL_SECURITY_INFORMATION, - psd))) + if ((status = NtSetSecurityObject (NtCurrentProcess (), + DACL_SECURITY_INFORMATION, psd))) system_printf ("NtSetSecurityObject, %lx", status); } else -- cgit v1.2.3