fix(desktop): allow FUSE rename on SMB backend#174
Merged
Conversation
Moved to done/, beginning investigation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 01485d538f55
The macOS SMB client calls access(W_OK) before rename. Our strict UID + permission-bit check returned EACCES because FUSE-T's SMB server proxies requests under a different UID than the mounting user. Since CipherBox is a single-user encrypted vault (encryption IS the access control), simplify access() to always grant if the inode exists. Also unify UID/GID assignment in create() and mkdir() to use getuid()/getgid() instead of req.uid()/req.gid(), matching the root inode and populate_folder patterns. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 92e5c6093780
|
No actionable comments were generated in the recent review. 🎉 WalkthroughPlanning documentation updated to mark a FUSE rename issue on SMB backend as fixed. FUSE operations code modified to derive UID/GID from process context instead of request context, and access permission checks changed to permissive validation. Desktop documentation updated to reflect the fix and document new known limitations. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
access()to always grant if the inode exists — POSIX permission checks add no security value in a single-user encrypted vault and break the FUSE-T SMB backend (proxied UID mismatch causes EACCES onaccess(W_OK), blocking rename)create()andmkdir()to usegetuid()/getgid()instead ofreq.uid()/req.gid(), matching root inode andpopulate_folder()patternsTest plan
echo "test" > ~/CipherBox/testfile.txt— create filemv ~/CipherBox/testfile.txt ~/CipherBox/renamed.txt— same-dir renamemkdir ~/CipherBox/sub && mv ~/CipherBox/renamed.txt ~/CipherBox/sub/— cross-folder movecargo check --features fuse— no new warnings🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Documentation