Commit 2017db7d authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

ntoskrnl.exe: Open thread with THREAD_QUERY_INFORMATION access in KeGetCurrentThread.

parent 7d351e11
......@@ -2510,7 +2510,8 @@ PRKTHREAD WINAPI KeGetCurrentThread(void)
HANDLE handle = GetCurrentThread();
/* FIXME: we shouldn't need it, GetCurrentThread() should be client thread already */
if (GetCurrentThreadId() == request_thread) handle = OpenThread( 0, FALSE, client_tid );
if (GetCurrentThreadId() == request_thread)
handle = OpenThread( THREAD_QUERY_INFORMATION, FALSE, client_tid );
kernel_object_from_handle( handle, PsThreadType, (void**)&thread );
if (handle != GetCurrentThread()) NtClose( handle );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment