Commit 608ac1e8 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

advapi32: Fix the AccessCheck tests so that the ACCESS_SYSTEM_SECURITY test now…

advapi32: Fix the AccessCheck tests so that the ACCESS_SYSTEM_SECURITY test now runs (when the user has the Security privilege). Duplicate the token at SecurityImpersonation impersonation level instead of SecurityIdentification, otherwise the call to RtlAdjustPrivilege fails on Windows.
parent 9ad684b4
......@@ -784,7 +784,7 @@ static void test_AccessCheck(void)
pRtlAdjustPrivilege(SE_SECURITY_PRIVILEGE, FALSE, TRUE, &Enabled);
res = DuplicateToken(ProcessToken, SecurityIdentification, &Token);
res = DuplicateToken(ProcessToken, SecurityImpersonation, &Token);
ok(res, "DuplicateToken failed with error %d\n", GetLastError());
/* SD without owner/group */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment