Skip to content

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

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

[Security] Keep monitor-watch flock files out of world-writable /tmp#10505
Chessing234 wants to merge 1 commit into
omacom:quattrofrom
Chessing234:security/monitor-watch-lock-runtime

Conversation

@Chessing234

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

Made with Cursor

@Chessing234

Copy link
Copy Markdown
Contributor Author

@dhh @ryanrhughes ready for 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