summaryrefslogtreecommitdiff
path: root/modules/ldap
diff options
context:
space:
mode:
authorEric Covener <covener@apache.org>2015-06-28 00:56:09 +0000
committerEric Covener <covener@apache.org>2015-06-28 00:56:09 +0000
commit393b02c535c397e93f430d32384f23e93144e20e (patch)
tree3c72262625ca676eaf3227c1650ce8ccbc941e1b /modules/ldap
parent3efa9ca0027ddd5526baa38e4ac2abb378830d48 (diff)
downloadhttpd-393b02c535c397e93f430d32384f23e93144e20e.tar.gz
*) 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1687980 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/ldap')
-rw-r--r--modules/ldap/util_ldap.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c
index f5a6d85b08..ad50ea87a6 100644
--- a/modules/ldap/util_ldap.c
+++ b/modules/ldap/util_ldap.c
@@ -1104,6 +1104,8 @@ static int uldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
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;
}