]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: remove umount2()
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 10 May 2017 11:27:38 +0000 (13:27 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 10 May 2017 11:35:46 +0000 (13:35 +0200)
I really fail to see the point of this and git {blame, log -S} don't really
enlighten me on the reason for this as well. But I might be dense. The way I
see it the only thing this line achieves is causing trouble when the container
is started as root because the umount2() call will umount e.g.
/usr/lib/x86_64-linux-gnu/lxc in case it is a mountpoint on the host. Note,
this is because lxc_spawn() is still called in the hosts namespaces.

Closes https://github.com/lxc/lxd/#3255.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c

index 61d268ad0d4041c59a46b211548ac326c408da9d..db2a56e71c9f592acf674dd23a5aadb8ea2c2c42 100644 (file)
@@ -1289,9 +1289,6 @@ static int lxc_spawn(struct lxc_handler *handler)
        if (lxc_sync_barrier_child(handler, LXC_SYNC_POST_CGROUP))
                return -1;
 
-       if (detect_shared_rootfs())
-               umount2(handler->conf->rootfs.mount, MNT_DETACH);
-
        if (handler->ops->post_start(handler, handler->data))
                goto out_abort;