libvirt/libvirt-0.6.2-svirt-sound.patch
Daniel Veillard f5edf79c95 libvirt-0.6.2 release
remove old patches
update the svirt sound patch
Daniel
2009-04-03 15:52:11 +00:00

34 lines
1015 B
Diff

--- 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 (vm->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 (vm->def->nsounds) {
+ if (vm->def->nsounds &&
+ !skipSound) {
int size = 100;
char *modstr;
if (VIR_ALLOC_N(modstr, size+1) < 0)