Skip to content

Commit

Permalink
fix: Set correct mount flags
Browse files Browse the repository at this point in the history
  • Loading branch information
John Doe committed Nov 3, 2023
1 parent 1bdc0c2 commit 4c30be8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 3 additions & 3 deletions hakoniwa-cli/src/embed/KISS-policy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ mounts = [
{ source = "/lib64" , target = "/lib64" },
{ source = "/usr" , target = "/usr" },
{ source = "/dev/null" , target = "/dev/null" , rw = true },
{ source = "/dev/random" , target = "/dev/random" },
{ source = "/dev/urandom", target = "/dev/urandom" },
{ source = "/dev/zero" , target = "/dev/zero" },
{ source = "/dev/random" , target = "/dev/random" , rw = true },
{ source = "/dev/urandom", target = "/dev/urandom" , rw = true },
{ source = "/dev/zero" , target = "/dev/zero" , rw = true },
]

[env]
Expand Down
6 changes: 0 additions & 6 deletions hakoniwa/tests/sandbox_policy_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ mod sandbox_policy_test {
assert_eq!(result.status, ExecutorResultStatus::Ok);
assert_eq!(result.exit_code, Some(0));
assert!(String::from_utf8_lossy(&result.stdout).contains("rw,"));

let mut executor = sandbox().command("findmnt", &["findmnt", "-n", "-T", "/dev/zero"]);
let result = executor.run();
assert_eq!(result.status, ExecutorResultStatus::Ok);
assert_eq!(result.exit_code, Some(0));
assert!(String::from_utf8_lossy(&result.stdout).contains("ro,"));
}

#[test]
Expand Down

0 comments on commit 4c30be8

Please sign in to comment.