[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: SIZELIMIT 0 gives a zero limit



Citando Gavin Henry <ghenry@suretecsystems.com>:


----- "Fabio Pedretti" <fabio.pedretti@ing.unibs.it> wrote:

The ldap.conf man page says this:

SIZELIMIT <integer>
Specifies a size limit to use when performing searches.  The number
should  be  a
non-negative  integer. SIZELIMIT of zero (0) specifies unlimited
search size.

However it appears that putting "SIZELIMIT 0" in my ldap.conf gives
a:
# search result
search: 2
result: 4 Size limit exceeded

To workaround this I put a very large value and it works. I am using
openldap 2.4.11 compiled from source on a Slackware 10.0. Is it an
openldap bug?

Do you have any limits on your slapd config?

OK, I found the problem.

In my slapd.conf I had
sizelimit 0
which appears to be wrong. In this case SIZELIMT 0 in ldap.conf gives zero records, SIZELIMIT 1 gives 1 records, etc...

Changing slapd.conf to:
sizelimit unlimited
works correctly.

This behaviour is somewhat strange, however:
1) "sizelimit" in slapd.conf and "SIZELIMIT" options in ldap.conf are not coherent (the first want "unlimited", the latter "0" to specify no limits);
2) when "sizelimit 0" is defined in slapd.conf the behaviour appears to be undefined (it works fine only if you use a different than "0" value for SIZELIMIT in ldap.conf); it should print an error or at least a warning when set to "0", since this not means "no limits" (or even better "0" could be changed to means "unlimited" also here and also reflected in man page of slapd.conf).

Thanks,
Fabio