Sfoglia il codice sorgente

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 anni fa
parent
commit
1e3138f1d4
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  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;
           }
         }
     }