[Date Prev][Date Next] [Chronological] [Thread] [Top]

search filter for presence of dn

I am attempting to determine the presence of a DN in LDAP.  I am using the C
SDK of OpenLDAP 1.2.9.

I am calling ldap_search as follows:

                dn,      // the dn being searched for

This works fine when the DN is present, but returns an error code
LDAP_NO_SUCH_OBJECT when the DN is not present.

My question is:  Is this the intended behaviour, it seems strange to return
an error code on a valid query.  Is there a better way to do this, or should
I just test the error code for LDAP_NO_SUCH_OBJECT.

Thanks in advance,