LDAP filter not being considered
Posted
by Ricky
on Stack Overflow
See other posts from Stack Overflow
or by Ricky
Published on 2010-03-09T20:05:47Z
Indexed on
2010/04/20
1:03 UTC
Read the original article
Hit count: 486
Hi there.
I am performing an LDAP search query in C like so;
ldap_search_ext_s(ld, BASEDN, SCOPE, FILTER, attrs, 0, NULL, NULL, NULL, LDAP_NO_LIMIT, &res);
My search performs fine except when I try to specify FILTER to be;
#define FILTER "uid=*"
, that is, when I try to run a search for all LDAP entries with a uid.
Unfortunately my code just returns the first entry for each result that it finds. So, my code might find 50 results, but will return the first entry 50 times.
Can anyone suspect what I might be doing wrong here?
EDIT: I am stepping through my results like so:
for (msg = ldap_first_message(ld, res); msg != NULL; msg = ldap_next_message(ld, msg))
Any help is really appreciated. Ricky.
© Stack Overflow or respective owner