Skip to content

[Security] Keep monitor-watch flock files out of world-writable /tmp - #10505

Closed
chessing234 wants to merge 1 commit into
omacom:quattrofrom
chessing234:security/monitor-watch-lock-runtime
Closed

chessing234 wants to merge 1 commit into
omacom:quattrofrom
chessing234:security/monitor-watch-lock-runtime

Conversation

@chessing234

@chessing234 chessing234 commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The clamshell and modeless recovery loops flocked ${XDG_RUNTIME_DIR:-/tmp}/omarchy-monitor-*.lock
  • A local user who held those paths in /tmp could skip lid/hotplug recovery (flock -n || exit 0)
  • Stage both flock files under $XDG_RUNTIME_DIR (or a 0700 /tmp/omarchy-$UID fallback)

Test plan

  • bash test/shell.d/monitor-recovery-test.sh
  • Confirm the watcher lock files are not /tmp/omarchy-monitor-clamshell.lock / omarchy-monitor-modeless.lock

@chessing234

Copy link
Copy Markdown
Contributor Author

@dhh @ryanrhughes ready for review

@chessing234

Copy link
Copy Markdown
Contributor Author

folded into #12066 for a single review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant