]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Mount /etc/ld.so.cache into the sandbox if it exists 2984/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 28 Aug 2024 07:20:23 +0000 (09:20 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 28 Aug 2024 07:20:23 +0000 (09:20 +0200)
Otherwise libraries in non-standard locations won't be found at runtime.

mkosi/run.py

index f6e71226948c2a9a9d5754d922cd9b8615b948f7..fd3bc98e071f1a1a4c6da41a740f8347270ad7a8 100644 (file)
@@ -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: