Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libvirt
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Libvirt Packaging Team
libvirt
Commits
3c12caf6
Commit
3c12caf6
authored
15 years ago
by
Laurent Léonard
Browse files
Options
Downloads
Patches
Plain Diff
qemu: Fix USB by product with security enabled.
parent
fe642561
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/0008-qemu-Fix-USB-by-product-with-security-enabled.patch
+48
-0
48 additions, 0 deletions
.../0008-qemu-Fix-USB-by-product-with-security-enabled.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
49 additions
and
0 deletions
debian/patches/0008-qemu-Fix-USB-by-product-with-security-enabled.patch
0 → 100644
+
48
−
0
View file @
3c12caf6
From: Cole Robinson <crobinso@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;
--
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
3c12caf6
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment