From 4465a6387281fa3c58163e12b5a8e7e21300c968 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: May 11 2009 02:29:05 +0000 Subject: Don't try to label a disk with no path (e.g. empty cdrom) (bug #499569) --- diff --git a/libvirt-0.6.2-fix-nosource-label.patch b/libvirt-0.6.2-fix-nosource-label.patch new file mode 100644 index 0000000..c0b0498 --- /dev/null +++ b/libvirt-0.6.2-fix-nosource-label.patch @@ -0,0 +1,13 @@ +diff -rup libvirt-0.6.2/src/security_selinux.c new/src/security_selinux.c +--- libvirt-0.6.2/src/security_selinux.c 2009-05-10 22:04:25.000000000 -0400 ++++ new/src/security_selinux.c 2009-05-10 22:06:09.000000000 -0400 +@@ -338,6 +338,9 @@ SELinuxSetSecurityImageLabel(virConnectP + { + const virSecurityLabelDefPtr secdef = &vm->def->seclabel; + ++ if (!disk->src) ++ return 0; ++ + if (disk->shared) { + return SELinuxSetFilecon(conn, disk->src, default_image_context); + } else if (disk->readonly) { diff --git a/libvirt.spec b/libvirt.spec index cd40274..64708e6 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -55,7 +55,7 @@ Summary: Library providing a simple API virtualization Name: libvirt Version: 0.6.3 -Release: 7%{?dist}%{?extra_release} +Release: 8%{?dist}%{?extra_release} License: LGPLv2+ Group: Development/Libraries Source: libvirt-%{version}.tar.gz @@ -67,6 +67,8 @@ Patch2: libvirt-0.6.3-hostdev-managed.patch Patch3: libvirt-0.6.3-refresh-qemu-caps.patch # Enable migration with qemu 0.10 Patch4: libvirt-0.6.3-enable-qemu-0-10-migration.patch +# Don't try to label a disk with no path (e.g. empty cdrom) (bz 499569) +Patch5: libvirt-0.6.2-fix-nosource-label.patch # Not for upstream. Temporary hack till PulseAudio autostart # problems are sorted out when SELinux enforcing @@ -224,6 +226,7 @@ of recent versions of Linux (and other OSes). %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %patch200 -p0 @@ -554,6 +557,9 @@ fi %endif %changelog +* Sun May 10 2009 Cole Robinson - 0.6.2-8.fc12 +- Don't try to label a disk with no path (e.g. empty cdrom) (bug #499569) + * Thu May 7 2009 Mark McLoughlin - 0.6.3-7.fc12 - Enable migration for qemu 0.10 (bug #499704)