Don't try to label a disk with no path (e.g. empty cdrom) (bug #499569)

This commit is contained in:
Cole Robinson 2009-05-11 02:28:23 +00:00
parent 30f098460c
commit a5a2a38a5e
2 changed files with 20 additions and 1 deletions

View File

@ -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) {

View File

@ -66,7 +66,7 @@
Summary: Library providing a simple API virtualization
Name: libvirt
Version: 0.6.2
Release: 7%{?dist}%{?extra_release}
Release: 8%{?dist}%{?extra_release}
License: LGPLv2+
Group: Development/Libraries
Source: libvirt-%{version}.tar.gz
@ -81,6 +81,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.2-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
@ -240,6 +242,7 @@ of recent versions of Linux (and other OSes).
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch200 -p0
@ -563,6 +566,9 @@ fi
%endif
%changelog
* Sun May 10 2009 Cole Robinson <crobinso@redhat.com> - 0.6.2-8.fc11
- Don't try to label a disk with no path (e.g. empty cdrom) (bug #499569)
* Thu May 7 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.2-7.fc11
- Enable migration for qemu 0.10 (bug #499704)