]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/namespace: drop mount points outside of root even if RootDirectory= is not set
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 28 Jul 2018 15:42:41 +0000 (00:42 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 6 Aug 2018 03:51:33 +0000 (12:51 +0900)
src/core/namespace.c

index c1ee84779a853df0b31c8e786364c82982e20b31..201192a5a55a84e9b1bf743b3edd97cf66e7bd9a 100644 (file)
@@ -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() */