Bug 513172 - No error messages returned if the returned page size is greater than the nsslapd-sizelimit.
Summary: No error messages returned if the returned page size is greater than the nssl...
Alias: None
Product: Red Hat Directory Server
Classification: Red Hat
Component: Directory Server
Version: 9.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
Depends On:
Blocks: 434914 389_1.2.1
TreeView+ depends on / blocked
Reported: 2009-07-22 12:11 UTC by Sankar Ramalingam
Modified: 2016-05-06 14:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-05-06 14:38:48 UTC

Attachments (Terms of Use)
git patch file for back-ldbm.h and ldbm_search.c (3.57 KB, patch)
2009-07-22 23:17 UTC, Noriko Hosoi
no flags Details | Diff

Description Sankar Ramalingam 2009-07-22 12:11:00 UTC
Description of problem: 
LDAP_SIZE_LIMIT_EXCEEDED error is not returned if the page size greater than the nsslapd-sizelimit.

How reproducible: Consistently

Steps to Reproduce:
1. Set nsslapd-sizelimit to 20.
2. Create 100 entries
3. Run a simple paged search which would return all the 100 entries.

Actual results: Search succeeds without any problem.

Expected results: Search should return an error, LDAP_SIZE_LIMIT_EXCEEDED.

Comment 1 Noriko Hosoi 2009-07-22 23:17:35 UTC
Created attachment 354796 [details]
git patch file for back-ldbm.h and ldbm_search.c


Problem Description:
 Simple Paged Results returns one page in one operation.  Sizelimit was reset at the beginning of each opeartion.

Fix Description:
 search_result_set is stashed and each page is retrieved from the same search_result_set.  Thus, let search_result_set keep the current sizelimit and use the value for checking the limit.  The value is valid both in one operation and multiple operations using one search_result_set.

Comment 2 Noriko Hosoi 2009-07-23 00:19:32 UTC
Reviewed by Rich (Thank you!!)

Pushed to master.

$ git merge paged
Updating 35a54ff..c3f6ff6
Fast forward
 ldap/servers/slapd/back-ldbm/back-ldbm.h   |    3 ++-
 ldap/servers/slapd/back-ldbm/ldbm_search.c |   22 ++++++++++++++++------
 2 files changed, 18 insertions(+), 7 deletions(-)
$ git push
Counting objects: 15, done.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 1.15 KiB, done.
Total 8 (delta 6), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   35a54ff..c3f6ff6  master -> master

Comment 3 Jenny Galipeau 2010-06-04 15:27:47 UTC
1. added lots of users
2. set nssldapd-sizelimit to 20
# ldapsearch -x -h `hostname` -p 389 -D "cn=Directory Manager" -w Secret123 -b "cn=config" | grep sizelimit
nsslapd-sizelimit: 20
nsslapd-sizelimit: 20

3. run paged search with page size of 100
userPassword: nirdnatSys
next page size (100): 

Am I missing something?  I should be getting LDAP_SIZE_LIMIT_EXCEEDED correct?

Comment 4 Rich Megginson 2010-06-04 15:33:42 UTC
I think limits do not apply to Directory Manager - try a normal user.

Comment 5 Jenny Galipeau 2010-06-04 15:53:16 UTC
Yup - verified - RHEL 4


earch failed: LDAP_SIZELIMIT_EXCEEDED: The maximum number of search results to return has been exceeded.

Note You need to log in before you can comment on or make changes to this bug.