From 24e6bb85ab57b0abb992dab59e74aa50c5ead674 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Wed, 22 Aug 2007 09:31:38 +0000 Subject: [PATCH] 2007-08-22 [colin] 2.10.0cvs147 * src/ldaputil.c Fix test (set ldap v3 if bindDN is set or TLS is set) --- ChangeLog | 5 +++++ PATCHSETS | 1 + configure.ac | 2 +- src/ldaputil.c | 8 +++++++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c0f235652..09cd74412 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-08-22 [colin] 2.10.0cvs147 + + * src/ldaputil.c + Fix test (set ldap v3 if bindDN is set or TLS is set) + 2007-08-22 [colin] 2.10.0cvs146 * src/editldap.c diff --git a/PATCHSETS b/PATCHSETS index 546ca2931..321536430 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -2801,3 +2801,4 @@ ( cvs diff -u -r 1.105.2.108 -r 1.105.2.109 src/prefs_account.c; ) > 2.10.0cvs144.patchset ( cvs diff -u -r 1.2.4.19 -r 1.2.4.20 src/browseldap.c; cvs diff -u -r 1.8.2.26 -r 1.8.2.27 src/editldap.c; cvs diff -u -r 1.2.2.14 -r 1.2.2.15 src/ldapctrl.c; cvs diff -u -r 1.3.2.22 -r 1.3.2.23 src/ldapquery.c; cvs diff -u -r 1.4.2.13 -r 1.4.2.14 src/ldapserver.c; cvs diff -u -r 1.1.2.13 -r 1.1.2.14 src/ldapupdate.c; cvs diff -u -r 1.1.4.9 -r 1.1.4.10 src/ldaputil.c; ) > 2.10.0cvs145.patchset ( cvs diff -u -r 1.8.2.27 -r 1.8.2.28 src/editldap.c; cvs diff -u -r 1.1.4.10 -r 1.1.4.11 src/ldaputil.c; ) > 2.10.0cvs146.patchset +( cvs diff -u -r 1.1.4.11 -r 1.1.4.12 src/ldaputil.c; ) > 2.10.0cvs147.patchset diff --git a/configure.ac b/configure.ac index d6c55a354..17aca3e3e 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=10 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=146 +EXTRA_VERSION=147 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/ldaputil.c b/src/ldaputil.c index 202ddf10f..2ed824c68 100644 --- a/src/ldaputil.c +++ b/src/ldaputil.c @@ -247,11 +247,17 @@ GList *ldaputil_read_basedn( if( ld == NULL ) { return baseDN; } + + if ((bindDN && *bindDN) #ifdef USE_LDAP_TLS - if (bindDN && *bindDN) { + || (tls && !ssl) +#endif + ) { version = LDAP_VERSION3; rc = ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &version ); } +#ifdef USE_LDAP_TLS + if( tls && !ssl ) { /* Handle TLS */ if( rc != LDAP_OPT_SUCCESS ) { -- 2.25.1