From 66c0cfca357580e0d37a3bf531d2d6c782b661ec Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Wed, 26 May 2010 15:53:10 +1200 Subject: [PATCH] Author: Henrik Nordstrom 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. --- helpers/basic_auth/LDAP/squid_ldap_auth.8 | 2 +- helpers/basic_auth/LDAP/squid_ldap_auth.c | 2 +- helpers/external_acl/ldap_group/squid_ldap_group.8 | 2 +- helpers/external_acl/ldap_group/squid_ldap_group.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/helpers/basic_auth/LDAP/squid_ldap_auth.8 b/helpers/basic_auth/LDAP/squid_ldap_auth.8 index 561e4be680..899aa1ebe5 100644 --- a/helpers/basic_auth/LDAP/squid_ldap_auth.8 +++ b/helpers/basic_auth/LDAP/squid_ldap_auth.8 @@ -146,7 +146,7 @@ server specificiation by using servername:port syntax. . .TP .BI -v " 2|3" -LDAP protocol version. Defaults to 2 if not specified. +LDAP protocol version. Defaults to 3 if not specified. . .TP .BI -Z diff --git a/helpers/basic_auth/LDAP/squid_ldap_auth.c b/helpers/basic_auth/LDAP/squid_ldap_auth.c index b8db90e83b..2a5da1841b 100644 --- a/helpers/basic_auth/LDAP/squid_ldap_auth.c +++ b/helpers/basic_auth/LDAP/squid_ldap_auth.c @@ -286,7 +286,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 a15fc8cc4d..a5ccfd82e3 100644 --- a/helpers/external_acl/ldap_group/squid_ldap_group.8 +++ b/helpers/external_acl/ldap_group/squid_ldap_group.8 @@ -129,7 +129,7 @@ other than the default LDAP port 389. . .TP .BI -v " 2|3" -LDAP protocol version. Defaults to 2 if not specified. +LDAP protocol version. Defaults to 3 if not specified. . .TP .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 d4f22816a5..cb5686fa0f 100644 --- a/helpers/external_acl/ldap_group/squid_ldap_group.c +++ b/helpers/external_acl/ldap_group/squid_ldap_group.c @@ -534,7 +534,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", -- 2.47.3