Mercurial > dovecot > original-hg > dovecot-1.2
changeset 1282:e8894f2c776f HEAD
Added ldap_version setting.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 06 Mar 2003 23:45:16 +0200 |
parents | 043b71a06568 |
children | 2d8af547a8b4 |
files | src/auth/db-ldap.c src/auth/db-ldap.h |
diffstat | 2 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/db-ldap.c Thu Mar 06 23:44:31 2003 +0200 +++ b/src/auth/db-ldap.c Thu Mar 06 23:45:16 2003 +0200 @@ -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, @@ -186,6 +188,13 @@ 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)); + } } /* NOTE: we use blocking connect, we couldn't do anything anyway