From: Daan De Meyer Date: Wed, 28 Aug 2024 07:20:23 +0000 (+0200) Subject: Mount /etc/ld.so.cache into the sandbox if it exists X-Git-Tag: v25~332^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2984%2Fhead;p=thirdparty%2Fmkosi.git Mount /etc/ld.so.cache into the sandbox if it exists Otherwise libraries in non-standard locations won't be found at runtime. --- 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: