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

Re: API: Getting paged results



On Sat, 2006-01-07 at 10:53 -0500, William wrote:
> Kapil Surlaker wrote:
> > I am using the ldap_search_s API to search the LDAP server. If the number of
> > matching entries is large, I get a size exceeded error. Is there a way to do
> > the search in pages so that I can retrieve few entries at a time, eventually
> > retrieving all the entries ?


> Paging of LDAP is defined in RFC 2696 and OpenLdap supports it.

Yes.  And OpenLDAP also honors admin enforced limits, so if the
sizelimit on the server is set to N, no matter how you collect entries
(all in a bunch or paged one by one), you won't be able to get more than
N (if you can, that's a bug; please let us know).

If your question was: can I use pagedResults to circumvent those
implementations of DSAs that allow its use to circumvent server imposed
admin limits (like AD, for example)?  The answer is: yes.  But OpenLDAP
dos not provide any C API calls to encode/parse pagedResults
requests/responses, you'll need to code them yourself maybe following
the ldapsearch.c implementation as a guideline.

p.




Ing. Pierangelo Masarati
Responsabile Open Solution
OpenLDAP Core Team

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it
------------------------------------------