]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
make.sh: Swap mount propagation
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 19 Aug 2024 18:05:16 +0000 (18:05 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 19 Aug 2024 18:05:16 +0000 (18:05 +0000)
When we create the outer mount namespace, we still want to receive any
mounts from the host system which is why we set it to slave.

The second mount namespace should be a copy of the outer one but should not
propagate anything back to the outer mount namespace.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index c5936a67179b72142bf90149154b226027488f6e..8e0154107f6c2a489c49d7f1125e46d15314d817 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -650,7 +650,7 @@ execute() {
 
                        # Create a new mount namespace
                        "--mount"
-                       "--propagation=slave"
+                       "--propagation=private"
 
                        # Create a new PID namespace and fork
                        "--pid"
@@ -2150,7 +2150,7 @@ exec_in_namespace() {
        IN_NAMESPACE=1 \
        exec unshare \
                --mount \
-               --propagation=private \
+               --propagation=slave \
                "${0}" "${args[@]}" "$@"
 }