Commit 0e42bce0 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

server: Fix handling of MAXIMUM_ALLOWED in token_access_check.

parent a39d67d8
......@@ -1376,6 +1376,12 @@ static void test_AccessCheck(void)
ok(AccessStatus && (Access == KEY_READ),
"AccessCheck failed to grant access with error %d\n",
GetLastError());
ret = AccessCheck(SecurityDescriptor, Token, MAXIMUM_ALLOWED, &Mapping,
PrivSet, &PrivSetLen, &Access, &AccessStatus);
ok(ret, "AccessCheck failed with error %d\n", GetLastError());
ok(AccessStatus && (Access == KEY_ALL_ACCESS),
"AccessCheck failed to grant access with error %d\n",
GetLastError());
/* sd with blank dacl */
ret = SetSecurityDescriptorDacl(SecurityDescriptor, TRUE, Acl, FALSE);
......
......@@ -844,7 +844,10 @@ static unsigned int token_access_check( struct token *token,
if (!dacl_present || !dacl)
{
if (priv_count) *priv_count = 0;
*granted_access = desired_access;
if (desired_access & MAXIMUM_ALLOWED)
*granted_access = mapping->GenericAll;
else
*granted_access = desired_access;
return *status = STATUS_SUCCESS;
}
......
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