From 1fbf46701893fe9e6756838b7b288318caa8b3fd Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Thu, 23 Jan 2003 21:15:33 +0000 Subject: fix for bug 34883 broke ssl transactions (at least those where we were 2003-01-23 Chris Toshok * backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): fix for bug 34883 broke ssl transactions (at least those where we were connecting to port 636). Move it to after the SSL stanza. svn path=/trunk/; revision=19598 --- addressbook/backend/pas/pas-backend-ldap.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'addressbook/backend/pas/pas-backend-ldap.c') diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c index 09a6d258de..93bbd6cbd4 100644 --- a/addressbook/backend/pas/pas-backend-ldap.c +++ b/addressbook/backend/pas/pas-backend-ldap.c @@ -691,6 +691,17 @@ pas_backend_ldap_connect (PASBackendLDAP *bl) } } + /* bind anonymously initially, we'll actually + authenticate the user properly later (in + authenticate_user) if they've selected + authentication */ + ldap_error = ldap_simple_bind_s (blpriv->ldap, NULL, NULL); + if (ldap_error == LDAP_SERVER_DOWN) { + /* we only want this to be fatal if the server is down. */ + g_warning ("failed to bind anonymously while connecting (ldap_error 0x%02x)", ldap_error); + return GNOME_Evolution_Addressbook_BookListener_RepositoryOffline; + } + ldap_error = query_ldap_root_dse (bl); /* query_ldap_root_dse will cause the actual connect(), so any tcpip problems will show up -- cgit v1.2.3