make.sh: Swap mount propagation

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>
This commit is contained in:
Michael Tremer
2024-08-19 18:05:16 +00:00
parent da7dbb1af2
commit f3c360cd6e

View File

@@ -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[@]}" "$@"
}