2013-05-20 22:57:29 +02:00
|
|
|
commit 95c6cc344bec8405636d2a59fc0c34e0581001ab
|
|
|
|
Author: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
Date: Wed May 15 16:26:59 2013 +0100
|
|
|
|
|
|
|
|
Don't mount selinux fs in LXC if selinux is disabled
|
|
|
|
|
|
|
|
Before trying to mount the selinux filesystem in a container
|
|
|
|
use is_selinux_enabled() to check if the machine actually
|
|
|
|
has selinux support (eg not booted with selinux=0)
|
|
|
|
|
|
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
2013-05-21 20:02:56 +02:00
|
|
|
Index: libvirt-1.0.5.1/src/lxc/lxc_container.c
|
2013-05-20 22:57:29 +02:00
|
|
|
===================================================================
|
2013-05-21 20:02:56 +02:00
|
|
|
--- libvirt-1.0.5.1.orig/src/lxc/lxc_container.c
|
|
|
|
+++ libvirt-1.0.5.1/src/lxc/lxc_container.c
|
2013-05-20 22:57:29 +02:00
|
|
|
@@ -701,6 +701,12 @@ static int lxcContainerMountBasicFS(bool
|
|
|
|
(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"),
|