fix(spawner): FreeBSD jail command=<binary> syntax (salvaged from Codex) #39

Merged
clawdie merged 1 commit from fix/jail-command-syntax into main 2026-06-13 21:35:55 +02:00

View file

@ -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",
])
);
}