rpms/libvirt/F-8 libvirt-0.4.0-auth-null-cb.patch, NONE, 1.1 libvirt-0.4.0-conffile-size.patch, NONE, 1.1 libvirt.spec, 1.68, 1.69

Daniel P. Berrange (berrange) fedora-extras-commits at redhat.com
Wed Jan 2 21:47:43 UTC 2008


Author: berrange

Update of /cvs/pkgs/rpms/libvirt/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29330

Modified Files:
	libvirt.spec 
Added Files:
	libvirt-0.4.0-auth-null-cb.patch 
	libvirt-0.4.0-conffile-size.patch 
Log Message:
Fixed auth callback crash and config file reading

libvirt-0.4.0-auth-null-cb.patch:

--- NEW FILE libvirt-0.4.0-auth-null-cb.patch ---
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	2007-12-17 16:51:09.000000000 -0500
+++ libvirt-0.4.0.new/src/remote_internal.c	2008-01-02 16:28:44.000000000 -0500
@@ -3347,24 +3347,26 @@ remoteAuthPolkit (virConnectPtr conn, st
     };
     remoteDebug(priv, "Client initialize PolicyKit authentication");
 
-    for (i = 0 ; i < auth->ncredtype ; i++) {
-        if (auth->credtype[i] == VIR_CRED_EXTERNAL)
-            allowcb = 1;
-    }
+    if (auth && auth->cb) {
+        /* Check if the neccessary credential type for PolicyKit is supported */
+        for (i = 0 ; i < auth->ncredtype ; i++) {
+            if (auth->credtype[i] == VIR_CRED_EXTERNAL)
+                allowcb = 1;
+        }
 
-    /* Run the authentication callback */
-    if (allowcb) {
-        if (auth && auth->cb &&
-            (*(auth->cb))(&cred, 1, 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");
-            return -1;
+        if (allowcb) {
+            /* Run the authentication callback */
+            if ((*(auth->cb))(&cred, 1, 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");
+                return -1;
+            }
         } else {
-            remoteDebug(priv, "No auth callback provided for PolicyKit");
+            remoteDebug(priv, "Client auth callback does not support PolicyKit");
         }
     } else {
-        remoteDebug(priv, "Client auth callback does not support PolicyKit");
+        remoteDebug(priv, "No auth callback provided");
     }
 
     memset (&ret, 0, sizeof ret);

libvirt-0.4.0-conffile-size.patch:

--- NEW FILE libvirt-0.4.0-conffile-size.patch ---
diff -rup libvirt-0.4.0.orig/src/conf.c libvirt-0.4.0.new/src/conf.c
--- libvirt-0.4.0.orig/src/conf.c	2007-12-12 08:30:49.000000000 -0500
+++ libvirt-0.4.0.new/src/conf.c	2008-01-02 16:30:12.000000000 -0500
@@ -705,7 +705,7 @@ error:
 virConfPtr
 __virConfReadFile(const char *filename)
 {
-    char content[4096];
+    char content[8192];
     int fd;
     int len;
 


Index: libvirt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libvirt/F-8/libvirt.spec,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- libvirt.spec	18 Dec 2007 11:02:18 -0000	1.68
+++ libvirt.spec	2 Jan 2008 21:47:05 -0000	1.69
@@ -11,10 +11,12 @@
 Summary: Library providing a simple API virtualization
 Name: libvirt
 Version: 0.4.0
-Release: 1%{?dist}%{?extra_release}
+Release: 2%{?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
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 URL: http://libvirt.org/
 BuildRequires: python python-devel
@@ -87,6 +89,8 @@
 
 %prep
 %setup -q
+%patch1 -p1
+%patch2 -p1
 
 %build
 # Xen is availble only on i386 x86_64 ia64
@@ -212,6 +216,10 @@
 %doc docs/examples/python
 
 %changelog
+* Wed Jan  2 2008 Daniel P. Berrange <berrange at 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)
+
 * Tue Dec 18 2007 Daniel Veillard <veillard at redhat.com> - 0.4.0-1.fc8
 - Release of 0.4.0
 - SASL based authentication




More information about the fedora-extras-commits mailing list