From fb0e106f8e77c427ed5a15b72be09344873e351a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 23 Jun 2023 17:50:39 +0200 Subject: [PATCH] namespace: when mounting new proc instance, bind mount submounts of source over Fixes: #28059 --- src/core/namespace.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/namespace.c b/src/core/namespace.c index bf01c5e0284..f39ab2f4689 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -1178,6 +1178,10 @@ static int mount_procfs(const MountEntry *m, const NamespaceInfo *ns_info) { } } else if (r < 0) return r; + else + /* We mounted a new instance now. Let's bind mount the children over now. This matters for + * nspawn where a bunch of files are overmounted, in particular the boot id */ + (void) bind_mount_submounts("/proc", entry_path); return 1; } -- 2.47.3