mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-21 17:09:06 -07:00
advapi32: Test some other cases of process access rights mapping.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
parent
a7900c4594
commit
fb47740214
Notes:
Alexandre Julliard
2024-11-12 22:01:31 +01:00
Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6767
1 changed files with 35 additions and 0 deletions
|
@ -6154,6 +6154,41 @@ static void test_process_access(void)
|
|||
"expected PROCESS_QUERY_INFORMATION|PROCESS_QUERY_LIMITED_INFORMATION, got %#lx\n", access);
|
||||
CloseHandle(dup);
|
||||
|
||||
SetLastError( 0xdeadbeef );
|
||||
ret = DuplicateHandle(GetCurrentProcess(), process, GetCurrentProcess(), &dup,
|
||||
PROCESS_VM_OPERATION, FALSE, 0);
|
||||
ok(ret, "DuplicateHandle error %ld\n", GetLastError());
|
||||
access = get_obj_access(dup);
|
||||
ok(access == PROCESS_VM_OPERATION, "unexpected access right %lx\n", access);
|
||||
CloseHandle(dup);
|
||||
|
||||
SetLastError( 0xdeadbeef );
|
||||
ret = DuplicateHandle(GetCurrentProcess(), process, GetCurrentProcess(), &dup,
|
||||
PROCESS_VM_WRITE, FALSE, 0);
|
||||
ok(ret, "DuplicateHandle error %ld\n", GetLastError());
|
||||
access = get_obj_access(dup);
|
||||
ok(access == PROCESS_VM_WRITE, "unexpected access right %lx\n", access);
|
||||
CloseHandle(dup);
|
||||
|
||||
SetLastError( 0xdeadbeef );
|
||||
ret = DuplicateHandle(GetCurrentProcess(), process, GetCurrentProcess(), &dup,
|
||||
PROCESS_VM_OPERATION | PROCESS_VM_WRITE, FALSE, 0);
|
||||
ok(ret, "DuplicateHandle error %ld\n", GetLastError());
|
||||
access = get_obj_access(dup);
|
||||
todo_wine
|
||||
ok(access == (PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_QUERY_LIMITED_INFORMATION) ||
|
||||
broken(access == (PROCESS_VM_OPERATION | PROCESS_VM_WRITE)) /* Win8 and before */,
|
||||
"expected PROCESS_VM_OPERATION|PROCESS_VM_WRITE|PROCESS_QUERY_LIMITED_INFORMATION, got %#lx\n", access);
|
||||
CloseHandle(dup);
|
||||
|
||||
SetLastError( 0xdeadbeef );
|
||||
ret = DuplicateHandle(GetCurrentProcess(), process, GetCurrentProcess(), &dup,
|
||||
PROCESS_VM_OPERATION | PROCESS_VM_READ, FALSE, 0);
|
||||
ok(ret, "DuplicateHandle error %ld\n", GetLastError());
|
||||
access = get_obj_access(dup);
|
||||
ok(access == (PROCESS_VM_OPERATION | PROCESS_VM_READ), "unexpected access right %lx\n", access);
|
||||
CloseHandle(dup);
|
||||
|
||||
TerminateProcess(process, 0);
|
||||
CloseHandle(process);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue