richardcase / richardcase/clowder

Make fallback runtime and state directories per-user and private

Open
#134 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug priority: high rust
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.