]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Don't try to chmod /tmp if it's being bind mounted in 2929/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 1 Aug 2024 07:45:01 +0000 (09:45 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 1 Aug 2024 08:27:59 +0000 (10:27 +0200)
mkosi/sandbox.py

index 459199fb48e35ac3a4cc2fe0f3924a28178557e8..0ba5b9a6cf42e660f08963155449f5e5930b21d4 100644 (file)
@@ -226,7 +226,8 @@ def sandbox_cmd(
     # bubblewrap creates everything with a restricted mode so relax stuff as needed.
     ops = []
     if not relaxed:
-        ops += ["chmod 1777 /tmp"]
+        if not any(Path(m.dst) == Path("/tmp") for m in mounts):
+            ops += ["chmod 1777 /tmp"]
         if not devices:
             ops += ["chmod 1777 /dev/shm"]
     if vartmpdir: