Commit 0d21e1cb authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard

server: Only require THREAD_SET_LIMITED_INFORMATION access to set thread description.

parent 21c37356
......@@ -2538,13 +2538,11 @@ static void test_thread_description(void)
thread = OpenThread(THREAD_SET_LIMITED_INFORMATION, FALSE, GetCurrentThreadId());
hr = pSetThreadDescription(thread, desc);
todo_wine
ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#lx.\n", hr);
ptr = NULL;
hr = pGetThreadDescription(GetCurrentThread(), &ptr);
ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#lx.\n", hr);
todo_wine
ok(!lstrcmpW(ptr, desc), "Unexpected description %s.\n", wine_dbgstr_w(ptr));
LocalFree(ptr);
......
......@@ -1534,8 +1534,10 @@ DECL_HANDLER(get_thread_times)
DECL_HANDLER(set_thread_info)
{
struct thread *thread;
unsigned int access = (req->mask == SET_THREAD_INFO_DESCRIPTION) ? THREAD_SET_LIMITED_INFORMATION
: THREAD_SET_INFORMATION;
if ((thread = get_thread_from_handle( req->handle, THREAD_SET_INFORMATION )))
if ((thread = get_thread_from_handle( req->handle, access )))
{
set_thread_info( thread, req );
release_object( thread );
......
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