summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2009-07-21 10:23:16 -0700
committerNoriko Hosoi <nhosoi@redhat.com>2009-07-21 10:23:16 -0700
commit1e3138f1d41562d6f42a8fdf0934af23219bb8e1 (patch)
treead952bf1016ef32a1a78c02b36e13953a4dc29eb
parent77c8f3ecc2900551d77ddb754688aeb176c9da60 (diff)
downloadds-1e3138f1d41562d6f42a8fdf0934af23219bb8e1.tar.gz
ds-1e3138f1d41562d6f42a8fdf0934af23219bb8e1.tar.xz
ds-1e3138f1d41562d6f42a8fdf0934af23219bb8e1.zip
513019 nsslapd-lookthroughlimit is not respected
When filter test is necessary against the search results and the test fails, lookthroughcount attached to the search result structure should have been decremented since the entry will not be sent to the client, but it was not. This change fixes it.
-rw-r--r--ldap/servers/slapd/back-ldbm/ldbm_search.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_search.c b/ldap/servers/slapd/back-ldbm/ldbm_search.c
index 37a29ce7..8324d94f 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_search.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_search.c
@@ -1381,6 +1381,9 @@ ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension )
rc = SLAPI_FAIL_GENERAL;
goto bail;
}
+ /* Since the filter test failed, the result won't be sent.
+ * sr_lookthroughcount should be decremented. */
+ --sr->sr_lookthroughcount;
}
}
}