From fdd5bf2fb4473315e867de5e15c1146825631e1c Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 28 Aug 2024 09:20:23 +0200 Subject: [PATCH] Mount /etc/ld.so.cache into the sandbox if it exists Otherwise libraries in non-standard locations won't be found at runtime. --- mkosi/run.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mkosi/run.py b/mkosi/run.py index f6e712269..fd3bc98e0 100644 --- a/mkosi/run.py +++ b/mkosi/run.py @@ -470,6 +470,9 @@ def sandbox_cmd( else: cmdline += ["--ro-bind", tools / "usr", "/usr"] + if (tools / "etc/ld.so.cache").exists(): + cmdline += ["--ro-bind", tools / "etc/ld.so.cache", "/etc/ld.so.cache"] + if relaxed: cmdline += ["--bind", "/tmp", "/tmp"] else: -- 2.47.2