[NTOSKRNL] Stub support for querying DOS name when parsing FO name

This commit is contained in:
Pierre Schweitzer 2018-10-03 11:45:08 +02:00
parent a1401a7577
commit abfddca8bb
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B
3 changed files with 34 additions and 1 deletions

View file

@ -1217,11 +1217,23 @@ IopGetSetSecurityObject(
IN OUT PGENERIC_MAPPING GenericMapping
);
NTSTATUS
NTAPI
IopQueryName(
IN PVOID ObjectBody,
IN BOOLEAN HasName,
OUT POBJECT_NAME_INFORMATION ObjectNameInfo,
IN ULONG Length,
OUT PULONG ReturnLength,
IN KPROCESSOR_MODE PreviousMode
);
NTSTATUS
NTAPI
IopQueryNameInternal(
IN PVOID ObjectBody,
IN BOOLEAN HasName,
IN BOOLEAN QueryDosName,
OUT POBJECT_NAME_INFORMATION ObjectNameInfo,
IN ULONG Length,
OUT PULONG ReturnLength,

View file

@ -1867,10 +1867,29 @@ IopGetSetSecurityObject(IN PVOID ObjectBody,
return Status;
}
NTSTATUS
NTAPI
IopQueryName(IN PVOID ObjectBody,
IN BOOLEAN HasName,
OUT POBJECT_NAME_INFORMATION ObjectNameInfo,
IN ULONG Length,
OUT PULONG ReturnLength,
IN KPROCESSOR_MODE PreviousMode)
{
return IopQueryNameInternal(ObjectBody,
HasName,
FALSE,
ObjectNameInfo,
Length,
ReturnLength,
PreviousMode);
}
NTSTATUS
NTAPI
IopQueryNameInternal(IN PVOID ObjectBody,
IN BOOLEAN HasName,
IN BOOLEAN QueryDosName,
OUT POBJECT_NAME_INFORMATION ObjectNameInfo,
IN ULONG Length,
OUT PULONG ReturnLength,
@ -1893,6 +1912,8 @@ IopQueryNameInternal(IN PVOID ObjectBody,
return STATUS_INFO_LENGTH_MISMATCH;
}
if (QueryDosName) return STATUS_NOT_IMPLEMENTED;
/* Allocate Buffer */
LocalInfo = ExAllocatePoolWithTag(PagedPool, Length, TAG_IO);
if (!LocalInfo) return STATUS_INSUFFICIENT_RESOURCES;

View file

@ -317,7 +317,7 @@ IopCreateObjectTypes(VOID)
ObjectTypeInitializer.CloseProcedure = IopCloseFile;
ObjectTypeInitializer.DeleteProcedure = IopDeleteFile;
ObjectTypeInitializer.SecurityProcedure = IopGetSetSecurityObject;
ObjectTypeInitializer.QueryNameProcedure = IopQueryNameInternal;
ObjectTypeInitializer.QueryNameProcedure = IopQueryName;
ObjectTypeInitializer.ParseProcedure = IopParseFile;
ObjectTypeInitializer.UseDefaultObject = FALSE;
if (!NT_SUCCESS(ObCreateObjectType(&Name,