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

Re: Interesting erroneous results

> Try doing the following,
> 	ldapsearch -z -p 636 -h ... -b ... cn=...
> and see what the results are!
> YES - I know (now) that '-z' expects/requires a paramenter - I was REALLY
> trying to use '-x' but mistakingly chose '-z' instead.
> The interesting response resulted in:
> 	# base <> with scope sub
> 	# filter: (objectclass=*)
> 	# requesting: 636 -h ... -b ... cn=...
> which led to every object being returned (not surprisingly with the filter
> set to "objectclass=*"), up to the server size limit.

No surprise: atoi() returns -1 in case of error (e.g. when processing "-p"
instead of a valid integer); this to the ldap client library means no
limits requested.  All the remaining attributes after 636 (the first
non-option arg) are treated as requested attributes.

I guess all ato*() instances should replaced by strto*() where the status
of the conversion is checked.  This has already been done in most of
slapd.  You may want to file an ITS.


Pierangelo Masarati

    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497