From: Graham Leggett Date: Sat, 14 Sep 2013 15:07:43 +0000 (+0000) Subject: mod_ldap: retry on an LDAP timeout during authn. X-Git-Tag: 2.4.7~226 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=585d62309b746e5ccc5e75e589ded79144983df5;p=apache mod_ldap: retry on an LDAP timeout during authn. trunk patch: http://svn.apache.org/r1510084 Submitted by: covener Reviewed by: jim, humbedooh git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1523264 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 3ab1a36156..33b4e49fdd 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,8 @@ Changes with Apache 2.4.7 + *) mod_ldap: retry on an LDAP timeout during authn. [Eric Covener] + *) mod_ldap: Change "LDAPReferrals off" to actually set the underlying LDAP SDK option to OFF, and introduce "LDAPReferrals default" to take the SDK default, sans rebind authentication callback. diff --git a/STATUS b/STATUS index ae86d7d18f..90e3458089 100644 --- a/STATUS +++ b/STATUS @@ -133,12 +133,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: +1: covener, jim, humbedooh - * mod_ldap: retry on an LDAP timeout during authn. - trunk patch: http://svn.apache.org/r1510084 - 2.4.x patch: trunk works - +1: covener, jim, humbedooh - - * mod_ldap: add TRACE5 for LDAP retries trunk patch: http://svn.apache.org/r1510085 2.4.x patch: trunk works diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index 93a520cd89..307b926d91 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -1697,6 +1697,14 @@ start_over: goto start_over; } + if (result == LDAP_TIMEOUT) { + ldc->reason = "ldap_search_ext_s() for user failed with timeout"; + uldap_connection_unbind(ldc); + failures++; + goto start_over; + } + + /* if there is an error (including LDAP_NO_SUCH_OBJECT) return now */ if (result != LDAP_SUCCESS) { ldc->reason = "ldap_search_ext_s() for user failed";