]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Handle top level symlinks in relaxed sandbox 3041/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 17 Sep 2024 19:29:39 +0000 (21:29 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 17 Sep 2024 19:29:39 +0000 (21:29 +0200)
mkosi/run.py

index eb6ac101cefb887a6eca7cadc544ba95bcc117ff..42bc0c76cfcf3f41fc147f7f3ab3848adc457118 100644 (file)
@@ -521,7 +521,10 @@ def sandbox_cmd(
                 Path("/lib32"),
                 Path("/lib64"),
             ):
-                cmdline += ["--bind", p, p]
+                if p.is_symlink():
+                    cmdline += ["--symlink", p.readlink(), p]
+                else:
+                    cmdline += ["--bind", p, p]
 
         if home := current_home_dir():
             cmdline += ["--bind", home, home]