Commit a4ef56e1 authored by Jinoh Kang's avatar Jinoh Kang Committed by Alexandre Julliard

server: Check for DELETE access in NtMakeTemporaryObject().

parent 0b472874
......@@ -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;
}
......
......@@ -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)
{
......
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