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.