[dovecot-cvs] dovecot/src/auth db-ldap.c,1.13,1.14 db-ldap.h,1.9,1.10

cras at procontrol.fi cras at procontrol.fi
Thu Mar 6 23:45:18 EET 2003


Update of /home/cvs/dovecot/src/auth
In directory danu:/tmp/cvs-serv14439/auth

Modified Files:
	db-ldap.c db-ldap.h 
Log Message:
Added ldap_version setting.



Index: db-ldap.c
===================================================================
RCS file: /home/cvs/dovecot/src/auth/db-ldap.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- db-ldap.c	1 Mar 2003 15:25:03 -0000	1.13
+++ db-ldap.c	6 Mar 2003 21:45:16 -0000	1.14
@@ -30,6 +30,7 @@
 	DEF(SET_STR, deref),
 	DEF(SET_STR, scope),
 	DEF(SET_STR, base),
+	DEF(SET_INT, ldap_version),
 	DEF(SET_STR, user_attrs),
 	DEF(SET_STR, user_filter),
 	DEF(SET_STR, pass_attrs),
@@ -46,6 +47,7 @@
 	MEMBER(deref) "never",
 	MEMBER(scope) "subtree",
 	MEMBER(base) NULL,
+	MEMBER(ldap_version) 2,
 	MEMBER(user_attrs) NULL,
 	MEMBER(user_filter) NULL,
 	MEMBER(pass_attrs) NULL,
@@ -185,6 +187,13 @@
 		if (ret != LDAP_SUCCESS) {
 			i_fatal("LDAP: Can't set deref option: %s",
 				ldap_err2string(ret));
+		}
+
+		ret = ldap_set_option(conn->ld, LDAP_OPT_PROTOCOL_VERSION,
+				      (void *) &conn->set.ldap_version);
+		if (ret != LDAP_OPT_SUCCESS) {
+			i_fatal("LDAP: Can't set protocol version %u: %s",
+				conn->set.ldap_version, ldap_err2string(ret));
 		}
 	}
 

Index: db-ldap.h
===================================================================
RCS file: /home/cvs/dovecot/src/auth/db-ldap.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- db-ldap.h	19 Feb 2003 23:55:40 -0000	1.9
+++ db-ldap.h	6 Mar 2003 21:45:16 -0000	1.10
@@ -17,6 +17,8 @@
 	const char *deref;
 	const char *scope;
 	const char *base;
+	unsigned int ldap_version;
+
 	const char *user_attrs;
 	const char *user_filter;
 	const char *pass_attrs;




More information about the dovecot-cvs mailing list