From c38f6e5a73c5ad59fc11a20f455a8f4268da5634 Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Sat, 13 Jun 2026 21:29:39 +0200 Subject: [PATCH] fix(spawner): use FreeBSD jail command= parameter syntax Salvages Codex's FreeBSD-validated fix from fix/jail-spawner-freebsd-command-format, taking ONLY the spawner.rs change onto current main. (The original branch also re-ran a markdown formatter and would have re-corrupted the jailed-spawn design doc + README, so those are dropped.) My merged jail_wrap emitted the ephemeral jail command as two argv tokens ("command", binary), but jail(8) expects a single name=value parameter (command=). Without this the `jail -c` ephemeral path fails on FreeBSD. Fixes the ephemeral builder and the two jail_tests expectations. Co-authored-by: Sam & Codex (fix/jail-spawner-freebsd-command-format) Co-Authored-By: Claude Opus 4.8 --- crates/colibri-daemon/src/spawner.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/colibri-daemon/src/spawner.rs b/crates/colibri-daemon/src/spawner.rs index 77fd3d9..4b59ccd 100644 --- a/crates/colibri-daemon/src/spawner.rs +++ b/crates/colibri-daemon/src/spawner.rs @@ -213,8 +213,9 @@ pub fn jail_wrap( format!("path={path}"), "mount.devfs".to_string(), ip4_param, - "command".to_string(), - binary.to_string(), + // jail(8) expects command as a name=value parameter, followed by + // any argv for that command. + format!("command={binary}"), ]; ("jail".to_string(), a) } else { @@ -694,8 +695,7 @@ mod jail_tests { "path=/var/jails/pi", "mount.devfs", "ip4=inherit", - "command", - "pi", + "command=pi", "go", ]) ); @@ -717,8 +717,7 @@ mod jail_tests { "path=/var/jails/pi", "mount.devfs", "ip4.addr=10.0.0.5", - "command", - "pi", + "command=pi", ]) ); } -- 2.45.3