Skip to content

Search only returns 126 entries when nsslapd-sizelimit is 126 #437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Vchekryzhov opened this issue Apr 8, 2025 · 0 comments
Open

Search only returns 126 entries when nsslapd-sizelimit is 126 #437

Vchekryzhov opened this issue Apr 8, 2025 · 0 comments

Comments

@Vchekryzhov
Copy link

Search only returns 126 entries when nsslapd-sizelimit is 126

Description

When performing a paged search using the net-ldap gem, and the LDAP server's nsslapd-sizelimit is set to a value below 127 (e.g., 126), the search returns only up to that limit and does not continue with additional pages.

Expected behavior:
Paged searches should continue retrieving results and return all entries from my server

Environment

  • LDAP Server: 389 Directory Server (Docker image: quay.io/389ds/dirsrv:latest)
  • Server setting: nsslapd-sizelimit=126
  • net-ldap version: 0.17.1
  • Ruby version: 3.3.6

Reproduction Steps

Set the server limit above the threshold (works as expected):

dsconf localhost config replace nsslapd-sizelimit=127

Then:

ldap = Net::LDAP.new(
  host: '127.0.0.1',
  port: 3389,
  auth: {
    method: :simple,
    username: 'USERNAME',
    password: 'PASSWORD'
  }
)

ldap.search(base: 'ou=People,dc=example,dc=com').size
# => 4966

Now set the server limit below the threshold:

dsconf localhost config replace nsslapd-sizelimit=126

Then rerun the same Ruby code:

ldap.search(base: 'ou=People,dc=example,dc=com').size
# => 126

No additional pages are fetched, and the result is truncated at the server-side limit.


Additional Notes

  • This issue does not occur in LDAP client ldapsearch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant