dovecot-2.2: auth ldap: Moved more LDAP fatal checks to db_ldap_...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Mar 16 20:56:37 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/226d34f3a54a
changeset: 18356:226d34f3a54a
user: Timo Sirainen <tss at iki.fi>
date: Mon Mar 16 22:55:47 2015 +0200
description:
auth ldap: Moved more LDAP fatal checks to db_ldap_init()
diffstat:
src/auth/db-ldap.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diffs (30 lines):
diff -r 8c77d80e014c -r 226d34f3a54a src/auth/db-ldap.c
--- a/src/auth/db-ldap.c Mon Mar 16 22:48:39 2015 +0200
+++ b/src/auth/db-ldap.c Mon Mar 16 22:55:47 2015 +0200
@@ -1106,13 +1106,6 @@
}
#endif
- if (conn->set.ldap_version < 3) {
- if (conn->set.sasl_bind)
- i_fatal("LDAP: sasl_bind=yes requires ldap_version=3");
- if (conn->set.tls)
- i_fatal("LDAP: tls=yes requires ldap_version=3");
- }
-
ldap_version = conn->set.ldap_version;
db_ldap_set_opt(conn, LDAP_OPT_PROTOCOL_VERSION, &ldap_version,
"protocol_version", dec2str(ldap_version));
@@ -1797,6 +1790,12 @@
if (conn->set.sasl_bind)
i_fatal("LDAP: sasl_bind=yes but no SASL support compiled in");
#endif
+ if (conn->set.ldap_version < 3) {
+ if (conn->set.sasl_bind)
+ i_fatal("LDAP %s: sasl_bind=yes requires ldap_version=3", config_path);
+ if (conn->set.tls)
+ i_fatal("LDAP %s: tls=yes requires ldap_version=3", config_path);
+ }
if (*conn->set.ldaprc_path != '\0') {
str = getenv("LDAPRC");
More information about the dovecot-cvs
mailing list