Compare commits
2 Commits
libvirt-0_
...
libvirt-0_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5238691972 | ||
|
|
49bd0fe0f6 |
83
libvirt-0.4.0-auth-null-cb-2.patch
Normal file
83
libvirt-0.4.0-auth-null-cb-2.patch
Normal file
@@ -0,0 +1,83 @@
|
||||
diff -rupN 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-11 10:39:34.000000000 -0500
|
||||
+++ libvirt-0.4.0.new/src/remote_internal.c 2008-01-11 10:43:12.000000000 -0500
|
||||
@@ -3054,8 +3054,12 @@ remoteAuthSASL (virConnectPtr conn, stru
|
||||
if ((remoteAddr = addrToString(&sa, salen)) == NULL)
|
||||
goto cleanup;
|
||||
|
||||
- if ((saslcb = remoteAuthMakeCallbacks(auth->credtype, auth->ncredtype)) == NULL)
|
||||
- goto cleanup;
|
||||
+ if (auth) {
|
||||
+ if ((saslcb = remoteAuthMakeCallbacks(auth->credtype, auth->ncredtype)) == NULL)
|
||||
+ goto cleanup;
|
||||
+ } else {
|
||||
+ saslcb = NULL;
|
||||
+ }
|
||||
|
||||
/* Setup a handle for being a client */
|
||||
err = sasl_client_new("libvirt",
|
||||
@@ -3168,15 +3172,21 @@ remoteAuthSASL (virConnectPtr conn, stru
|
||||
goto cleanup;
|
||||
}
|
||||
/* Run the authentication callback */
|
||||
- if ((*(auth->cb))(cred, ncred, auth->cbdata) < 0) {
|
||||
+ if (auth && auth->cb) {
|
||||
+ if ((*(auth->cb))(cred, ncred, auth->cbdata) < 0) {
|
||||
+ __virRaiseError (in_open ? NULL : conn, NULL, NULL, VIR_FROM_REMOTE,
|
||||
+ VIR_ERR_AUTH_FAILED, VIR_ERR_ERROR, NULL, NULL, NULL, 0, 0,
|
||||
+ "Failed to collect auth credentials");
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+ remoteAuthFillInteract(cred, interact);
|
||||
+ goto restart;
|
||||
+ } else {
|
||||
__virRaiseError (in_open ? NULL : conn, NULL, NULL, VIR_FROM_REMOTE,
|
||||
VIR_ERR_AUTH_FAILED, VIR_ERR_ERROR, NULL, NULL, NULL, 0, 0,
|
||||
- "Failed to collect auth credentials");
|
||||
+ "No authentication callback available");
|
||||
goto cleanup;
|
||||
- return -1;
|
||||
}
|
||||
- remoteAuthFillInteract(cred, interact);
|
||||
- goto restart;
|
||||
}
|
||||
free(iret.mechlist);
|
||||
|
||||
@@ -3240,15 +3250,22 @@ remoteAuthSASL (virConnectPtr conn, stru
|
||||
return -1;
|
||||
}
|
||||
/* Run the authentication callback */
|
||||
- if ((*(auth->cb))(cred, ncred, auth->cbdata) < 0) {
|
||||
+ if (auth && auth->cb) {
|
||||
+ if ((*(auth->cb))(cred, ncred, auth->cbdata) < 0) {
|
||||
+ __virRaiseError (in_open ? NULL : conn, NULL, NULL, VIR_FROM_REMOTE,
|
||||
+ VIR_ERR_AUTH_FAILED, VIR_ERR_ERROR, NULL, NULL, NULL, 0, 0,
|
||||
+ "Failed to collect auth credentials");
|
||||
+ goto cleanup;
|
||||
+ return -1;
|
||||
+ }
|
||||
+ remoteAuthFillInteract(cred, interact);
|
||||
+ goto restep;
|
||||
+ } else {
|
||||
__virRaiseError (in_open ? NULL : conn, NULL, NULL, VIR_FROM_REMOTE,
|
||||
VIR_ERR_AUTH_FAILED, VIR_ERR_ERROR, NULL, NULL, NULL, 0, 0,
|
||||
- "Failed to collect auth credentials");
|
||||
+ "No authentication callback available");
|
||||
goto cleanup;
|
||||
- return -1;
|
||||
}
|
||||
- remoteAuthFillInteract(cred, interact);
|
||||
- goto restep;
|
||||
}
|
||||
|
||||
if (serverin) {
|
||||
@@ -3319,7 +3336,8 @@ remoteAuthSASL (virConnectPtr conn, stru
|
||||
if (remoteAddr) free(remoteAddr);
|
||||
if (serverin) free(serverin);
|
||||
|
||||
- free(saslcb);
|
||||
+ if (saslcb)
|
||||
+ free(saslcb);
|
||||
remoteAuthFreeCredentials(cred, ncred);
|
||||
if (ret != 0 && saslconn)
|
||||
sasl_dispose(&saslconn);
|
||||
17
libvirt-0.4.0-remote-ssh.patch
Normal file
17
libvirt-0.4.0-remote-ssh.patch
Normal 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*/
|
||||
12
libvirt.spec
12
libvirt.spec
@@ -11,12 +11,14 @@
|
||||
Summary: Library providing a simple API virtualization
|
||||
Name: libvirt
|
||||
Version: 0.4.0
|
||||
Release: 2%{?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
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
URL: http://libvirt.org/
|
||||
BuildRequires: python python-devel
|
||||
@@ -91,6 +93,8 @@ of recent versions of Linux (and other OSes).
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
# Xen is availble only on i386 x86_64 ia64
|
||||
@@ -216,6 +220,12 @@ fi
|
||||
%doc docs/examples/python
|
||||
|
||||
%changelog
|
||||
* Thu Jan 17 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.0-4.fc8
|
||||
- Fix SSH tunnelling (rhbz #428743)
|
||||
|
||||
* Sun Jan 13 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.0-3.fc8
|
||||
- Fix crash when no auth callback
|
||||
|
||||
* Wed Jan 2 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.0-2.fc8
|
||||
- Fix reading large config files (rhbz #426425)
|
||||
- Fix crash when connecting to a PolicyKit enabled server with not auth callback (rhbz #427107)
|
||||
|
||||
Reference in New Issue
Block a user