From: Henrik Nordstrom Date: Tue, 25 May 2010 21:19:26 +0000 (+0200) Subject: Change LDAP helpers to default to LDAP version 3 if available X-Git-Tag: SQUID_3_2_0_1~194 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8c33b163e9be58172f54f062cdd6112bfe53d87f;p=thirdparty%2Fsquid.git Change LDAP helpers to default to LDAP version 3 if available World has moved on, and it's now not uncommon to find LDAP servers not accepting the old version 2. --- diff --git a/helpers/basic_auth/LDAP/basic_ldap_auth.8 b/helpers/basic_auth/LDAP/basic_ldap_auth.8 index b9e800f782..9df8ce356a 100644 --- a/helpers/basic_auth/LDAP/basic_ldap_auth.8 +++ b/helpers/basic_auth/LDAP/basic_ldap_auth.8 @@ -212,7 +212,7 @@ server specificiation by using servername:port syntax. . .if !'po4a'hide' .TP .if !'po4a'hide' .B "\-v 2|3" -LDAP protocol version. Defaults to 2 if not specified. +LDAP protocol version. Defaults to 3 if not specified. . .if !'po4a'hide' .TP .if !'po4a'hide' .BI \-Z diff --git a/helpers/basic_auth/LDAP/basic_ldap_auth.cc b/helpers/basic_auth/LDAP/basic_ldap_auth.cc index c150d2fe02..1e78bc324e 100644 --- a/helpers/basic_auth/LDAP/basic_ldap_auth.cc +++ b/helpers/basic_auth/LDAP/basic_ldap_auth.cc @@ -288,7 +288,7 @@ open_ldap_connection(const char *ldapServer, int port) #ifdef LDAP_VERSION3 if (version == -1) { - version = LDAP_VERSION2; + version = LDAP_VERSION3; } if (ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &version) != LDAP_SUCCESS) { fprintf(stderr, "Could not set LDAP_OPT_PROTOCOL_VERSION %d\n", diff --git a/helpers/external_acl/ldap_group/squid_ldap_group.8 b/helpers/external_acl/ldap_group/squid_ldap_group.8 index f94d81a2ec..bd5d7d06e3 100644 --- a/helpers/external_acl/ldap_group/squid_ldap_group.8 +++ b/helpers/external_acl/ldap_group/squid_ldap_group.8 @@ -200,7 +200,7 @@ are supported. . .if !'po4a'hide' .TP .if !'po4a'hide' .BI \-v " 2|3" -LDAP protocol version. Defaults to 2 if not specified. +LDAP protocol version. Defaults to 3 if not specified. . .if !'po4a'hide' .TP .if !'po4a'hide' .BI \-Z diff --git a/helpers/external_acl/ldap_group/squid_ldap_group.c b/helpers/external_acl/ldap_group/squid_ldap_group.c index 5336997024..d4dbf6df15 100644 --- a/helpers/external_acl/ldap_group/squid_ldap_group.c +++ b/helpers/external_acl/ldap_group/squid_ldap_group.c @@ -535,7 +535,7 @@ recover: #ifdef LDAP_VERSION3 if (version == -1) { - version = LDAP_VERSION2; + version = LDAP_VERSION3; } if (ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &version) != LDAP_SUCCESS) { fprintf(stderr, "Could not set LDAP_OPT_PROTOCOL_VERSION %d\n",