[evolution-ews/f17] Add patch to Red Hat bug #821228 (auth issue with book backend)

Milan Crha mcrha at fedoraproject.org
Mon Jun 4 16:31:33 UTC 2012


commit 3b60c50edcd37ac6a57238bb5783d5c352885db6
Author: Milan Crha <mcrha at redhat.com>
Date:   Mon Jun 4 18:31:21 2012 +0200

    Add patch to Red Hat bug #821228 (auth issue with book backend)

 evolution-ews-3.4.2-auth.patch |   46 ++++++++++++++++++++++++++++++++++++++++
 evolution-ews.spec             |    9 +++++--
 2 files changed, 52 insertions(+), 3 deletions(-)
---
diff --git a/evolution-ews-3.4.2-auth.patch b/evolution-ews-3.4.2-auth.patch
new file mode 100644
index 0000000..7ed1833
--- /dev/null
+++ b/evolution-ews-3.4.2-auth.patch
@@ -0,0 +1,46 @@
+diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
+index b1b1496..1c9493d 100644
+--- a/src/addressbook/e-book-backend-ews.c
++++ b/src/addressbook/e-book-backend-ews.c
+@@ -2640,6 +2641,12 @@ e_book_backend_ews_authenticate_user (EBookBackend *backend,
+ 		return;
+ 	}
+ 
++	if (!credentials || !e_credentials_peek (credentials, E_CREDENTIALS_KEY_USERNAME)) {
++		e_book_backend_notify_opened (backend, EDB_ERROR (AUTHENTICATION_REQUIRED));
++		e_book_backend_notify_readonly (backend, TRUE);
++		return;
++	}
++
+ 	esource = e_backend_get_source (E_BACKEND (backend));
+ 	host_url = e_source_get_property (esource, "hosturl");
+ 	read_only = e_source_get_property (esource, "read_only");
+diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
+index a701ae0..f50b18d 100644
+--- a/src/calendar/e-cal-backend-ews.c
++++ b/src/calendar/e-cal-backend-ews.c
+@@ -686,7 +686,7 @@ e_cal_backend_ews_authenticate_user (ECalBackend *backend,
+ 
+ 	if (!credentials || !e_credentials_has_key (credentials, E_CREDENTIALS_KEY_USERNAME)) {
+ 		PRIV_UNLOCK (priv);
+-		g_propagate_error (&error, EDC_ERROR (AuthenticationFailed));
++		g_propagate_error (&error, EDC_ERROR (AuthenticationRequired));
+ 		e_cal_backend_notify_opened (backend, error);
+ 		return;
+ 	}
+diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
+index 6526b68..fdb3fc7 100644
+--- a/src/server/e-ews-connection.c
++++ b/src/server/e-ews-connection.c
+@@ -1210,6 +1210,11 @@ e_ews_connection_new (const gchar *uri,
+ 
+ 	g_static_mutex_lock (&connecting);
+ 
++	if (!username) {
++		g_static_mutex_unlock (&connecting);
++		return NULL;
++	}
++
+ 	/* search the connection in our hash table */
+ 	if (loaded_connections_permissions != NULL) {
+ 		hash_key = g_strdup_printf ("%s@%s",
diff --git a/evolution-ews.spec b/evolution-ews.spec
index 621fc85..12aed2e 100644
--- a/evolution-ews.spec
+++ b/evolution-ews.spec
@@ -2,7 +2,7 @@
 
 Name: evolution-ews
 Version: 3.4.2
-Release: 1%{?dist}
+Release: 2%{?dist}
 Group: Applications/Productivity
 Summary: Evolution extension for Exchange Web Services
 License: LGPLv2
@@ -13,7 +13,7 @@ BuildRequires: evolution-devel >= %{version}
 BuildRequires: evolution-data-server-devel >= %{version}
 BuildRequires: intltool
 
-# Patch1: evolution-ews-3.3.1-enable-deprecated-glib-symbols.patch
+Patch1: evolution-ews-3.4.2-auth.patch
 
 %description
 This package allows Evolution to interact with Microsoft Exchange servers,
@@ -21,7 +21,7 @@ versions 2007 and later, through its Exchange Web Services (EWS) interface.
 
 %prep
 %setup -q
-# %patch1 -p1 -b .enable-deprecated-glib-symbols
+%patch1 -p1 -b .auth
 
 %build
 %configure
@@ -64,6 +64,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/*.pc
 %{_libdir}/liblzx.so.*
 
 %changelog
+* Mon Jun 04 2012 Milan Crha <mcrha at redhat.com> - 3.4.2-2
+- Add patch to Red Hat bug #821228 (auth issue with book backend)
+
 * Mon May 14 2012 Milan Crha <mcrha at redhat.com> - 3.4.2-1
 - Update to 3.4.2
 


More information about the scm-commits mailing list