Dmitry Timoshkov : advapi32/tests: Add a test to show that PROCESS_QUERY_INFORMATION should implicitly grant PROCESS_QUERY_LIMITED_INFORMATION access.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Aug 19 09:56:01 CDT 2015
Module: wine
Branch: master
Commit: 9e22949cec82f05938fcca9c41948fdbeb0d14aa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9e22949cec82f05938fcca9c41948fdbeb0d14aa
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Wed Aug 19 12:23:33 2015 +0800
advapi32/tests: Add a test to show that PROCESS_QUERY_INFORMATION should implicitly grant PROCESS_QUERY_LIMITED_INFORMATION access.
---
dlls/advapi32/tests/security.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index af61acb..70aa949 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -5567,6 +5567,16 @@ static void test_process_access(void)
CloseHandle(dup);
}
+ SetLastError( 0xdeadbeef );
+ ret = DuplicateHandle(GetCurrentProcess(), process, GetCurrentProcess(), &dup,
+ PROCESS_QUERY_INFORMATION, FALSE, 0);
+ ok(ret, "DuplicateHandle error %d\n", GetLastError());
+ access = get_obj_access(dup);
+ ok(access == (PROCESS_QUERY_INFORMATION | PROCESS_QUERY_LIMITED_INFORMATION) /* Vista+ */ ||
+ access == PROCESS_QUERY_INFORMATION /* before Vista */,
+ "expected PROCESS_QUERY_INFORMATION|PROCESS_QUERY_LIMITED_INFORMATION, got %#x\n", access);
+ CloseHandle(dup);
+
TerminateProcess(process, 0);
CloseHandle(process);
}
More information about the wine-cvs
mailing list