httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1687980 - in /httpd/httpd/trunk: CHANGES modules/ldap/util_ldap.c
Date Sun, 28 Jun 2015 00:56:10 GMT
Author: covener
Date: Sun Jun 28 00:56:09 2015
New Revision: 1687980

URL: http://svn.apache.org/r1687980
Log:
*) mod_ldap: In some case, LDAP_NO_SUCH_ATTRIBUTE could be returned instead of
   an error during a compare operation. [Eric Covener]

+ accompanying trace.

Note: the if/else now matches (don't replace unknown compare errors with 
LDAP_NO_SUCH_ATTRIBUTE) the logic just above when pulling comparisons
out of the cache.


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/ldap/util_ldap.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1687980&r1=1687979&r2=1687980&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sun Jun 28 00:56:09 2015
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_ldap: In some case, LDAP_NO_SUCH_ATTRIBUTE could be returned instead of
+     an error during a compare operation. [Eric Covener]
+
   *) mod_alias: Limit Redirect expressions to directory (Location) context
      and redirect statuses (implicit or explicit).
      [Yann Ylavic, Ruediger Pluem]

Modified: httpd/httpd/trunk/modules/ldap/util_ldap.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ldap/util_ldap.c?rev=1687980&r1=1687979&r2=1687980&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ldap/util_ldap.c (original)
+++ httpd/httpd/trunk/modules/ldap/util_ldap.c Sun Jun 28 00:56:09 2015
@@ -1104,6 +1104,8 @@ static int uldap_cache_compare(request_r
                 result = compare_nodep->result;
                 /* and unlock this read lock */
                 LDAP_CACHE_UNLOCK();
+
+                ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "ldap_compare_s(%pp, %s, %s,
%s) = %s (cached)", ldc->ldap, dn, attrib, value, ldap_err2string(result));
                 return result;
             }
         }
@@ -1187,19 +1189,22 @@ start_over:
             }
             LDAP_CACHE_UNLOCK();
         }
+
         if (LDAP_COMPARE_TRUE == result) {
             ldc->reason = "Comparison true (adding to cache)";
-            return LDAP_COMPARE_TRUE;
         }
         else if (LDAP_COMPARE_FALSE == result) {
             ldc->reason = "Comparison false (adding to cache)";
-            return LDAP_COMPARE_FALSE;
         }
-        else {
+        else if (LDAP_NO_SUCH_ATTRIBUTE == result) {
             ldc->reason = "Comparison no such attribute (adding to cache)";
-            return LDAP_NO_SUCH_ATTRIBUTE;
+        }
+        else {
+            ldc->reason = "Comparison undefined (adding to cache)";
         }
     }
+
+    ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "ldap_compare_s(%pp, %s, %s, %s) = %s",
ldc->ldap, dn, attrib, value, ldap_err2string(result));
     return result;
 }
 



Mime
View raw message