Repository navigation
Ultra engine without an elevated window: MFT helper process (0.10.1) - #15
Merged
Merged
Conversation
Windows blocks drag & drop from Explorer into an elevated window, so asking users to restart Diskghost as administrator for the MFT engine broke dropping folders. The window now never runs elevated: - On the first Ultra scan the app starts its own executable once more with --mft-helper, elevated after a single consent prompt per session and without a window. The helper reads the drive's Master File Table and hands each scan back as a snapshot, from which the app rebuilds the tree (Snapshot::to_tree, ScanTree::set_engine / mark_cancelled) and which it reuses for the scan's history instead of capturing it again. - They talk through files in a private folder (request, progress, cancel, result, done). Each request must carry a random token that only the app and the helper know (it travels on the elevated command line); request ids are digits only; the helper only reads disks and writes into its folder under fixed names, ignores anything else, and quits ~20 s after the app stops touching its heartbeat. If anything fails the scan falls back to the directory walk and the reason is shown. - Tested end to end with real elevation: a forged request is ignored, a scan of C:\Users\me through the helper takes 32 s with the MFT engine and reads back correctly, and the helper exits after the app goes away. - Progress no longer counts MFT records as files. - The restart-as-administrator command and button are gone; the settings explain the one-time prompt. When the app is started elevated anyway, the UI adapts: no drag & drop invitations, the drop hint explains why and points to pasting a path, Browse and the drive list. Core: Progress::set_counts for progress reported from another process, Snapshot::to_tree with a round-trip test (35 core tests).
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.
Windows blocks drag & drop from Explorer into an elevated window, so asking
users to restart Diskghost as administrator for the MFT engine broke dropping
folders. The window now never runs elevated:
--mft-helper, elevated after a single consent prompt per session and
without a window. The helper reads the drive's Master File Table and hands
each scan back as a snapshot, from which the app rebuilds the tree
(Snapshot::to_tree, ScanTree::set_engine / mark_cancelled) and which it
reuses for the scan's history instead of capturing it again.
result, done). Each request must carry a random token that only the app and
the helper know (it travels on the elevated command line); request ids are
digits only; the helper only reads disks and writes into its folder under
fixed names, ignores anything else, and quits ~20 s after the app stops
touching its heartbeat. If anything fails the scan falls back to the
directory walk and the reason is shown.
of C:\Users\me through the helper takes 32 s with the MFT engine and reads
back correctly, and the helper exits after the app goes away.
explain the one-time prompt. When the app is started elevated anyway, the UI
adapts: no drag & drop invitations, the drop hint explains why and points to
pasting a path, Browse and the drive list.
Core: Progress::set_counts for progress reported from another process,
Snapshot::to_tree with a round-trip test (35 core tests).