ntoskrnl.exe: Open thread with THREAD_QUERY_INFORMATION access in KeGetCurrentThread.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7d351e1168
commit
2017db7d0a
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue