NtCreateFile with the proposed flags cannot be treated as providing the absolute fail-closed guarantee: the public contract does not define an atomic object-or-refusal boundary against concurrent reparse changes, and FILE_OPEN_NO_RECALL does not promise callback-free, network-free, or side-effect-free inspection.
Documented behavior
- A non-null
OBJECT_ATTRIBUTES.RootDirectorymakesObjectNamerelative to the directory represented by that handle. A single-component name is therefore a valid relative name.^1^ -
FILE_OPENopens an existing object and fails if it does not exist.^2^ - If
FILE_OPEN_REPARSE_POINTis specified and the object being opened has a reparse point, normal reparse processing does not occur;NtCreateFileattempts to open the reparse-point object directly. Without the flag, normal reparse processing occurs.^1^ - Reparse points can exist on files or directories. Their behavior may be supplied by a filesystem filter identified by the reparse tag.^3^
That supports using FILE_OPEN_REPARSE_POINT to suppress normal processing of the final reparse-point object, including a directory object. It does not document that:
- Every earlier component used to acquire
RootDirectorywas opened without traversal. - A concurrent change to the held directory’s reparse state must produce either the original object or failure.
- A filesystem or minifilter cannot perform other processing during the create.
- The open has no observable external effect.
The documentation says what a relative name means, but does not specify an atomic boundary between relative lookup and a concurrent set, delete, replacement, or modification of a reparse point. The closely matching Q&A determination likewise concludes that the published contract does not establish the requested object-or-refusal guarantee; it is corroboration of the documentation gap, not a normative API specification.^4^
Option compatibility
Omitting both type-selection flags is not expressly prohibited. However, the documentation does not promise that every filesystem, filter, reparse tag, and Windows-version combination will accept the resulting type-neutral request.
There is an important documented restriction if FILE_DIRECTORY_FILE is added: its compatible-options list contains only the synchronous flags, FILE_WRITE_THROUGH, FILE_OPEN_FOR_BACKUP_INTENT, and FILE_OPEN_BY_FILE_ID. It does not list FILE_OPEN_REPARSE_POINT or FILE_OPEN_NO_RECALL.^2^ Consequently, the public documentation does not establish that either combination with FILE_DIRECTORY_FILE is supported.
FILE_NON_DIRECTORY_FILE requires the opened object not to be a directory. It is unsuitable for a type-neutral collector.
Requesting FILE_READ_ATTRIBUTES, plus READ_CONTROL only when the security descriptor is needed, avoids requesting file-data access. Do not use generic access masks: the documented generic-read mapping includes FILE_READ_DATA.^2^
Recall and Cloud Files
FILE_OPEN_NO_RECALL is documented only as an instruction to filters that perform offline storage or virtualization not to recall file contents because of the open.^2^ It is not documented as guaranteeing:
- no filter or Cloud Files callback;
- no provider communication or network activity;
- no metadata retrieval;
- no external side effect;
- compliance by every third-party filter.
For an already-open Cloud Files placeholder, CfGetPlaceholderInfo is the purpose-built metadata query. It requires only READ_ATTRIBUTES and does not modify the placeholder, but it still requires acquiring a handle first and does not document the open itself as callback-free or network-free.^5^
Cloud Files reparse points may also be hidden from ordinary applications unless placeholder-compatibility mode is changed, so treating all visible reparse behavior as uniform is unsafe.^6^
Filesystem and filter scope
- NTFS and ReFS support reparse points; that fact does not establish identical race or filter behavior.^7^
- Behavior can depend on the reparse tag and its associated Microsoft or third-party filter.
- No cited public contract supplies the required universal guarantee across supported builds, NTFS, ReFS, Cloud Files placeholders, arbitrary reparse tags, and third-party minifilters.
Safe design conclusion
For the stated security requirement, fail closed before issuing the open whenever unapproved open-time callbacks or external activity are unacceptable. Post-open checks—such as handle-based attributes and identity, FSCTL_GET_REPARSE_POINT, and CfGetPlaceholderInfo for confirmed placeholders—can detect mismatches but cannot undo effects that occurred while opening. FSCTL_GET_REPARSE_POINT is the documented operation for retrieving reparse data.^8^
No cited public user-mode API documents a universal callback-free, network-free, race-atomic metadata acquisition mechanism satisfying all these conditions. If the environment cannot be constrained to trusted filesystems, filters, providers, and mutation controls, there is no documented basis for accepting the operation as secure.
For a binding determination, open an official Windows developer support incident or use the organization’s Microsoft support agreement. Request a written, scope-qualified answer covering the exact NtCreateFile parameters, Windows builds, NTFS and ReFS, Cloud Files versions, reparse tags, installed minifilters, and concurrent mutation scenarios. Microsoft Q&A results and machine testing should not be treated as extending the published API contract.
References
- NtCreateFile function (winternl.h)
- NtCreateFile function (ntifs.h)
- Reparse points
- NTFS single-component NtCreateFile relative to a held directory during junction conversion: original-object-or-refusal contract? - Microsoft Q&A
- CfGetPlaceholderInfo function (cfapi.h)
- Build a Cloud Sync Engine that Supports Placeholder Files
- File system reparse points
- Reparse Point Operations