From 839f18775317bb2e9f8f46588d6f79ca09547e8a Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 29 Jul 2018 00:42:41 +0900 Subject: [PATCH] core/namespace: drop mount points outside of root even if RootDirectory= is not set --- src/core/namespace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/namespace.c b/src/core/namespace.c index c1ee84779a..201192a5a5 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -1276,7 +1276,7 @@ int setup_namespace( if (r < 0) goto finish; - normalize_mounts(root_directory, mounts, &n_mounts); + normalize_mounts(root, mounts, &n_mounts); } if (unshare(CLONE_NEWNS) < 0) { @@ -1375,7 +1375,7 @@ int setup_namespace( if (!again) break; - normalize_mounts(root_directory, mounts, &n_mounts); + normalize_mounts(root, mounts, &n_mounts); } /* Create a blacklist we can pass to bind_mount_recursive() */ -- 2.25.1