dovecot-1.0: If tls=yes is used, use ldap_version=3 automatically.

dovecot at dovecot.org dovecot at dovecot.org
Wed Mar 5 00:56:32 EET 2008


details:   http://hg.dovecot.org/dovecot-1.0/rev/50be791dc276
changeset: 5529:50be791dc276
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Mar 05 00:56:28 2008 +0200
description:
If tls=yes is used, use ldap_version=3 automatically.

diffstat:

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

diffs (16 lines):

diff -r a9ac53bc191b -r 50be791dc276 src/auth/db-ldap.c
--- a/src/auth/db-ldap.c	Wed Mar 05 00:37:12 2008 +0200
+++ b/src/auth/db-ldap.c	Wed Mar 05 00:56:28 2008 +0200
@@ -556,9 +556,9 @@ int db_ldap_connect(struct ldap_connecti
 				ldap_err2string(ret));
 		}
 
-		/* If SASL binds are used, the protocol version needs to be
-		   at least 3 */
-		ldap_version = conn->set.sasl_bind &&
+		/* If SASL binds or TLS is used, the protocol version needs
+		   to be at least 3 */
+		ldap_version = (conn->set.sasl_bind || conn->set.tls) &&
 			conn->set.ldap_version < 3 ? 3 :
 			conn->set.ldap_version;
 		ret = ldap_set_option(conn->ld, LDAP_OPT_PROTOCOL_VERSION,


More information about the dovecot-cvs mailing list