Implement config file parsing and precedence with CLI

This commit is contained in:
2026-03-31 01:22:08 +02:00
parent f1d7a14b8d
commit 0119834d5a
9 changed files with 746 additions and 135 deletions
+2 -2
View File
@@ -167,7 +167,7 @@ fn ro_bind_under_tmpfs(cmd: &mut Command, base: &str, paths: &[&str]) {
fn add_rw_bind(cmd: &mut Command, path: &Path) -> Result<(), SandboxError> {
if !path.exists() {
return Err(SandboxError::RwPathMissing(path.to_path_buf()));
return Err(SandboxError::PathMissing(path.to_path_buf()));
}
cmd.arg("--bind").arg(path).arg(path);
Ok(())
@@ -175,7 +175,7 @@ fn add_rw_bind(cmd: &mut Command, path: &Path) -> Result<(), SandboxError> {
fn add_ro_bind(cmd: &mut Command, path: &Path) -> Result<(), SandboxError> {
if !path.exists() {
return Err(SandboxError::RoPathMissing(path.to_path_buf()));
return Err(SandboxError::PathMissing(path.to_path_buf()));
}
cmd.arg("--ro-bind").arg(path).arg(path);
Ok(())