[evolution-patches] Addressbook - Fix for #312988
- From: Sushma Rai <rsushma novell com>
- To: Evolution Patches List <evolution-patches lists ximian com>
- Subject: [evolution-patches] Addressbook - Fix for #312988
- Date: Wed, 10 Aug 2005 14:12:02 +0530
Due to some misconfiguration of the server, getting the
DN for the user is failing. Also handling the condition
where search for namingContext returning empty string.
Please review.
-Sushma.
Index: evolution-data-server/addressbook/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/ChangeLog,v
retrieving revision 1.302
diff -u -p -r1.302 ChangeLog
--- evolution-data-server/addressbook/ChangeLog 5 Aug 2005 11:23:47 -0000 1.302
+++ evolution-data-server/addressbook/ChangeLog 10 Aug 2005 08:37:44 -0000
@@ -1,3 +1,10 @@
+2005-08-10 Sushma Rai <rsushma novell com>
+
+ * backends/ldap/e-book-backend-ldap.c
+ (e_book_backend_ldap_authenticate_user): Return error if we fail to
+ get the DN for the user.
+ Fixes #312988.
+
2005-08-05 Sushma Rai <rsushma novell com>
* backends/ldap/e-book-backend-ldap.c (ldap_error_to_response):
Index: evolution-data-server/addressbook/backends/ldap/e-book-backend-ldap.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/backends/ldap/e-book-backend-ldap.c,v
retrieving revision 1.46
diff -u -p -r1.46 e-book-backend-ldap.c
--- evolution-data-server/addressbook/backends/ldap/e-book-backend-ldap.c 5 Aug 2005 11:23:47 -0000 1.46
+++ evolution-data-server/addressbook/backends/ldap/e-book-backend-ldap.c 10 Aug 2005 08:38:18 -0000
@@ -3651,7 +3651,7 @@ e_book_backend_ldap_authenticate_user (E
}
if (!strncasecmp (auth_method, LDAP_SIMPLE_PREFIX, strlen (LDAP_SIMPLE_PREFIX))) {
-
+
if (!strcmp (auth_method, "ldap/simple-email")) {
LDAPMessage *res, *e;
char *query = g_strdup_printf ("(mail=%s)", user);
@@ -3667,6 +3667,14 @@ e_book_backend_ldap_authenticate_user (E
char *entry_dn;
e = ldap_first_entry (bl->priv->ldap, res);
+ if (!e) {
+ g_warning ("Failed to get the DN for %s", user);
+ ldap_msgfree (res);
+ e_data_book_respond_authenticate_user (book,
+ opid,
+ GNOME_Evolution_Addressbook_AuthenticationFailed);
+ return;
+ }
entry_dn = ldap_get_dn (bl->priv->ldap, e);
dn = g_strdup(entry_dn);
Index: evolution/addressbook/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1975
diff -u -p -r1.1975 ChangeLog
--- evolution/addressbook/ChangeLog 9 Aug 2005 22:40:59 -0000 1.1975
+++ evolution/addressbook/ChangeLog 10 Aug 2005 08:38:49 -0000
@@ -1,3 +1,8 @@
+2005-03-05 Sushma Rai <rsushma novell com>
+
+ * gui/component/addressbook-config.c (do_ldap_root_dse_query): Checking
+ for naming context value.
+
2005-08-10 Tor Lillqvist <tml novell com>
* importers/Makefile.am: Use privsolib instead of privlib (no
Index: evolution/addressbook/gui/component/addressbook-config.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/addressbook-config.c,v
retrieving revision 1.102
diff -u -p -r1.102 addressbook-config.c
--- evolution/addressbook/gui/component/addressbook-config.c 26 Jul 2005 16:30:52 -0000 1.102
+++ evolution/addressbook/gui/component/addressbook-config.c 10 Aug 2005 08:39:12 -0000
@@ -347,7 +347,7 @@ do_ldap_root_dse_query (AddressbookSourc
goto fail;
values = ldap_get_values (ldap, resp, "namingContexts");
- if (!values || values[0] == NULL) {
+ if (!values || values[0] == NULL || strlen (values[0]) == 0) {
e_error_run (GTK_WINDOW (sdialog->window), "addressbook:ldap-search-base", NULL);
goto fail;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]