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>2009-12-18 23:32:04 +0300
committerCorinna Vinschen <corinna@vinschen.de>2009-12-18 23:32:04 +0300
commitf16706de978322fb69a39bae0dd817fb2fdaeaf2 (patch)
tree057ab687428b320ffe92db406a7767039756e398 /winsup/cygwin/flock.cc
parent333a47d316455824fb63bf35938a1c8ea870b84b (diff)
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.
Diffstat (limited to 'winsup/cygwin/flock.cc')
-rw-r--r--winsup/cygwin/flock.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc
index 11a2a5731..e31add840 100644
--- a/winsup/cygwin/flock.cc
+++ b/winsup/cygwin/flock.cc
@@ -155,7 +155,8 @@ allow_others_to_sync ()
to avoid having to alloc 64K from the stack. */
tmp_pathbuf tp;
PSECURITY_DESCRIPTOR sd = (PSECURITY_DESCRIPTOR) tp.w_get ();
- status = NtQuerySecurityObject (hMainProc, DACL_SECURITY_INFORMATION, sd,
+ status = NtQuerySecurityObject (NtCurrentProcess (),
+ DACL_SECURITY_INFORMATION, sd,
NT_MAX_PATH * sizeof (WCHAR), &len);
if (!NT_SUCCESS (status))
{
@@ -182,7 +183,7 @@ allow_others_to_sync ()
}
dacl->AclSize = (char *) ace - (char *) dacl;
/* Write the DACL back. */
- status = NtSetSecurityObject (hMainProc, DACL_SECURITY_INFORMATION, sd);
+ status = NtSetSecurityObject (NtCurrentProcess (), DACL_SECURITY_INFORMATION, sd);
if (!NT_SUCCESS (status))
{
debug_printf ("NtSetSecurityObject: %p", status);