]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
tweak the referral/hoplimit ldap option logic to save the failure reason in the util_...
authorJeff Trawick <trawick@apache.org>
Fri, 16 Jan 2009 17:57:52 +0000 (17:57 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 16 Jan 2009 17:57:52 +0000 (17:57 +0000)
old error log message:
  auth_ldap authenticate: user wbush authentication failed; URI /ldap-status [(null)][Can't contact LDAP server]
new error log message:
  auth_ldap authenticate: user wbush authentication failed; URI /ldap-status [Unable to set LDAP_OPT_REFHOPLIMIT.][Can't contact LDAP server]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@735068 13f79535-47bb-0310-9956-ffa450edef68

modules/ldap/util_ldap.c

index 062bcfbe54e7df6a510b44c2e604cb25229ce98e..736d7acd5b2322a2bd54c81b140c7140a363213f 100644 (file)
@@ -371,6 +371,7 @@ static int uldap_connection_init(request_rec *r,
                      ((ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) ? "On" : "Off"),
                      result->rc);
         result->reason = "Unable to set LDAP_OPT_REFERRALS.";
+        ldc->reason = result->reason;
         uldap_connection_unbind(ldc);
         return(result->rc);
     }
@@ -390,6 +391,7 @@ static int uldap_connection_init(request_rec *r,
                        ldc->ReferralHopLimit,
                        result->rc);
           result->reason = "Unable to set LDAP_OPT_REFHOPLIMIT.";
+          ldc->reason = result->reason;
           uldap_connection_unbind(ldc);
           return(result->rc);
         }