richardcase / richardcase/clowder
Make fallback runtime and state directories per-user and private
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 14m
- Merged PRs (30d)
- 16
Description
Problem
When XDG runtime/state variables and HOME are unavailable, the daemon falls back to shared /tmp/clowder paths. Startup creates directories without enforcing private ownership/modes.
Evidence: https://github.com/richardcase/clowder/blob/b5492d5/crates/clowder-config/src/lib.rs#L248-L271
Socket setup: https://github.com/richardcase/clowder/blob/b5492d5/crates/clowder-daemon/src/main.rs#L20-L51
Impact
Users can collide on the daemon lock and, depending on platform and umask, access or interfere with another user's sockets/state.
Acceptance criteria
- Use a UID-qualified fallback path.
- Create/validate runtime and state directories as owner-only.
- Reject foreign-owned or insecure directories and test the fallback.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the fallback path logic in crates/clowder-config/src/lib.rs#L248-L271 and the socket setup in crates/clowder-daemon/src/main.rs#L20-L51. Trace how runtime and state directories are created, then add focused tests for UID-qualified fallback paths, owner-only permissions, and rejection of foreign-owned or insecure directories. Done means the fallback no longer permits shared or unsafe daemon paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100