Hi Team,

We are working on migration of nsldap C sdk to OpenLDAP C sdk for our
application client code.

We are using OpenLDAP 2.6.7.

As part of this migration, we are facing one issue with a search filter
that we are using to get content from LDAP servers.

search filter: (| (uid=user1) (| ([email protected]) (! (mail=
[email protected]) ) ) )


We are using this search filter for user lookup from LDAP servers in our
application for one of our cases.
We are using OpenLDAP C API: ldap_search_ext_s (and/or ldap_search_ext) in
our application. When we make a search call from our application to LDAP
server using the above search filter, we are getting "Bad search filter
(-7)" error instead of the users list. Due to this, our migration is
blocked. Tried using the same search filter with *ldapsearch *utility
provided by OpenLDAP, but getting the same error message. Below is the
snippet of error with search filter.










*>ldapsearch.exe -H ldap://ldapserver1.com:389 <http://ldapserver1.com:389>
-D "cn=admin,o=test.com <http://test.com>" -b o=test.com <http://test.com>
"(| (uid=user1) (| ([email protected] <[email protected]>) (!
([email protected] <[email protected]>) ) ) )"# extended LDIF## LDAPv3#
base <o=test.com <http://test.com>> with scope subtree# filter: (|
(uid=user1) (| ([email protected] <[email protected]>) (!
([email protected] <[email protected]>) ) ) )# requesting:
ALL#ldap_search_ext: Bad search filter (-7)*

But the same search filter is working fine with our existing nsldap
provider. We are able to get the users list from the LDAP server using the
same search filter without any changes. To maintain backward
compatibility in our application, we should be able to get the content from
the LDAP server using the same search filter.

Could you please look into this problem and provide a solution for this?


-- 
Thanks,
*c.venugopal*

Reply via email to