fix: keep Linux helper reexec stable after binary replacement - #21
fix: keep Linux helper reexec stable after binary replacement#21Chillizu wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe sandbox helper command now resolves its executable from ChangesHelper executable resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Sandbox helper reexecution now uses the live executable through /proc/self/exe when available, preserving operation after atomic binary replacement while retaining the existing fallback. The change is ready to merge. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 Clippy (1.97.1)Clippy execution timed out 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 |
Summary
/proc/self/exewhen spawning the Linux Landlock helpercurrent_exe()when procfs is unavailableWhy
If the CatDesk binary is replaced while the process is still running,
current_exe()can resolve to the old deleted pathname. The nextrun_command/ background command then fails to spawn the Landlock helper with ENOENT./proc/self/execontinues to reference the live executable inode, so self-reexec remains available across an atomic binary replacement.Verification
cargo test --release: 219 passed, 0 failedrustfmtgit diff --check: cleanNote: repository-wide
cargo fmt --checkcurrently reports an unrelated pre-existing formatting diff insrc/browser.rson main.Summary by CodeRabbit