On Thu, Dec 10, 2009 at 04:40:14PM +0000, Richard W.M. Jones wrote:
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
>From c11a82b62aefc21e070c527f59a1f9c57a7b4f36 Mon Sep 17 00:00:00
2001
From: Richard Jones <rjones(a)redhat.com>
Date: Thu, 10 Dec 2009 16:39:07 +0000
Subject: [PATCH] qemu driver: Fix segfault in libvirt/libvirtd when uri->path is
NULL.
See also:
https://bugzilla.redhat.com/show_bug.cgi?id=545400#c1
---
src/qemu/qemu_driver.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 2fb059d..e9cc8c3 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -2651,6 +2651,15 @@ static virDrvOpenStatus qemudOpen(virConnectPtr conn,
return VIR_DRV_OPEN_ERROR;
}
+ if (conn->uri->path == NULL) {
+ qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+ _("no QEMU URI path given, try %s"),
+ qemu_driver->privileged
+ ? "qemu:///system"
+ : "qemu:///session");
+ return VIR_DRV_OPEN_ERROR;
+ }
+
if (qemu_driver->privileged) {
if (STRNEQ (conn->uri->path, "/system") &&
STRNEQ (conn->uri->path, "/session")) {
Whoops, and that's easy to get wrong, ACK, please push !
thanks !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/