Repository navigation
serve: refuse to run as root - #5
Conversation
0afbf43 to
ad012bd
Compare
|
Thanks. Refusing to run as root is right and I'd like to merge that part quickly. The privilege-drop half is a lot of code for a case the PR itself says is only useful on X11, which nobody has tested yet, and Could you split this into two PRs?
Also, please sign off the commits ( |
ad012bd to
317dbff
Compare
|
Thanks for the split, this is the right shape. One fix and a branch change:
Small: the non-Unix Branch: we moved to release branches (see CONTRIBUTING). This goes into 0.5.0; please rebase onto |
|
0.4.0 is released and this PR's base is now |
Signed-off-by: mrigbozurike <drbillionbook@gmail.com>
317dbff to
2e2f29d
Compare
|
Fixed and rebased onto
Verified on Linux both ways: as root it refuses with the id in the message, and under |
Bump the version to 0.5.0 and move Unreleased under a dated 0.5.0 section. The root refusal from #5 is listed under Changed as a breaking change; the window-title entry from #4 states that titles are on by default and reach audit streams. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H6FWzFP6qZXMn5TXipJPRw Signed-off-by: Brian Scott <claudeai@bscott.email>
Merges bscott#4 (audit: record focused window title and screenshot hash) at 7e07e04. The only conflict is CHANGELOG.md, where bscott#4 and bscott#5 both add an entry under Unreleased; both are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H6FWzFP6qZXMn5TXipJPRw Signed-off-by: Brian Scott <claudeai@bscott.email>
Merges bscott#3 (systemd: sandbox the user unit) at fc66dbf. Conflicts: CHANGELOG.md (each PR adds an entry under Unreleased; all are kept) and docs/setup-linux.md (bscott#3 and bscott#5 add sections at the same place; both are kept, the unit's sandbox section first under Running, then Persistence is opt-in). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H6FWzFP6qZXMn5TXipJPRw Signed-off-by: Brian Scott <claudeai@bscott.email>
Why
rdc never needs root (the port is unprivileged, everything else happens in the desktop session), but nothing stopped it being started under
sudoor from a system unit, and then the whole remote-control surface ran as root.What
rdc serveexits with a clear message if it is root. The decision is a pure function with tests.rdc doctorreports the process user and flags root.rdc service installis run explicitly.Split out of the original #5 as requested; the
[serve].userprivilege drop is now its own PR built on top of this one. Verified on Linux (as root it refuses; as a user it serves) and Windows (builds, tests). Signed off.