diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-05-16 05:26:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-16 05:26:48 -0700 |
commit | 93d4a200fbc1dd741a9971853a5efee7e537cc3e (patch) | |
tree | 34502b5ad61eed6a53dbd477de25d32bbe5a617c /src/core/namespace.c | |
parent | b10c4acfa38e0b00df4209edfb62ad726ae51084 (diff) | |
parent | a4b3e9423696f604be33b4ab93c4bb5c6c807554 (diff) | |
download | systemd-93d4a200fbc1dd741a9971853a5efee7e537cc3e.tar.gz |
Merge pull request #27648 from poettering/common-dissect-dir
pid1: add common root dir inode to mount disk images to in private namespaces
Diffstat (limited to 'src/core/namespace.c')
-rw-r--r-- | src/core/namespace.c | 7 |
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; } |