dovecot-1.1: If binding fails with protocol error and ldap_versi...

dovecot at dovecot.org dovecot at dovecot.org
Tue Feb 3 01:57:05 EET 2009


details:   http://hg.dovecot.org/dovecot-1.1/rev/b87b7a0b0f68
changeset: 8144:b87b7a0b0f68
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Feb 02 18:57:00 2009 -0500
description:
If binding fails with protocol error and ldap_version < 3, suggest setting it to 3.

diffstat:

1 file changed, 7 insertions(+)
src/auth/db-ldap.c |    7 +++++++

diffs (17 lines):

diff -r 08f66fd9500b -r b87b7a0b0f68 src/auth/db-ldap.c
--- a/src/auth/db-ldap.c	Mon Feb 02 14:57:11 2009 -0500
+++ b/src/auth/db-ldap.c	Mon Feb 02 18:57:00 2009 -0500
@@ -414,6 +414,13 @@ static int db_ldap_connect_finish(struct
 			conn->set.uris : conn->set.hosts);
 		return -1;
 	}
+	if (ret == LDAP_PROTOCOL_ERROR && conn->set.ldap_version < 3) {
+		i_error("LDAP: binding failed (dn %s): %s "
+			"(setting ldap_version=3 may help)",
+			conn->set.dn == NULL ? "(none)" : conn->set.dn,
+			ldap_get_error(conn));
+		return -1;
+	}
 	if (ret != LDAP_SUCCESS) {
 		i_error("LDAP: binding failed (dn %s): %s",
 			conn->set.dn == NULL ? "(none)" : conn->set.dn,


More information about the dovecot-cvs mailing list