[dovecot-cvs] dovecot/src/auth db-ldap.c,1.39,1.40

cras at dovecot.org cras at dovecot.org
Sun Feb 12 12:03:41 EET 2006


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv3734/src/auth

Modified Files:
	db-ldap.c 
Log Message:
Check that uris and hosts settings are correct.



Index: db-ldap.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/db-ldap.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- db-ldap.c	19 Jan 2006 19:28:59 -0000	1.39
+++ db-ldap.c	12 Feb 2006 10:03:39 -0000	1.40
@@ -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);
 



More information about the dovecot-cvs mailing list