[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, master, updated. debian/0.7.7-1-6-g3c12caf
Laurent Léonard
laurent at open-minds.org
Mon Mar 15 18:16:02 UTC 2010
The following commit has been merged in the master branch:
commit 3c12caf6accb5290bf7e4ed1ef343f855cbe1072
Author: Laurent Léonard <laurent at open-minds.org>
Date: Mon Mar 15 18:13:30 2010 +0100
qemu: Fix USB by product with security enabled.
diff --git a/debian/patches/0008-qemu-Fix-USB-by-product-with-security-enabled.patch b/debian/patches/0008-qemu-Fix-USB-by-product-with-security-enabled.patch
new file mode 100644
index 0000000..339fc24
--- /dev/null
+++ b/debian/patches/0008-qemu-Fix-USB-by-product-with-security-enabled.patch
@@ -0,0 +1,48 @@
+From: Cole Robinson <crobinso at redhat.com>
+Date: Fri, 12 Mar 2010 17:37:52 +0000
+Subject: [PATCH] qemu: Fix USB by product with security enabled
+
+We need to call PrepareHostdevs to determine the USB device path before
+any security calls. PrepareHostUSBDevices was also incorrectly skipping
+all USB devices.
+
+Origin: upstream, http://www.libvirt.org/git/?p=libvirt.git;a=commit;h=6d5c8a8f51db8ce97ab35ab6022dd5c94ab016b4
+---
+ src/qemu/qemu_driver.c | 9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
+index 2c99ce8..d5ac904 100644
+--- a/src/qemu/qemu_driver.c
++++ b/src/qemu/qemu_driver.c
+@@ -2360,7 +2360,7 @@ qemuPrepareHostUSBDevices(struct qemud_driver *driver ATTRIBUTE_UNUSED,
+
+ if (hostdev->mode != VIR_DOMAIN_HOSTDEV_MODE_SUBSYS)
+ continue;
+- if (hostdev->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI)
++ if (hostdev->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB)
+ continue;
+
+ /* Resolve a vendor/product to bus/device */
+@@ -2701,6 +2701,10 @@ static int qemudStartVMDaemon(virConnectPtr conn,
+ return -1;
+ }
+
++ /* Must be run before security labelling */
++ if (qemuPrepareHostDevices(driver, vm->def) < 0)
++ goto cleanup;
++
+ /* If you are using a SecurityDriver with dynamic labelling,
+ then generate a security label for isolation */
+ if (driver->securityDriver &&
+@@ -2759,9 +2763,6 @@ static int qemudStartVMDaemon(virConnectPtr conn,
+ if (qemuSetupCgroup(driver, vm) < 0)
+ goto cleanup;
+
+- if (qemuPrepareHostDevices(driver, vm->def) < 0)
+- goto cleanup;
+-
+ if (VIR_ALLOC(priv->monConfig) < 0) {
+ virReportOOMError();
+ goto cleanup;
+--
diff --git a/debian/patches/series b/debian/patches/series
index 2bc7012..ef3e0bc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
0005-Terminate-nc-on-EOF.patch
0006-Don-t-drop-caps-when-exec-ing-qemu.patch
0007-Work-around-broken-linux-socket.h.patch
+0008-qemu-Fix-USB-by-product-with-security-enabled.patch
--
Libvirt Debian packaging
More information about the Pkg-libvirt-commits
mailing list