Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dlls/sharedgpures.sys/shared_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static void *reference_client_handle(obj_handle_t handle)
cid.UniqueProcess = PsGetCurrentProcessId();
cid.UniqueThread = 0;

if (NtOpenProcess(&client_process, PROCESS_ALL_ACCESS, &attr, &cid) != STATUS_SUCCESS)
if (NtOpenProcess(&client_process, PROCESS_DUP_HANDLE, &attr, &cid) != STATUS_SUCCESS)
return NULL;

if (NtDuplicateObject(client_process, wine_server_ptr_handle(handle), NtCurrentProcess(), &kernel_handle,
Expand Down Expand Up @@ -226,7 +226,7 @@ static obj_handle_t open_client_handle(void *object)
cid.UniqueProcess = PsGetCurrentProcessId();
cid.UniqueThread = 0;

if (NtOpenProcess(&client_process, PROCESS_ALL_ACCESS, &attr, &cid) != STATUS_SUCCESS)
if (NtOpenProcess(&client_process, PROCESS_DUP_HANDLE, &attr, &cid) != STATUS_SUCCESS)
return 0;

if (ObOpenObjectByPointer(object, 0, NULL, GENERIC_ALL, NULL, KernelMode, &kernel_handle) != STATUS_SUCCESS)
Expand Down