Alexandre Julliard : ntdll: Fix a few more thread information access rights.
Alexandre Julliard
julliard at winehq.org
Tue Jun 30 14:55:05 CDT 2020
Module: wine
Branch: master
Commit: 64731a8e9fce07a7c34374dc0a6bb6ed8b5f6183
URL: https://source.winehq.org/git/wine.git/?a=commit;h=64731a8e9fce07a7c34374dc0a6bb6ed8b5f6183
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Jun 30 10:02:22 2020 +0200
ntdll: Fix a few more thread information access rights.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kernel32/tests/thread.c | 3 ---
dlls/ntdll/unix/thread.c | 2 ++
server/thread.c | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c
index b91d279e32..b476e44cfc 100644
--- a/dlls/kernel32/tests/thread.c
+++ b/dlls/kernel32/tests/thread.c
@@ -2215,12 +2215,9 @@ static void test_thread_info(void)
#endif
case ThreadTimes:
-todo_wine
ok(status == STATUS_SUCCESS, "for info %u expected STATUS_SUCCESS, got %08x (ret_len %u)\n", i, status, ret_len);
break;
- case ThreadAffinityMask:
- case ThreadQuerySetWin32StartAddress:
case ThreadIsIoPending:
todo_wine
ok(status == STATUS_ACCESS_DENIED, "for info %u expected STATUS_ACCESS_DENIED, got %08x (ret_len %u)\n", i, status, ret_len);
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
index cee288b3e1..5f6841b0e8 100644
--- a/dlls/ntdll/unix/thread.c
+++ b/dlls/ntdll/unix/thread.c
@@ -895,6 +895,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
SERVER_START_REQ( get_thread_info )
{
req->handle = wine_server_obj_handle( handle );
+ req->access = THREAD_QUERY_INFORMATION;
if (!(status = wine_server_call( req ))) affinity = reply->affinity & affinity_mask;
}
SERVER_END_REQ;
@@ -973,6 +974,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
SERVER_START_REQ( get_thread_info )
{
req->handle = wine_server_obj_handle( handle );
+ req->access = THREAD_QUERY_INFORMATION;
status = wine_server_call( req );
if (status == STATUS_SUCCESS)
{
diff --git a/server/thread.c b/server/thread.c
index b656cd37a1..d55af204bd 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -1553,7 +1553,7 @@ DECL_HANDLER(get_thread_times)
{
struct thread *thread;
- if ((thread = get_thread_from_handle( req->handle, THREAD_QUERY_INFORMATION )))
+ if ((thread = get_thread_from_handle( req->handle, THREAD_QUERY_LIMITED_INFORMATION )))
{
reply->creation_time = thread->creation_time;
reply->exit_time = thread->exit_time;
More information about the wine-cvs
mailing list