SHA256
1
0
forked from pool/libvirt
libvirt/95c6cc34-selinux.patch
James Fehlig 9decd8f3cc - Update to libvirt 1.0.5.1 stable release
- qemu: Fix cgroup handling when setting VCPU BW
  - daemon: fix leak after listing all volumes
  - Fix iohelper usage with streams opened for read
  - util: fix virFileOpenAs return value and resulting error logs
  - iscsi: don't leak portal string when starting a pool
  - don't mention disk controllers in generic controller errors
  - conf: don't crash on a tpm device with no backends
  - qemu: allocate network connections sooner during domain startup
  -  Make detect_scsi_host_caps a function on all architectures
  - Fix release of resources with lockd plugin
  - Fix potential use of undefined variable in remote dispatch code
  - Fix F_DUPFD_CLOEXEC operation args
  - qemu: fix stupid typos in VFIO cgroup setup/teardown
  - network: fix network driver startup for qemu:///session
- Remove patches that are included in the 1.0.5.1 release
  0471637d-cgroups-vcpu-bw.patch, a2214c52-iohelper.patch,
  ca697e90-CVE-2013-1962.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=266
2013-05-21 18:02:56 +00:00

30 lines
1.0 KiB
Diff

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>
Index: libvirt-1.0.5.1/src/lxc/lxc_container.c
===================================================================
--- libvirt-1.0.5.1.orig/src/lxc/lxc_container.c
+++ libvirt-1.0.5.1/src/lxc/lxc_container.c
@@ -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"),