evolution-data-server r8596 - in trunk/servers/exchange: . lib



Author: mbarnes
Date: Thu Mar 27 17:35:04 2008
New Revision: 8596
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8596&view=rev

Log:
2008-03-27  Matthew Barnes  <mbarnes redhat com>

	** Fixes bug #500389

	* servers/exchange/lib/e2k-global-catalog.c (connect_ldap):
	Fall back to simple binds if the global catalog server
	does not support NTLM binds.



Modified:
   trunk/servers/exchange/ChangeLog
   trunk/servers/exchange/lib/e2k-global-catalog.c

Modified: trunk/servers/exchange/lib/e2k-global-catalog.c
==============================================================================
--- trunk/servers/exchange/lib/e2k-global-catalog.c	(original)
+++ trunk/servers/exchange/lib/e2k-global-catalog.c	Thu Mar 27 17:35:04 2008
@@ -307,17 +307,19 @@
 connect_ldap (E2kGlobalCatalog *gc, E2kOperation *op, LDAP *ldap)
 {
 	int ldap_error;
-#ifndef HAVE_LDAP_NTLM_BIND
 	char *nt_name;
 #ifdef G_OS_WIN32
 	SEC_WINNT_AUTH_IDENTITY_W auth;
 #endif
-#endif
 
 	/* authenticate */
 #ifdef HAVE_LDAP_NTLM_BIND
-	ldap_error = ntlm_bind (gc, op, ldap);
-#else
+	if (ntlm_bind (gc, op, ldap) == LDAP_SUCCESS) {
+		E2K_GC_DEBUG_MSG(("GC: connected via NTLM\n\n"));
+		return LDAP_SUCCESS;
+	}
+#endif
+
 	nt_name = gc->priv->nt_domain ?
 		g_strdup_printf ("%s\\%s", gc->priv->nt_domain, gc->priv->user) :
 		g_strdup (gc->priv->user);
@@ -339,7 +341,7 @@
 	g_free (auth.User);
 #endif
 	g_free (nt_name);
-#endif
+
 	if (ldap_error != LDAP_SUCCESS)
 		g_warning ("LDAP authentication failed (0x%02x)", ldap_error);
 	else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]