rig/commands/lib
claude-bot-andresmgsl 2dc47112f2 fix: don't read a missing /run/sshd as a broken sshd config
`sshd -t` folds two questions into one exit code — is the merged config
parseable, and is the privilege-separation directory there. Both call
sites ran it as `sshd -t 2>/dev/null` and read any non-zero exit as the
first question's answer, discarding the line that named the second.

Bootstrap aborted with "sshd rejects the merged config", a verdict sshd
never reached, and sent the operator to audit /etc/ssh files that were
never broken. /run is a tmpfs and /run/sshd is ssh.service's
RuntimeDirectory, so it is legitimately absent under socket activation
on a box whose SSH door is serving connections normally.

Classification is now a pure, sourceable sshd_privsep_gap: the status is
the verdict, the text only classifies a failure, so a passing sshd -t is
never diverted. sshd_config_ok repairs the gap with an idempotent
install -d and retests once. A genuine parse refusal still refuses and
the rollback is untouched.

Refusals now carry sshd's own stderr. users-close-root had the identical
three lines and now reaches the shared judgement through lib/sshd.sh
instead of keeping a second copy of it.

Fixes #92

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 17:58:10 +00:00
..
manifest.sh fix: read a manifest's final line when the file has no trailing newline 2026-07-20 12:48:39 +00:00
runner-config.sh bootstrap: infer the tailnet tag from the pre-auth key, verify the granted tag 2026-07-17 15:27:09 +00:00
sshd.sh fix: don't read a missing /run/sshd as a broken sshd config 2026-07-20 17:58:10 +00:00
tenant-config.sh feat(bootstrap)!: box tenant roles carry a -box suffix 2026-07-20 00:36:36 +00:00
users-config.sh fix(users): the root-door resolver matches whole fields, not substrings 2026-07-20 11:18:37 +00:00