Commit Graph

5 Commits

Author SHA1 Message Date
Einspanner123 9e63766b2f fix(sandbox): use is_ok_and instead of map+unwrap_or for clippy
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 14:08:15 +08:00
Einspanner123 2a62441b69 fix(sandbox): add --map-auto flag for unshare commands
On systems where `unshare --map-root-user` alone fails because uid_map
direct writes are blocked by the kernel (observed on util-linux 2.39.3
with non-root users), adding `--map-auto` lets unshare use the newuidmap
SUID helper with /etc/subuid delegations to set up the mapping.

This affects both the user-namespace detection probe and the actual
sandbox launch arguments. When --map-root-user already works natively,
the additional --map-auto flag is a safe no-op.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 14:07:29 +08:00
bellman 0b0d55d7ec omx(team): auto-checkpoint worker-1 [1] 2026-05-14 18:11:53 +09:00
Jobdori 89104eb0a2 fix(sandbox): probe unshare capability instead of binary existence
On GitHub Actions runners, `unshare` binary exists at /usr/bin/unshare
but user namespaces (CLONE_NEWUSER) are restricted, causing `unshare
--user --map-root-user` to silently fail. This produced empty stdout
in the bash_stdout_roundtrip parity test (mock_parity_harness.rs:533).

Replace the simple `command_exists("unshare")` check with
`unshare_user_namespace_works()` that actually probes whether
`unshare --user --map-root-user true` succeeds. Result is cached
via OnceLock so the probe runs at most once per process.

Fixes: CI red on main@85c5b0e (Rust CI run 23933274144)
2026-04-03 16:24:02 +09:00
Yeachan-Heo 98264aa3a9 feat: git integration, sandbox isolation, init command (merged from rcc branches) 2026-04-01 01:23:47 +00:00