Skip to content

Relax ancestor ACL requirement for runtime dir (fixes #1621) - #1622

Closed
Carnival-z wants to merge 1 commit into
DeusData:mainfrom
Carnival-z:main
Closed

Relax ancestor ACL requirement for runtime dir (fixes #1621)#1622
Carnival-z wants to merge 1 commit into
DeusData:mainfrom
Carnival-z:main

Conversation

@Carnival-z

Copy link
Copy Markdown

Summary: Allow ancestors (like /private/tmp on macOS) that carry allow-type ACLs so the daemon can create per-user runtime directories (/private/tmp/cbm-daemon-). The final runtime directory is still hardened: owner == current user, chmod 0700, and extended ACLs cleared.

Security: Only ancestor observation rules were relaxed for compatibility. Final runtime dir hardening (0700 + ACL clear) remains unchanged.

Testing suggestions:

macOS: verify daemon can create /private/tmp/cbm-daemon- when /private/tmp carries allow-ACLs; verify runtime dir is 0700 and ACLs cleared.
Ensure socket/lock/log files remain 0600 and ACLs cleared.
Fixes: #1621

Refactor posix_directory_parent_secure function to improve ACL handling for macOS.
@Carnival-z
Carnival-z requested a review from DeusData as a code owner August 14, 2026 12:14
@github-actions

Copy link
Copy Markdown

Thanks for opening this — it has been seen, and it is queued.

This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence.

Current review status: working through a backlog. 0.9.1-rc.1 is out, so the release freeze that held reviews is over — but it left a large queue of open pull requests behind it, and we are reading through them oldest-first. The background is in discussion #1144.

What that means for this PR, concretely:

  • It will not be closed for inactivity. No stale bot touches pull requests here.
  • It may still sit a while before a human reads it. That is on us, not on you.
  • Older PRs are read first, so a recent one is not being skipped — it is behind a queue.

Things that will genuinely speed it up whenever review does happen:

  • Keep it rebased on main — the tree is moving quickly right now, and a conflicting branch cannot be reviewed as the diff you intended.
  • Get CI green, or say which failures you believe are pre-existing.
  • Keep the change to one claim. Bundled features and refactors get split before they get merged, which costs you a round trip.
  • Every commit needs a sign-off (git commit -s) — CI enforces DCO.

If this fixes a bug, a reproduction we can run is worth more than a description of the symptom.

Thanks for contributing, and sorry in advance for the wait.

@DeusData

Copy link
Copy Markdown
Owner

Thank you for filing this and for taking a run at the fix — and sorry for the delay in replying.

The problem you reported is fixed, from two directions, both shipping in v0.10.5 today:

On this patch specifically, one thing to flag kindly so it isn't a mystery: as it stands it doesn't compile — removing the ACL call left the || behind, and cppcheck stops at src/daemon/ipc.c:1389 with syntax error: ||). That is why the whole check column went red rather than just one job.

The direction it took also isn't one we can merge as-is: relaxing the requirement for the runtime directory itself would weaken a boundary that protects the coordination endpoint. CBM_RUNTIME_DIR is the version of your idea we could ship — same outcome for you, without lowering the rule for everyone.

Genuinely, thank you. Your report is a large part of why the escape hatch exists at all, and the wrong-directory message would probably still be misleading people without it.

@DeusData

Copy link
Copy Markdown
Owner

Closing — the problem you reported is fixed from two directions in v0.10.5: #1645 adds CBM_RUNTIME_DIR so the rendezvous can be relocated, and #1646 fixes the message that had been naming the wrong directory and sending you to inspect a path that was fine. You were right about that all along. Thank you for the report and for taking a run at the fix.

@DeusData DeusData closed this Aug 15, 2026
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.

CBM_CACHE_DIR ignored; daemon still requires /private/tmp/cbm-daemon-<uid> on macOS

2 participants