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

Re: (ITS#7250) Issue with search filter escape sequanced

On 04/18/2012 02:47 PM, malleswari.nandi@gmail.com wrote:
> Full_Name: Malleswari Nandireddy
> Version: 2.4.23
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (
> In our code we are using ldap_add_ext_s and ldap_search_ext_s , to add an entry
> to LDAP and to search and entry in the LDAP.
> If the enter added is "00*#116cr36_1R1T1S1P1Q1" , then we we try to search using
> ldap_search_ext_s , it is not returning any records.
> But when I try to search using ldapsearch , after replacing escape charecter "*"
> in the string with "\2a" it is returning records.
> ./ldapsearch  -h  -x -b 'dc=CVGLDAP,dc=com'
> 'ets=1:00\2a#116cr36_1R1T1S1P1Q1'
> We have tried passing 'ets=1:00\2a#116cr36_1R1T1S1P1Q1' to ldap_search_ext_s() ,
> but it is not returning any records.
> Please help me searching records in LDAP using ldap_search_ext_s() if the filter
> has escape charecters like "*,(,)....).

You're clearly missing the point between escaping in shell and in C 
code.  However this is a user error, not an (Open)LDAP bug, so I suggest 
you direct your question to openldap-technical@openldap.org; this ITS 
will be closed.


Pierangelo Masarati
Associate Professor
Dipartimento di Ingegneria Aerospaziale
Politecnico di Milano