No documented user-mode contract in the provided Microsoft documentation supports FILE_DIRECTORY_FILE | FILE_OPEN_REPARSE_POINT for NtCreateFile.
The controlling published text in the Win32 NtCreateFile page is the FILE_DIRECTORY_FILE compatibility rule:
- With
FILE_DIRECTORY_FILE,CreateDispositionmust beFILE_CREATE,FILE_OPEN, orFILE_OPEN_IF. - With
FILE_DIRECTORY_FILE, the only compatibleCreateOptionsflags listed are:-
FILE_SYNCHRONOUS_IO_ALERT -
FILE_SYNCHRONOUS_IO_NONALERT -
FILE_WRITE_THROUGH -
FILE_OPEN_FOR_BACKUP_INTENT -
FILE_OPEN_BY_FILE_ID
-
FILE_OPEN_REPARSE_POINT is documented separately, but it is not included in that compatibility list. The WDK ntifs.h NtCreateFile page gives the same restriction for FILE_DIRECTORY_FILE, again listing only those compatible flags.
Based on that published contract, FILE_DIRECTORY_FILE | FILE_OPEN_REPARSE_POINT is not documented as a supported combination.
The restriction is established by the FILE_DIRECTORY_FILE entry itself, not by the standalone description of FILE_OPEN_REPARSE_POINT. In other words:
-
FILE_OPEN_REPARSE_POINTexists as a validCreateOptionsflag in general. - But when
FILE_DIRECTORY_FILEis also set, the documented compatibility list becomes the limiting rule.
Documented call-specific restrictions that do apply when opening or creating a directory with NtCreateFile include:
-
CreateDispositionmust beFILE_CREATE,FILE_OPEN, orFILE_OPEN_IF. -
DesiredAccessmust not includeFILE_READ_DATA,FILE_WRITE_DATA,FILE_APPEND_DATA, orFILE_EXECUTEwhen creating or opening a directory. - For directory opens, documented directory-specific access rights include
FILE_LIST_DIRECTORYandFILE_TRAVERSE.
As to the WDK page’s relevance: it is driver-oriented documentation, but in the provided material it matches the Win32 page on this specific compatibility rule. It is useful as corroboration, not as a separate user-mode authorization for the combination.
No provided official documentation states that user-mode NtCreateFile supports FILE_DIRECTORY_FILE | FILE_OPEN_REPARSE_POINT, and no provided official documentation creates an exception to the FILE_DIRECTORY_FILE compatibility list. Any statement that the combination works in practice on some builds would be observed implementation behavior, not a documented contract, based on the material provided.