diff options
Diffstat (limited to 'addressbook/backend/pas/pas-backend-ldap.c')
-rw-r--r-- | addressbook/backend/pas/pas-backend-ldap.c | 11 |
1 files changed, 11 insertions, 0 deletions
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 |