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

Re: commit: ldap/libraries/libldap filter.c



ando@OpenLDAP.org wrote:
> 
> Update of /repo/OpenLDAP/pkg/ldap/libraries/libldap
> 
> Modified Files:
>         filter.c  1.11 -> 1.12
> 
> Log Message:
> not-so-easy-to-spot bug in filter writing

Found it; I got this testing the bv-normalization
of UTF8 (thanks to Stig); the results look pretty good:

ldapadd -x -h mbdyn.aero.polimi.it:9009 -D 'cn=manager,o=university of
michigan,c=us' -w secret
dn: cn=Kurt,o=University of Michigan,c=US
objectClass: person
cn: Kurt
sn: Zeilenga

ldapsearch -x -h mbdyn.aero.polimi.it:9009 -b 'o=university of
michigan,c=us' '(cn=k*t)'
# extended LDIF
#
# LDAPv3
# filter: (cn=k*t)
# requesting: ALL
#

# Kurt, University of Michigan, US
dn: cn=Kurt,o=University of Michigan,c=US
objectClass: person
cn: Kurt
sn: Zeilenga

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

ldapmodrdn -x -h mbdyn.aero.polimi.it:9009 -D 'cn=manager,o=university
of michigan,c=us' -w secret -r "cn=Kurt,o=University of Michigan,c=US"
"cn=Ku\00rt"

ldapsearch -x -h mbdyn.aero.polimi.it:9009 -b 'o=university of
michigan,c=us' '(cn=k*t)'
# extended LDIF
#
# LDAPv3
# filter: (cn=k*t)
# requesting: ALL
#

# Ku\00rt, University of Michigan, US
dn: cn=Ku\00rt,o=University of Michigan,c=US
objectClass: person
sn: Zeilenga
cn:: S3UAcnQ=

ldapmodrdn -x -h mbdyn.aero.polit:9009 -D 'cn=manager,o=university of
michigan,c=us' -w secret -r "cn=Ku\00rt,o=University of Michigan,c=US"
"cn=K\00u\00r\00t"

ldapsearch -x -h mbdyn.aero.polimi.it:9009 -b 'o=university of
michigan,c=us' '(cn=k*t)'
# extended LDIF
#
# LDAPv3
# filter: (cn=k*t)
# requesting: ALL
#

# K\00u\00r\00t, University of Michigan, US
dn: cn=K\00u\00r\00t,o=University of Michigan,c=US
objectClass: person
sn: Zeilenga
cn:: SwB1AHIAdA==

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

echo "SwB1AHIAdA=="|mimencode -u|od -c
0000000   K  \0   u  \0   r  \0   t
0000007

:)

Now I need to find out why

ldapsearch -x -h mbdyn.aero.polimi.it:9009 -b 'o=university of
michigan,c=us' '(cn=k*u*r*t)'
# extended LDIF
#
# LDAPv3
# filter: (cn=k*u*r*t)
# requesting: ALL
#

# search result
search: 2
result: 0 Success

# numResponses: 1

(I switched to "cn=Kurt" because "cn=Ando" got corrupted during 
a failed modrdn ;)

Ando

-- 
Dr. Pierangelo Masarati               | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale                | fax:   +39 02 2399 8334
Politecnico di Milano                 |
mailto:pierangelo.masarati@polimi.it
via La Masa 34, 20156 Milano, Italy   |
http://www.aero.polimi.it/~masarati