This function returns one of the following values:
0 if the entry matched the filter, or if the specified filter is NULL.
-1 if the filter type is unknown, or if the entry does not match the filter.
A positive value (an LDAP error code) if an error occurred, or if the current user does not have access rights to search the specified entry.