]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/namespace.c
core/namespace: drop mount points outside of root even if RootDirectory= is not set
[thirdparty/systemd.git] / 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() */