Skip to content

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

@Vchekryzhov

Description

@Vchekryzhov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions