From 0aa1caddc05f613d88cba94d3d29afa9b11351c7a6989940f558b0f944544984 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Fri, 26 Mar 2010 23:26:28 +0000 Subject: [PATCH] Fix virsh dominfo crash when no security driver is configured OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=45 --- fix-no-secdriver.patch | 26 ++++++++++++++++++++++++++ libvirt.changes | 6 ++++++ libvirt.spec | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 fix-no-secdriver.patch diff --git a/fix-no-secdriver.patch b/fix-no-secdriver.patch new file mode 100644 index 0000000..4dd94de --- /dev/null +++ b/fix-no-secdriver.patch @@ -0,0 +1,26 @@ +commit b7a7b3365145f6e9e434a3265a58666cd2e6d8dd +Author: Guido Günther +Date: Wed Mar 17 21:04:11 2010 +0100 + + Don't crash without a security driver + + "virsh dominfo " crashes if there's no primary security driver set + since we only intialize the secmodel.model and secmodel.doi if we have + one. Attached patch checks for securityPrimaryDriver instead of + securityDriver since the later is always set in qemudSecurityInit(). + + Closes: http://bugs.debian.org/574359 + +Index: libvirt-0.7.7/src/qemu/qemu_driver.c +=================================================================== +--- libvirt-0.7.7.orig/src/qemu/qemu_driver.c ++++ libvirt-0.7.7/src/qemu/qemu_driver.c +@@ -4901,7 +4901,7 @@ static int qemudNodeGetSecurityModel(vir + int ret = 0; + + qemuDriverLock(driver); +- if (!driver->securityDriver) { ++ if (!driver->securityPrimaryDriver) { + memset(secmodel, 0, sizeof (*secmodel)); + goto cleanup; + } diff --git a/libvirt.changes b/libvirt.changes index 7d0973a..b533cea 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 26 17:20:11 MDT 2010 - jfehlig@novell.com + +- Fix 'virsh dominfo' crash when no security driver is configured + fix-no-secdriver.patch + ------------------------------------------------------------------- Sun Mar 21 21:20:17 MST 2010 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index dee4294..577f6bc 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -140,6 +140,7 @@ Source1: libvirtd.init # Upstream patches Patch0: xen-name-for-devid.patch Patch1: lxc-cgroup.patch +Patch2: fix-no-secdriver.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch @@ -256,6 +257,7 @@ Authors: %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %patch100 -p1 %patch101 %patch102 -p1