From 2227eb2411fb5624e6981a06f18f3225fe1a41eb Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 9 Jan 2024 10:26:03 +0100 Subject: [PATCH] Unshare IPC namespace when not in relaxed mode Otherwise tests in the sandbox will think they have access to IPC stuff when they actually don't. Fixes #2256 --- mkosi/sandbox.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mkosi/sandbox.py b/mkosi/sandbox.py index e574fd4b9..0e1921d02 100644 --- a/mkosi/sandbox.py +++ b/mkosi/sandbox.py @@ -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"] -- 2.47.2