Commit 31e984a0 authored by Damjan Jovanovic's avatar Damjan Jovanovic Committed by Alexandre Julliard

server: The owner of a securable object should have all the standard access rights.

Cygwin fork() fails in NtCreateSymbolicLinkObject(). We successfully create the link but then fail to alloc_handle() with STATUS_ACCESS_DENIED, because the requested access rights exceed what the owner is allowed. Allow it more. Thank you to Dmitry Timoshkov for debugging the security details from alloc_handle() onwards. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48891Signed-off-by: 's avatarDamjan Jovanovic <damjan.jov@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 2e4bfa64
......@@ -1076,10 +1076,25 @@ todo_wine {
SetLastError(0xdeadbeef);
rc = AccessCheck(sd, token, DELETE, &mapping, &priv_set, &priv_set_len, &granted, &status);
ok(rc, "AccessCheck error %d\n", GetLastError());
todo_wine {
ok(status == 1, "expected 1, got %d\n", status);
ok(granted == DELETE, "expected DELETE, got %#x\n", granted);
}
granted = 0xdeadbeef;
status = 0xdeadbeef;
SetLastError(0xdeadbeef);
rc = AccessCheck(sd, token, WRITE_OWNER, &mapping, &priv_set, &priv_set_len, &granted, &status);
ok(rc, "AccessCheck error %d\n", GetLastError());
ok(status == 1, "expected 1, got %d\n", status);
ok(granted == WRITE_OWNER, "expected WRITE_OWNER, got %#x\n", granted);
granted = 0xdeadbeef;
status = 0xdeadbeef;
SetLastError(0xdeadbeef);
rc = AccessCheck(sd, token, SYNCHRONIZE, &mapping, &priv_set, &priv_set_len, &granted, &status);
ok(rc, "AccessCheck error %d\n", GetLastError());
ok(status == 1, "expected 1, got %d\n", status);
ok(granted == SYNCHRONIZE, "expected SYNCHRONIZE, got %#x\n", granted);
granted = 0xdeadbeef;
status = 0xdeadbeef;
SetLastError(0xdeadbeef);
......
......@@ -1113,7 +1113,7 @@ static unsigned int token_access_check( struct token *token,
* determined here. */
if (token_sid_present( token, owner, FALSE ))
{
current_access |= (READ_CONTROL | WRITE_DAC);
current_access |= (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE);
if (desired_access == current_access)
{
*granted_access = current_access;
......
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