Module: wine Branch: master Commit: a4ef56e1d9a3f185f788d798851c9c961defc4e3 URL: https://gitlab.winehq.org/wine/wine/-/commit/a4ef56e1d9a3f185f788d798851c9c9...
Author: Jinoh Kang jinoh.kang.kr@gmail.com Date: Mon Mar 11 21:48:19 2024 +0900
server: Check for DELETE access in NtMakeTemporaryObject().
---
dlls/ntdll/tests/om.c | 1 - server/handle.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 3f416f75f0f..4b166441295 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -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; } diff --git a/server/handle.c b/server/handle.c index 02a5a22edd1..ef243e06e0b 100644 --- a/server/handle.c +++ b/server/handle.c @@ -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) {