]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pid1: port unit namespacing to new /run/systemd/mount-rootfs dir
authorLennart Poettering <lennart@poettering.net>
Mon, 15 May 2023 10:32:54 +0000 (12:32 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 16 May 2023 07:24:45 +0000 (09:24 +0200)
src/core/namespace.c

index 2fcc096217d8fbbbb9f6ff32ebbc71703fbfebfc..1116ece59d80675c05d4e0e4ec5b51c6d015e737 100644 (file)
@@ -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;
         }