From 263e2f20215a5bc650f83ac191c7ef6144251b30 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Mar 03 2008 16:55:24 +0000 Subject: 2 bugs found just after the release, Daniel --- diff --git a/libvirt-0.4.1-qemud1.patch b/libvirt-0.4.1-qemud1.patch new file mode 100644 index 0000000..d8d8fa8 --- /dev/null +++ b/libvirt-0.4.1-qemud1.patch @@ -0,0 +1,38 @@ + + Avoid segfault upon early libvirtd failure. + * qemud/qemud.c (main): Don't call qemudCleanup on an + uninitialized pointer. + +By the way, even though this evoked a warning from gcc, +"make distcheck" passes. Obviously, that means the distcheck +rule is inadequate. I'll fix it so that it turns on -Werror +for the final build. + +Signed-off-by: Jim Meyering +--- + qemud/qemud.c | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/qemud/qemud.c b/qemud/qemud.c +index 96fdf32..b6b82ed 100644 +--- a/qemud/qemud.c ++++ b/qemud/qemud.c +@@ -2025,7 +2025,7 @@ libvirt management daemon:\n\ + + #define MAX_LISTEN 5 + int main(int argc, char **argv) { +- struct qemud_server *server; ++ struct qemud_server *server = NULL; + struct sigaction sig_action; + int sigpipe[2]; + const char *pid_file = NULL; +@@ -2180,7 +2180,8 @@ int main(int argc, char **argv) { + unlink (pid_file); + + error1: +- qemudCleanup(server); ++ if (server) ++ qemudCleanup(server); + return ret; + } + diff --git a/libvirt-0.4.1-qemud2.patch b/libvirt-0.4.1-qemud2.patch new file mode 100644 index 0000000..51dbd3b --- /dev/null +++ b/libvirt-0.4.1-qemud2.patch @@ -0,0 +1,23 @@ + + Don't use first byte of string as a pointer. + * src/qemu_conf.c (qemudReportError): Use the pointer, errorMessage, + not its first byte, errorMessage[0]. + +Signed-off-by: Jim Meyering +--- + src/qemu_conf.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/qemu_conf.c b/src/qemu_conf.c +index eead0bc..e54da5b 100644 +--- a/src/qemu_conf.c ++++ b/src/qemu_conf.c +@@ -68,7 +68,7 @@ void qemudReportError(virConnectPtr conn, + errorMessage[0] = '\0'; + } + +- virerr = __virErrorMsg(code, (errorMessage[0] ? errorMessage[0] : NULL)); ++ virerr = __virErrorMsg(code, (errorMessage[0] ? errorMessage : NULL)); + __virRaiseError(conn, dom, net, VIR_FROM_QEMU, code, VIR_ERR_ERROR, + virerr, errorMessage, NULL, -1, -1, virerr, errorMessage); + } diff --git a/libvirt.spec b/libvirt.spec index 83219f6..83627d8 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -21,10 +21,12 @@ Summary: Library providing a simple API virtualization Name: libvirt Version: 0.4.1 -Release: 1%{?dist}%{?extra_release} +Release: 2%{?dist}%{?extra_release} License: LGPL Group: Development/Libraries Source: libvirt-%{version}.tar.gz +Patch0: libvirt-0.4.1-qemud1.patch +Patch1: libvirt-0.4.1-qemud2.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root URL: http://libvirt.org/ BuildRequires: python python-devel @@ -136,6 +138,8 @@ of recent versions of Linux (and other OSes). %prep %setup -q +%patch0 -p1 +%patch1 -p1 %build # Xen is available only on i386 x86_64 ia64 @@ -276,6 +280,9 @@ fi %doc docs/examples/python %changelog +* Mon Mar 3 2008 Daniel Veillard - 0.4.1-2.fc9 +- 2 patches found just after the release + * Mon Mar 3 2008 Daniel Veillard - 0.4.1-1.fc9 - Release of 0.4.1 - Storage APIs