0

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++.

user207421
  • 305,947
  • 44
  • 307
  • 483
mkmostafa
  • 3,071
  • 2
  • 18
  • 47

2 Answers2

1

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

1

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.

Ludovic Poitou
  • 4,788
  • 2
  • 21
  • 30