A prefix change to unmount the SELinux filesystem broke starting
of LXC containers with a custom root filesystem
char **mounts = NULL;
size_t nmounts = 0;
+ VIR_DEBUG("prefix=%s", prefix);
+
*mountsret = NULL;
*nmountsret = 0;
/* Some versions of Linux kernel don't let you overmount
* the selinux filesystem, so make sure we kill it first
*/
- if (lxcContainerUnmountSubtree(SELINUX_MOUNT, false) < 0)
+ if (STREQ(root->src, "/") &&
+ lxcContainerUnmountSubtree(SELINUX_MOUNT, false) < 0)
goto cleanup;
#endif