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.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user