]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: support pivot_root()
authorChristian Brauner <brauner@kernel.org>
Thu, 24 Nov 2022 09:45:24 +0000 (10:45 +0100)
committerChristian Brauner (Microsoft) <brauner@kernel.org>
Mon, 5 Dec 2022 17:34:25 +0000 (18:34 +0100)
commit57c10a5650f6bb7180f3bec31a3f24239a81be39
treef21c1891d597e0a45a1c9b697fe79f6cfcb4a48e
parent2e776ed6c8649d5991de5d2a7c0334a77485456c
nspawn: support pivot_root()

In order to support pivot_root() we need to move mount propagation
changes after the pivot_root(). While MS_MOVE requires the source mount
to not be a shared mount pivot_root() also requires the target mount to
not be a shared mount. This guarantees that pivot_root() doesn't leak
any mounts.

Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
src/core/namespace.c
src/nspawn/nspawn.c
src/shared/mount-util.c
src/shared/mount-util.h