ProjFS: tolerate ACCESS_DENIED on FilterAttach, remove dead bundled-driver code#1980
Open
tyrielv wants to merge 1 commit into
Open
ProjFS: tolerate ACCESS_DENIED on FilterAttach, remove dead bundled-driver code#1980tyrielv wants to merge 1 commit into
tyrielv wants to merge 1 commit into
Conversation
4e580fa to
a70f58a
Compare
…river code
The ProjFS filter driver and native library are no longer bundled with
the GVFS installer — ProjFS is required as a Windows Optional Feature
(available since Windows 10 1809, our minimum supported OS).
Fix FilterAttach ACCESS_DENIED (bug 62349777):
- Add TryAttachToVolume() that tolerates ACCESS_DENIED when the ProjFS
service is already running (the filter is already attached to the
volume but the caller lacks SE_LOAD_DRIVER_PRIVILEGE).
- The service-side EnableAndAttachProjFSHandler.Run() now uses
TryAttachToVolume instead of raw TryAttach, matching the tolerance
already present in the client-side IsReady() path.
- Fix Run() to preserve the first error from TryEnablePrjFlt instead
of potentially overwriting it with a subsequent attach error.
Remove dead non-inbox ProjFS code paths:
- Remove TryInstallProjFSViaINF (referenced {app}\Filter\prjflt.inf
which is no longer shipped).
- Remove TryCopyNativeLibIfDriverVersionsMatch and supporting methods
(referenced {app}\Filter\prjflt.sys and {app}\ProjFS\ProjectedFSLib.dll
which are no longer shipped).
- Simplify TryEnableOrInstallDriver to always use the Windows Optional
Feature path; keep build number logging as best-effort telemetry.
- Simplify IsNativeLibInstalled to require System32; warn if stale
app-local DLL found from a legacy non-inbox install.
Improve error messaging:
- When ProjFS native library is missing, error now includes the
PowerShell command to enable the optional feature.
- When ProjFS cannot be enabled, error directs user to the optional
feature instead of referencing non-existent bundled files.
Assisted-by: Claude Opus 4.6
Signed-off-by: Tyler Vella <tyrielv@gmail.com>
a70f58a to
1a5741b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates to improve resilience around GVFS failed to attach filter driver with result 2147942405 (0x80070005 / ACCESS_DENIED).
The ProjFS filter driver and native library are no longer bundled with the GVFS installer — ProjFS is required as a Windows Optional Feature (available since Windows 10 1809, our minimum supported OS). This PR removes the dead code paths that referenced those bundled files and fixes the FilterAttach ACCESS_DENIED error.
Changes
Fix FilterAttach ACCESS_DENIED
TryAttachToVolume()that tolerates ACCESS_DENIED when the ProjFS service is already running (the filter is already attached to the volume but the caller lacks SE_LOAD_DRIVER_PRIVILEGE).EnableAndAttachProjFSHandler.Run()now usesTryAttachToVolumeinstead of rawTryAttach, matching the tolerance already present in the client-sideIsReady()path.Run()to preserve the first error fromTryEnablePrjFltinstead of potentially overwriting it with a subsequent attach error.Remove dead non-inbox ProjFS code paths
TryInstallProjFSViaINF(referenced{app}\Filter\prjflt.infwhich is no longer shipped).TryCopyNativeLibIfDriverVersionsMatchand supporting methods (referenced{app}\Filter\prjflt.sysand{app}\ProjFS\ProjectedFSLib.dllwhich are no longer shipped).TryEnableOrInstallDriverto always use the Windows Optional Feature path; keep build number logging as best-effort telemetry.IsNativeLibInstalledto require System32; warn if stale app-local DLL found from a legacy non-inbox install.Improve error messaging
Testing
Setup.isslegacy cleanup left intact (still needed for old→new upgrades).Stats
3 files changed, 80 insertions, 412 deletions