Stop --chdir from binding the working directory read-write
This commit is contained in:
@@ -65,7 +65,7 @@ fn chdir_override() {
|
||||
let dir = TempDir::new().expect("failed to create temp dir");
|
||||
let dir_str = dir.path().to_str().unwrap();
|
||||
|
||||
let output = Sandbox::new(&["--chdir", dir_str])
|
||||
let output = Sandbox::new(&["--ro", dir_str, "--chdir", dir_str])
|
||||
.args(["--", "bash", "-c", "pwd"])
|
||||
.output()
|
||||
.expect("agent-sandbox binary failed to execute");
|
||||
@@ -82,7 +82,7 @@ fn chdir_under_hardened_tmp() {
|
||||
let dir = TempDir::new().expect("failed to create temp dir");
|
||||
let dir_str = dir.path().to_str().unwrap();
|
||||
|
||||
let output = Sandbox::new(&["--hardened", "--chdir", dir_str])
|
||||
let output = Sandbox::new(&["--hardened", "--rw", dir_str, "--chdir", dir_str])
|
||||
.args(["--", "bash", "-c", "pwd && touch ./ok && echo done"])
|
||||
.output()
|
||||
.expect("agent-sandbox binary failed to execute");
|
||||
|
||||
Reference in New Issue
Block a user