Repository navigation
Feature: Re-lock LUKS volumes unlocked by the app on unmount and eject - #206
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The cleartext device has no drive of its own, so ejecting it only unmounted and locked but never ejected or powered off the drive. Cleartext devices now use their container's drive. Also relock when the volume was already unmounted (including on eject), and only lock the container the app unlocked. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Review: fixed-and-approve (pushed a fix commit). Bug found (eject path): the app ejects by the mounted cleartext volume id (DriveHelpers.Linux.cs EjectDeviceAsync -> volumes.EjectAsync(volume.Id)). Real UDisks2 cleartext block devices have Drive "/", so BuildVolumes gave them DriveId null and UnmountDriveAsync returned no drive: EjectAsync unmounted and relocked but never called Drive.Eject/PowerOff, and the CanEject notification was skipped. Fix: a cleartext device now inherits its container's drive (UDisks2Model.cs DrivePathOf), so siblings, eject and power-off work. Other fixes:
CRLF is intact on all changed files. Added tests for eject order (Lock before Drive.Eject), unmounted eject, NotMounted relock, drive inheritance, tracker, reused name. Platform tests: 1471 passed, 11 skipped (no Xvfb), 0 failed, -warnaserror clean; Files.App net10.0-desktop Release (FilesWin32Compat=false) builds with 0 errors. 🤖 Generated with Claude Code |
Resolved / Related Issues
Steps used to test these changes
build/fetch-uno-wayland.sh, then builtFiles.Platform.Linuxwith-warnaserrorandFiles.App(net10.0-desktop, Release, Win32 compat off): 0 errors.Files.Platform.Testswith-warnaserrorand ran it: 1477 total, 1466 passed, 0 failed, 11 skipped (Xvfb-dependent, inconclusive in this environment).Design
UDisks2UnlockTracker(inUDisks2Model.cs) records cleartext devices unlocked throughEncrypted.Unlockby the service; already-unlocked volumes are never tracked.Filesystem.Unmountsucceeds, the service callsEncrypted.Lockon the crypto backing device and forgets the entry. Eject goes through the same unmount path.Debug.WriteLine) and do not fail the unmount; no new UI or result types.🤖 Generated with Claude Code