mkmostafa
mkmostafa

Reputation: 3171

How does ldap search api fail?

does ldap_search_s api fail when it does not find anything or if the query was syntactically wrong?

For example if I am searching for a ldap groups with some common name. If the ldap search fails does it mean that It could not find the groups with the given filter or that my filter has wrong syntax?

I'm using openldap with c++.

Upvotes: 0

Views: 68

Answers (2)

Ludovic Poitou
Ludovic Poitou

Reputation: 4868

Returning no entries is not an error. It indicates that no entries match the filter or you do not have the permission to read them.

Upvotes: 1

Vadim Prozorov
Vadim Prozorov

Reputation: 175

You can use ldap_error to find out what error code means.

Upvotes: 1

Related Questions