https://git.reactos.org/?p=reactos.git;a=commitdiff;h=abfddca8bb1c5334f4a8a…
commit abfddca8bb1c5334f4a8a14305189565c5b21d2d
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Wed Oct 3 11:45:08 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Wed Oct 3 11:45:08 2018 +0200
[NTOSKRNL] Stub support for querying DOS name when parsing FO name
---
ntoskrnl/include/internal/io.h | 12 ++++++++++++
ntoskrnl/io/iomgr/file.c | 21 +++++++++++++++++++++
ntoskrnl/io/iomgr/iomgr.c | 2 +-
3 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/include/internal/io.h b/ntoskrnl/include/internal/io.h
index 95e3607bb5..9928cbaab4 100644
--- a/ntoskrnl/include/internal/io.h
+++ b/ntoskrnl/include/internal/io.h
@@ -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,
diff --git a/ntoskrnl/io/iomgr/file.c b/ntoskrnl/io/iomgr/file.c
index e877888c74..792376ca82 100644
--- a/ntoskrnl/io/iomgr/file.c
+++ b/ntoskrnl/io/iomgr/file.c
@@ -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;
diff --git a/ntoskrnl/io/iomgr/iomgr.c b/ntoskrnl/io/iomgr/iomgr.c
index fec80855ae..8d01f35079 100644
--- a/ntoskrnl/io/iomgr/iomgr.c
+++ b/ntoskrnl/io/iomgr/iomgr.c
@@ -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,