Skip to content

Commit

Permalink
Unshare IPC namespace when not in relaxed mode
Browse files Browse the repository at this point in the history
Otherwise tests in the sandbox will think they have access to IPC
stuff when they actually don't.

Fixes #2256
  • Loading branch information
DaanDeMeyer committed Jan 9, 2024
1 parent 0ffba6d commit 2227eb2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mkosi/sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ def sandbox_cmd(
if relaxed:
cmdline += ["--bind", "/tmp", "/tmp"]
else:
cmdline += ["--tmpfs", "/tmp"]
cmdline += [
"--tmpfs", "/tmp",
"--unshare-ipc",
]

if (tools / "nix/store").exists():
cmdline += ["--bind", tools / "nix/store", "/nix/store"]
Expand Down

0 comments on commit 2227eb2

Please sign in to comment.