I have an application developed in C++ that uses the Novell C LDAP SDK.
If I use a search query to the ldap_search_ext_s function of the form
it works when I substitute the first %s with 'cn' and the second with a
valid username.

If I modify the query to:
(&(|(objectClass=inetOrgPerson)(objectClass=aliasO bject))(%s=%s))
it no longer works. I want to find user objects and user alias objects
that match a username. I am substituting 'cn' and a valid username as

This query works with the ldapsearch command from the OpenLDAP tools on
a Linux installation. According to page 39 of ldaplibc.pdf it should
work with this SDK as well. The example there is:

(&(objectClass=inetOrgPerson) (| (sn=Smith) (cn=Chris S*) ) )

To me that's the same format as my own search filter, albeit ordered
differently. I have tried using this query string and replacing the
parts to make it identical functionally to my query.

Each time I call ldap_search_ext_s it returns 4. The documentation says
a return code of 4 is 'LDAP_SIZELIMIT_EXCEEDED: Indicates that in a
search operation, the size limit specified by the client or the server
has been exceeded. Incomplete results are returned.'

This implies too many results are being returned, but I have checked
and the final query used in the function is:

(&(cn=user1) (| (objectClass=inetOrgPerson) (objectClass=aliasObject) ) )

Any idea what I'm doing wrong?

mattross's Profile: http://forums.novell.com/member.php?userid=30003
View this thread: http://forums.novell.com/showthread.php?t=394151