diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 86746df5fa..c9c11e8575 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -705,6 +705,12 @@ static int lxcContainerMountBasicFS(bool pivotRoot, (access(srcpath, R_OK) < 0)) continue; +#if WITH_SELINUX + if (STREQ(mnts[i].src, SELINUX_MOUNT) && + !is_selinux_enabled()) + continue; +#endif + if (virFileMakePath(mnts[i].dst) < 0) { virReportSystemError(errno, _("Failed to mkdir %s"),