A handle created with just PROCESS_QUERY_LIMITED_INFORMATION should be returned when queried with PROCESS_QUERY_INFORMATION.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56093
-- v3: server: Allow VirtualQueryEx on "limited" handle.
From: Bernhard Übelacker bernhardu@mailbox.org
A handle created with just PROCESS_QUERY_LIMITED_INFORMATION should allow VirtualQueryEx / APC_VIRTUAL_QUERY.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56093 --- dlls/kernel32/tests/process.c | 2 +- server/thread.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c index e0f1d210e58..0e5bf82530b 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -1852,7 +1852,7 @@ static void test_OpenProcess(void) ok(info.Type == MEM_PRIVATE, "%lx != MEM_PRIVATE\n", info.Type); } else /* before win8 */ - ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %ld\n", GetLastError()); + ok(broken(GetLastError() == ERROR_ACCESS_DENIED), "wrong error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ok(!VirtualFreeEx(hproc, addr1, 0, MEM_RELEASE), diff --git a/server/thread.c b/server/thread.c index 50eddabe8eb..56f57cefd8f 100644 --- a/server/thread.c +++ b/server/thread.c @@ -1734,7 +1734,7 @@ DECL_HANDLER(queue_apc) process = get_process_from_handle( req->handle, PROCESS_VM_OPERATION ); break; case APC_VIRTUAL_QUERY: - process = get_process_from_handle( req->handle, PROCESS_QUERY_INFORMATION ); + process = get_process_from_handle( req->handle, PROCESS_QUERY_LIMITED_INFORMATION ); break; case APC_MAP_VIEW: case APC_MAP_VIEW_EX:
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=141536
Your paranoid android.
=== w864 (64 bit report) ===
kernel32: process.c:4330: Test failed: Got unexpected ret 0, level 1, GetLastError() 5.
Thanks for looking into it. I like to start with a separate test function which stays as close as possible to the problematic application. And you are right, this issue is also observable in test_OpenProcess but hidden by the missing broken.
v3: Removed separate test function and adjusted existing test.