The supported design boundary is narrower than an “original directory object or no effect” guarantee: use a live directory handle and a single relative name with FILE_CREATE, but do not rely on OBJ_DONT_REPARSE, FILE_DIRECTORY_FILE | FILE_OPEN_REPARSE_POINT, or FILE_CREATE to provide concurrency guarantees beyond those expressly documented.
1. RootDirectory and relative creation
For user-mode NtCreateFile, the published parameter contract says that a non-NULL RootDirectory is a handle to a directory obtained by a preceding NtCreateFile call; ObjectName is then interpreted relative to that directory. The broader OBJECT_ATTRIBUTES page merely says that the handle can refer to a file-system directory or Object Manager directory. ^1^ ^2^
Consequently:
- Strictly documented origin: a directory handle returned by
NtCreateFile. - Handle from another API: Win32 file handles are often interoperable in practice, but the cited
NtCreateFilecontract does not establish every other API as a supported source forRootDirectory. A security design requiring a published guarantee should not infer such compatibility. - Lifetime: the handle must remain valid for the operation. The public documentation does not define a stronger identity guarantee when the directory is concurrently renamed, deleted, or converted into a reparse point.
- Sharing: sharing is fixed when the directory handle is opened and remains effective until it is closed. An incompatible later open can fail with a sharing violation. Sharing does not itself establish protection against every namespace or reparse-point change. ^3^
For authorization, distinguish two questions:
- The directory access rights have these meanings:
-
FILE_ADD_FILE(FILE_WRITE_DATAfor a directory) permits creating a file. -
FILE_ADD_SUBDIRECTORY(FILE_APPEND_DATAfor a directory) permits creating a subdirectory. -
FILE_TRAVERSEpermits accessing objects through a directory. ^4^
-
- The available documentation does not clearly state that those rights must already be present in the granted-access mask of the retained
RootDirectoryhandle. Creation is still subject to the applicable security checks against the directory and target. Therefore, do not turn the semantic definitions above into an undocumented exact handle-mask requirement.
2. OBJ_DONT_REPARSE
The documentation is inconsistent:
-
OBJECT_ATTRIBUTESsaysOBJ_DONT_REPARSEprevents following any reparse point encountered while parsing the associated name and returnsSTATUS_REPARSE_POINT_ENCOUNTERED. ^2^ - The user-mode
NtCreateFilepage says itsAttributesvalue can be zero orOBJ_CASE_INSENSITIVE; it does not listOBJ_DONT_REPARSE. ^1^
A Microsoft Q&A test found that OBJ_DONT_REPARSE was honored by user-mode NtCreateFile on Windows 11 build 26200 and local NTFS, for both final and intermediate reparse points, returning STATUS_REPARSE_POINT_ENCOUNTERED (0xC000050B). That is implementation evidence for that configuration, not a published cross-version or cross-file-system support guarantee. ^5^
Do not confuse that status with STATUS_REPARSE: NtCreateFile expressly says it never returns STATUS_REPARSE; normal reparse processing is handled internally before the final result. ^6^
Reparse support itself is file-system-specific: NTFS and ReFS support reparse points, while FAT does not. Filters can also define processing for particular tags. ^7^
3. FILE_DIRECTORY_FILE | FILE_OPEN_REPARSE_POINT
This combination is not in the documented compatibility set. With FILE_DIRECTORY_FILE, the listed compatible options are only:
-
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 absent. Therefore, the public contract does not establish the combination as supported, even if a particular Windows/file-system version accepts it. ^1^ Microsoft Q&A reaches the same conclusion for local NTFS and notes that no documented version, file-system, or filter qualification makes the combination supported. ^8^
The documented Win32 mechanism for inspecting a directory reparse point is:
- Open the directory using
CreateFilewith bothFILE_FLAG_BACKUP_SEMANTICSandFILE_FLAG_OPEN_REPARSE_POINT. - Issue
DeviceIoControl(..., FSCTL_GET_REPARSE_POINT, ...)on that handle.FSCTL_GET_REPARSE_POINTsupport is optional and may fail where the object store does not implement it. ^9^ ^10^
FILE_OPEN_REPARSE_POINT affects the object being directly opened. It does not document a refusal policy for every intermediate component; intermediate reparse processing can still occur. OBJ_DONT_REPARSE describes the different “refuse if any reparse is encountered” behavior, subject to the documentation discrepancy above.
4. FILE_CREATE and exclusivity
FILE_CREATE documents only this final-name behavior:
- If the resolved file already exists, fail without opening or creating it.
- If it does not exist, create it.
- On completed success,
IoStatusBlock.Informationcan reportFILE_CREATED. ^1^
That is the documented exclusive-create disposition for the resolved final name. The API page does not independently specify a broader atomic guarantee covering:
- stability of the retained parent’s namespace identity;
- concurrent conversion of the parent into a junction;
- intermediate-component traversal;
- reparse or filter redirection;
- rename/delete races;
- an “original object or pre-effect refusal” boundary.
Microsoft Q&A specifically concludes that the public documentation does not establish that stronger guarantee for concurrent reparse-point conversion. ^8^
Treat a result as confirmed only after the operation has reached final completion and both the final NTSTATUS and IO_STATUS_BLOCK have been examined. Ordinary completed failures—such as a name collision, access denial, sharing violation, invalid option combination, or STATUS_REPARSE_POINT_ENCOUNTERED where applicable—are distinguishable failures. The public contract does not provide a general recovery rule for interruption, filter-specific behavior, or concurrency cases where final completion cannot be established.
References
- NtCreateFile function (winternl.h)
- OBJECT_ATTRIBUTES structure (ntdef.h)
- CreateFileA function (fileapi.h)
- Access Mask
- Is OBJ_DONT_REPARSE supported by user-mode NtCreateFile with a directory-relative name? - Microsoft Q&A
- NtCreateFile function (ntifs.h)
- File system reparse points
- NTFS single-component NtCreateFile relative to a held directory during junction conversion: original-object-or-refusal contract? - Microsoft Q&A
- Reparse Point Operations
- [IP Address].14 FSCTL_GET_REPARSE_POINT