+temporary broken idea to force mount by IoCreateFile(): "\\Cdfs" -> "\\Cdfs\\."
authorshort <>
Mon, 4 Nov 2002 08:55:48 +0000 (08:55 +0000)
committershort <>
Mon, 4 Nov 2002 08:55:48 +0000 (08:55 +0000)
src/libcaptive/client/init.c

index b9eb336..20d05fc 100644 (file)
@@ -119,10 +119,14 @@ IO_STATUS_BLOCK root_IoStatusBlock;
                        captive_utf8_to_UnicodeString_alloca("\\FIXME\\FIXME"));        /* DriverEntry_RegistryPath */
        g_return_val_if_fail(NT_SUCCESS(err),FALSE);
        
-       /* FIXME: root_ObjectAttributes: InitializeObjectAttributes() */
+       /* Do not supply plain "\\Cdfs" as 'ObjectName' as
+        * IoCreateFile()->ObCreateObject()->ObFindObject()
+        * would leave 'ObCreateObject::RemainingPath' as NULL
+        * and later IopCreateFile() would consider it FO_DIRECT_DEVICE_OPEN (w/o mount)
+        */
        InitializeObjectAttributes(
                        &root_ObjectAttributes, /* InitializedAttributes */
-                       captive_utf8_to_UnicodeString_alloca("\\Cdfs"), /* ObjectName */
+                       captive_utf8_to_UnicodeString_alloca("\\Cdfs\\."),      /* ObjectName */
                        0,      /* Attributes; I hope no OBJ_KERNEL_HANDLE as we are 'system process' */
                        NULL,   /* RootDirectory */
                        NULL);  /* SecurityDescriptor; ignored */