kernelbase: Open object with DELETE access for NtMakeTemporaryObject().

Fixes: a4ef56e1d9
This commit is contained in:
Jinoh Kang 2024-03-21 21:24:16 +09:00 committed by Alexandre Julliard
parent a7ad588ec5
commit 4b0b489f6f

View file

@ -400,7 +400,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH DefineDosDeviceW( DWORD flags, const WCHAR *device
InitializeObjectAttributes( &attr, &nt_name, OBJ_CASE_INSENSITIVE | OBJ_PERMANENT, 0, NULL ); InitializeObjectAttributes( &attr, &nt_name, OBJ_CASE_INSENSITIVE | OBJ_PERMANENT, 0, NULL );
if (flags & DDD_REMOVE_DEFINITION) if (flags & DDD_REMOVE_DEFINITION)
{ {
if (!set_ntstatus( NtOpenSymbolicLinkObject( &handle, 0, &attr ) )) if (!set_ntstatus( NtOpenSymbolicLinkObject( &handle, DELETE, &attr ) ))
return FALSE; return FALSE;
status = NtMakeTemporaryObject( handle ); status = NtMakeTemporaryObject( handle );