1
0
mirror of https://github.com/wine-mirror/wine synced 2024-06-29 06:14:34 +00:00

server: Check for DELETE access in NtMakeTemporaryObject().

This commit is contained in:
Jinoh Kang 2024-03-11 21:48:19 +09:00 committed by Alexandre Julliard
parent 0b472874af
commit a4ef56e1d9
2 changed files with 2 additions and 2 deletions

View File

@ -3321,7 +3321,6 @@ static void test_object_permanence(void)
ok( !!(obi.GrantedAccess & DELETE), "expected DELETE access in %08lx\n", obi.GrantedAccess );
status = NtMakeTemporaryObject( handle );
todo_wine_if(test->make_temp_status == STATUS_ACCESS_DENIED)
ok( status == test->make_temp_status, "NtMakeTemporaryObject returned %08lx\n", status );
if (!NT_ERROR(status)) is_permanent = FALSE;
}

View File

@ -887,9 +887,10 @@ DECL_HANDLER(get_system_handles)
DECL_HANDLER(set_object_permanence)
{
const unsigned int access = req->permanent ? 0 : DELETE;
struct object *obj;
if (!(obj = get_handle_obj( current->process, req->handle, 0, NULL ))) return;
if (!(obj = get_handle_obj( current->process, req->handle, access, NULL ))) return;
if (req->permanent && !obj->is_permanent)
{