[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Error searching DNs with escaped special characters
> Oh, sorry
> I`m running
> OpenLDAP 2.1.16 and 2.1.22
>
>>And this doesn`t work too!
>>dn: x509issuer=CN=test \22sa\22 sadf\,C=RU,O=ca
>
> dn: x509issuer=CN=test \5C\22sa\5C\22 sadf\,C=RU,O=ca
> worked but this is wrong !!!
The parsing works correctly:
[ando@nb ldap]$ ./libraries/libldap/dntest 'x509issuer=CN=test \22sa\22
sadf\,C=RU,O=ca' V3 V3,PRETTY
ldap_rdn2str() = "x509issuer=CN=test \"sa\" sadf\2CC=RU"
ldap_rdn2str() = "O=ca"
ldap_dn2str(ldap_str2dn("x509issuer=CN=test \22sa\22 sadf\,C=RU,O=ca"))
= "x509issuer=CN=test \"sa\" sadf\2CC=RU,O=ca"
ldap_dn2domain("x509issuer=CN=test \22sa\22 sadf\,C=RU,O=ca")
= "(null)"
ldap_dn2ufn("x509issuer=CN=test \22sa\22 sadf\,C=RU,O=ca")
= "CN=test \22sa\22 sadf\2CC=RU, ca"
ldap_dn2dcedn("x509issuer=CN=test \22sa\22 sadf\,C=RU,O=ca")
= "/O=ca/x509issuer=CN\=test "sa" sadf\,C\=RU"
ldap_dcedn2dn("/O=ca/x509issuer=CN\=test "sa" sadf\,C\=RU")
= "x509issuer=CN=test \22sa\22 sadf\2CC=RU,O=ca"
ldap_dn2ad_canonical("x509issuer=CN=test \22sa\22 sadf\,C=RU,O=ca")
= "ca/CN\=test "sa" sadf\,C\=RU"
ldap_explode_dn("x509issuer=CN=test \"sa\" sadf\2CC=RU,O=ca"):
"x509issuer=CN=test \22sa\22 sadf\2CC=RU"
ldap_explode_rdn("x509issuer=CN=test \22sa\22 sadf\2CC=RU")
'x509issuer=CN=test \22sa\22 sadf\2CC=RU'
ldap_explode_rdn("x509issuer=CN=test \22sa\22 sadf\2CC=RU") (no
types)
"CN=test \22sa\22 sadf\2CC=RU"
"O=ca"
ldap_explode_rdn("O=ca")
'O=ca'
ldap_explode_rdn("O=ca") (no types)
"ca"
ldap_explode_dn("x509issuer=CN=test \"sa\" sadf\2CC=RU,O=ca") (no types):
"CN=test \22sa\22 sadf\2CC=RU"
"ca"
"x509issuer=CN=test \"sa\" sadf\2CC=RU,O=ca"
== "x509issuer=CN=test \"sa\" sadf\2CC=RU,O=ca" ? yes
but slapd fails because x509issuer is not defined (that's what I got);
did you define that attribute in your system? What definition did you
use?
p.
--
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it