Fix SSH tunnelling and XenD nodeinfo compat

This commit is contained in:
Daniel P. Berrange 2008-01-19 02:20:46 +00:00
parent 7d193b7810
commit f29ea218b7
3 changed files with 48 additions and 1 deletions

View File

@ -0,0 +1,22 @@
diff -rup libvirt-0.4.0.orig/src/xend_internal.c libvirt-0.4.0.new/src/xend_internal.c
--- libvirt-0.4.0.orig/src/xend_internal.c 2007-12-17 18:05:27.000000000 -0500
+++ libvirt-0.4.0.new/src/xend_internal.c 2008-01-18 21:13:30.000000000 -0500
@@ -1907,6 +1907,9 @@ sexpr_to_xend_node_info(struct sexpr *ro
info->mhz = sexpr_int(root, "node/cpu_mhz");
info->nodes = sexpr_int(root, "node/nr_nodes");
info->sockets = sexpr_int(root, "node/sockets_per_node");
+ info->cores = sexpr_int(root, "node/cores_per_socket");
+ info->threads = sexpr_int(root, "node/threads_per_core");
+
/* Xen 3.2.0 replaces sockets_per_node with 'nr_cpus'.
* Old Xen calculated sockets_per_node using its internal
* nr_cpus / (nodes*cores*threads), so fake it ourselves
@@ -1921,8 +1924,6 @@ sexpr_to_xend_node_info(struct sexpr *ro
if (info->sockets == 0)
info->sockets = 1;
}
- info->cores = sexpr_int(root, "node/cores_per_socket");
- info->threads = sexpr_int(root, "node/threads_per_core");
return (0);
}

View File

@ -0,0 +1,17 @@
diff -rup libvirt-0.4.0.orig/src/remote_internal.c libvirt-0.4.0.new/src/remote_internal.c
--- libvirt-0.4.0.orig/src/remote_internal.c 2008-01-14 19:32:25.000000000 -0500
+++ libvirt-0.4.0.new/src/remote_internal.c 2008-01-14 19:32:42.000000000 -0500
@@ -677,11 +677,12 @@ doRemoteOpen (virConnectPtr conn,
cmd_argv[j++] = strdup (sockname ? sockname : LIBVIRTD_PRIV_UNIX_SOCKET);
cmd_argv[j++] = 0;
assert (j == nr_args);
- for (j = 0; j < nr_args; j++)
+ for (j = 0; j < (nr_args-1); j++) {
if (cmd_argv[j] == NULL) {
error (conn, VIR_ERR_SYSTEM_ERROR, strerror (ENOMEM));
goto failed;
}
+ }
}
/*FALLTHROUGH*/

View File

@ -11,13 +11,15 @@
Summary: Library providing a simple API virtualization
Name: libvirt
Version: 0.4.0
Release: 3%{?dist}%{?extra_release}
Release: 4%{?dist}%{?extra_release}
License: LGPL
Group: Development/Libraries
Source: libvirt-%{version}.tar.gz
Patch1: libvirt-%{version}-auth-null-cb.patch
Patch2: libvirt-%{version}-conffile-size.patch
Patch3: libvirt-%{version}-auth-null-cb-2.patch
Patch4: libvirt-%{version}-remote-ssh.patch
Patch5: libvirt-%{version}-nodeinfo-compat.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
URL: http://libvirt.org/
BuildRequires: python python-devel
@ -93,6 +95,8 @@ of recent versions of Linux (and other OSes).
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
# Xen is availble only on i386 x86_64 ia64
@ -218,6 +222,10 @@ fi
%doc docs/examples/python
%changelog
* Fri Jan 18 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.0-4.fc9
- Fix SSH tunnelling (rhbz #428743)
- Fix back-compat for nodeinfo call changes.
* Sun Jan 13 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.0-3.fc9
- Fix crash when no auth callback