Bug 513172

Summary: No error messages returned if the returned page size is greater than the nsslapd-sizelimit.
Product: Red Hat Directory Server Reporter: Sankar Ramalingam <sramling>
Component: Directory ServerAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED CURRENTRELEASE QA Contact: Viktor Ashirov <vashirov>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.0CC: jgalipea, rmeggins
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-06 14:38:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 434914, 517385    
Attachments:
Description Flags
git patch file for back-ldbm.h and ldbm_search.c none

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

Files:
 ldap/servers/slapd/back-ldbm/back-ldbm.h
 ldap/servers/slapd/back-ldbm/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 Severance 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 Severance 2010-06-04 15:53:16 UTC
Yup - verified - RHEL 4

version:
redhat-ds-base-8.2.0-2010060304.el4dsrv


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