advapi32/tests: Add a test to show that THREAD_QUERY_INFORMATION should grant THREAD_QUERY_LIMITED_INFORMATION.

This commit is contained in:
Dmitry Timoshkov 2015-08-20 16:13:27 +08:00 committed by Alexandre Julliard
parent d5f8dd3aac
commit 48ed6a6f3e
1 changed files with 10 additions and 0 deletions

View File

@ -5495,6 +5495,16 @@ todo_wine
CloseHandle(dup);
}
SetLastError( 0xdeadbeef );
ret = DuplicateHandle(GetCurrentProcess(), thread, GetCurrentProcess(), &dup,
THREAD_QUERY_INFORMATION, FALSE, 0);
ok(ret, "DuplicateHandle error %d\n", GetLastError());
access = get_obj_access(dup);
ok(access == (THREAD_QUERY_INFORMATION | THREAD_QUERY_LIMITED_INFORMATION) /* Vista+ */ ||
access == THREAD_QUERY_INFORMATION /* before Vista */,
"expected THREAD_QUERY_INFORMATION|THREAD_QUERY_LIMITED_INFORMATION, got %#x\n", access);
CloseHandle(dup);
TerminateThread(thread, 0);
CloseHandle(thread);
}