From 9e5f825280192be429cc79153235d12778427fae Mon Sep 17 00:00:00 2001 From: topimiettinen Date: Sat, 14 May 2016 16:46:23 +0000 Subject: namespace: unmount old /dev under our new private /dev (#3254) Drop all dangling old /dev mounts before mounting a new private /dev tree. --- src/core/namespace.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core') diff --git a/src/core/namespace.c b/src/core/namespace.c index b573f008b9..ef85bfec23 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -237,6 +237,8 @@ static int mount_dev(BindMount *m) { */ (void) mkdir_p_label(m->path, 0755); + /* Unmount everything in old /dev */ + umount_recursive(m->path, 0); if (mount(dev, m->path, NULL, MS_MOVE, NULL) < 0) { r = -errno; goto fail; -- cgit v1.2.3-54-g00ecf