changeset 4006:0e8f0647504b HEAD

Check that uris and hosts settings are correct.
author Timo Sirainen <tss@iki.fi>
date Sun, 12 Feb 2006 12:03:39 +0200
parents 450ee12c2e26
children 97a328354a13
files src/auth/db-ldap.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/db-ldap.c	Sun Feb 12 11:53:49 2006 +0200
+++ b/src/auth/db-ldap.c	Sun Feb 12 12:03:39 2006 +0200
@@ -426,6 +426,15 @@
 	if (conn->set.base == NULL)
 		i_fatal("LDAP: No base given");
 
+	if (conn->set.uris == NULL && conn->set.hosts == NULL)
+		i_fatal("LDAP: No uris or hosts set");
+#ifndef LDAP_HAVE_INITIALIZE
+	if (conn->set.uris == NULL) {
+		i_fatal("LDAP: Dovecot compiled without support for LDAP uris "
+			"(ldap_initialize not found)");
+	}
+#endif
+
         conn->set.ldap_deref = deref2str(conn->set.deref);
 	conn->set.ldap_scope = scope2str(conn->set.scope);