27 lines
985 B
Diff
27 lines
985 B
Diff
commit b7a7b3365145f6e9e434a3265a58666cd2e6d8dd
|
|
Author: Guido Günther <agx@sigxcpu.org>
|
|
Date: Wed Mar 17 21:04:11 2010 +0100
|
|
|
|
Don't crash without a security driver
|
|
|
|
"virsh dominfo <vm>" 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;
|
|
}
|