Преглед изворни кода

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.

Noriko Hosoi пре 16 година
родитељ
комит
1e3138f1d4
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      ldap/servers/slapd/back-ldbm/ldbm_search.c

+ 3 - 0
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;
           }
         }
     }