summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-05-15 12:32:54 +0200
committerLennart Poettering <lennart@poettering.net>2023-05-16 09:24:45 +0200
commitbe79c23569f7e4065a5a26dbf15612bce28e6bb3 (patch)
treeedc22df1918f113821b5f8d73019fc1fd15e7026 /src
parent3690bfb5b2279b75840d19a9b2763b00318b05c7 (diff)
downloadsystemd-be79c23569f7e4065a5a26dbf15612bce28e6bb3.tar.gz
pid1: port unit namespacing to new /run/systemd/mount-rootfs dir
Diffstat (limited to 'src')
-rw-r--r--src/core/namespace.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/namespace.c b/src/core/namespace.c
index 2fcc096217..1116ece59d 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -2166,10 +2166,11 @@ int setup_namespace(
* in the root. The temporary directory prevents any mounts from being potentially obscured
* my other mounts we already applied. We use the same mount point for all images, which is
* safe, since they all live in their own namespaces after all, and hence won't see each
- * other. */
+ * other. (Note: this directory is also created by PID 1 early on, we create it here for
+ * similar reasons as /run/systemd/ first.) */
+ root = "/run/systemd/mount-rootfs";
+ (void) mkdir_label(root, 0555);
- root = "/run/systemd/unit-root";
- (void) mkdir_label(root, 0700);
require_prefix = true;
}