Fixed calling of root IoCreateFile() by FILE_SYNCHRONOUS_IO_ALERT
authorshort <>
Wed, 20 Nov 2002 14:07:49 +0000 (14:07 +0000)
committershort <>
Wed, 20 Nov 2002 14:07:49 +0000 (14:07 +0000)
  to prevent getting STATUS_CANT_WAIT from W32 filesystem

src/libcaptive/client/init.c

index 4b77bee..0a43393 100644 (file)
@@ -168,7 +168,12 @@ IO_STATUS_BLOCK root_IoStatusBlock;
                        FILE_ATTRIBUTE_NORMAL,  /* FileAttributes; ignored for open */
                        0,      /* ShareAccess; 0 means exclusive */
                        FILE_OPEN,      /* CreateDisposition */
-                       FILE_DIRECTORY_FILE,    /* CreateOptions */
+                       /* FILE_SYNCHRONOUS_IO_{,NON}ALERT: We need to allow W32 filesystem
+                        * any waits to not to let it return STATUS_CANT_WAIT us.
+                        * Alertability should have only effect on asynchronous events
+                        * from KeWaitForSingleObject() by setting/clearing its parameter 'Alertable'.
+                        */
+                       FILE_DIRECTORY_FILE|FILE_SYNCHRONOUS_IO_ALERT,  /* CreateOptions */
                        NULL,   /* EaBuffer */
                        0,      /* EaLength */
                        CreateFileTypeNone,     /* CreateFileType */