diff --git a/libvirt-0.6.2-fix-nosource-label.patch b/libvirt-0.6.2-fix-nosource-label.patch deleted file mode 100644 index c0b0498..0000000 --- a/libvirt-0.6.2-fix-nosource-label.patch +++ /dev/null @@ -1,13 +0,0 @@ -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-0.6.3-svirt-sound.patch b/libvirt-0.6.3-svirt-sound.patch deleted file mode 100644 index 3668c7b..0000000 --- a/libvirt-0.6.3-svirt-sound.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- src/qemu_conf.c.orig 2009-04-02 11:50:10.000000000 +0200 -+++ src/qemu_conf.c 2009-04-03 17:46:59.000000000 +0200 -@@ -779,6 +779,20 @@ int qemudBuildCommandLine(virConnectPtr - char domid[50]; - char *pidfile; - const char *cpu = NULL; -+ int skipSound = 0; -+ -+ if (driver->securityDriver && -+ driver->securityDriver->name && -+ STREQ(driver->securityDriver->name, "selinux") && -+ getuid() == 0) { -+ static int soundWarned = 0; -+ skipSound = 1; -+ if (def->nsounds && -+ !soundWarned) { -+ soundWarned = 1; -+ VIR_WARN0("Sound cards for VMs are disabled while SELinux security model is active"); -+ } -+ } - - uname_normalize(&ut); - -@@ -1425,7 +1439,8 @@ int qemudBuildCommandLine(virConnectPtr - } - - /* Add sound hardware */ -- if (def->nsounds) { -+ if (def->nsounds && -+ !skipSound) { - int size = 100; - char *modstr; - if (VIR_ALLOC_N(modstr, size+1) < 0) diff --git a/libvirt-0.6.4-svirt-sound.patch b/libvirt-0.6.4-svirt-sound.patch new file mode 100644 index 0000000..327aafa --- /dev/null +++ b/libvirt-0.6.4-svirt-sound.patch @@ -0,0 +1,33 @@ +--- src/qemu_conf.c.orig 2009-05-29 19:24:59.000000000 +0200 ++++ src/qemu_conf.c 2009-05-29 19:19:39.000000000 +0200 +@@ -792,6 +792,20 @@ int qemudBuildCommandLine(virConnectPtr + char uuid[VIR_UUID_STRING_BUFLEN]; + char domid[50]; + const char *cpu = NULL; ++ int skipSound = 0; ++ ++ if (driver->securityDriver && ++ driver->securityDriver->name && ++ STREQ(driver->securityDriver->name, "selinux") && ++ getuid() == 0) { ++ static int soundWarned = 0; ++ skipSound = 1; ++ if (def->nsounds && ++ !soundWarned) { ++ soundWarned = 1; ++ VIR_WARN0("Sound cards for VMs are disabled while SELinux security model is active"); ++ } ++ } + + uname_normalize(&ut); + +@@ -1429,7 +1443,8 @@ int qemudBuildCommandLine(virConnectPtr + } + + /* Add sound hardware */ +- if (def->nsounds) { ++ if (def->nsounds && ++ !skipSound) { + int size = 100; + char *modstr; + if (VIR_ALLOC_N(modstr, size+1) < 0) diff --git a/libvirt.spec b/libvirt.spec index 6c12377..b61046e 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -66,7 +66,7 @@ Source: libvirt-%{version}.tar.gz # Temporary hack till PulseAudio autostart problems are sorted # out when SELinux enforcing (bz 486112) -Patch200: libvirt-0.6.3-svirt-sound.patch +Patch200: libvirt-0.6.4-svirt-sound.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root URL: http://libvirt.org/