[NTOSKRNL] Stub support for querying DOS name when parsing FO name
authorPierre Schweitzer <pierre@reactos.org>
Wed, 3 Oct 2018 09:45:08 +0000 (11:45 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Wed, 3 Oct 2018 09:45:08 +0000 (11:45 +0200)
ntoskrnl/include/internal/io.h
ntoskrnl/io/iomgr/file.c
ntoskrnl/io/iomgr/iomgr.c

index 95e3607..9928cba 100644 (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,
index e877888..792376c 100644 (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;
index fec8085..8d01f35 100644 (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,