ntoskrnl.exe: Implement ObOpenObjectByName.

Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Derek Lesho 2020-07-16 10:17:08 -05:00 committed by Alexandre Julliard
parent b59bf31f61
commit 65df36c115
2 changed files with 33 additions and 1 deletions

View File

@ -2806,6 +2806,38 @@ NTSTATUS WINAPI ObReferenceObjectByName( UNICODE_STRING *ObjectName,
}
/********************************************************************
* ObOpenObjectByName (NTOSKRNL.EXE.@)
*/
NTSTATUS WINAPI ObOpenObjectByName(POBJECT_ATTRIBUTES attr, POBJECT_TYPE type,
KPROCESSOR_MODE mode, ACCESS_STATE *access_state,
ACCESS_MASK access, PVOID ctx, HANDLE *handle)
{
NTSTATUS status;
void *object;
TRACE( "attr(%p %s %x) %p %u %p %u %p %p\n", attr->RootDirectory, debugstr_us(attr->ObjectName),
attr->Attributes, type, mode, access_state, access, ctx, handle );
if (mode != KernelMode)
{
FIXME( "UserMode access not implemented\n" );
return STATUS_NOT_IMPLEMENTED;
}
if (attr->RootDirectory) FIXME( "RootDirectory unhandled\n" );
status = ObReferenceObjectByName(attr->ObjectName, attr->Attributes, access_state, access, type, mode, ctx, &object );
if (status != STATUS_SUCCESS)
return status;
status = ObOpenObjectByPointer(object, attr->Attributes, access_state, access, type, mode, handle);
ObDereferenceObject(object);
return status;
}
/***********************************************************************
* ObReferenceObjectByPointer (NTOSKRNL.EXE.@)
*/

View File

@ -835,7 +835,7 @@
@ stub ObInsertObject
@ stub ObLogSecurityDescriptor
@ stub ObMakeTemporaryObject
@ stub ObOpenObjectByName
@ stdcall ObOpenObjectByName(ptr ptr long ptr long ptr ptr)
@ stdcall ObOpenObjectByPointer(ptr long ptr long ptr long ptr)
@ stdcall ObQueryNameString(ptr ptr long ptr)
@ stub ObQueryObjectAuditingByHandle