From 8a943175138bbfec0b398ea4ffd24f3047df3951 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Fri, 27 Aug 2010 11:55:29 -0600 Subject: implement slapi_ldap_explode_dn and slapi_ldap_explode_rdn The DS has some problems with the openldap versions of these functions: 1) They are deprecated - should use the str2[r]dn and [r]dn2str and the bv versions of those functions instead 2) They escape utf-8 and other values in the strings - the mozldap functions do not do this 3) They handle double quoted strings, but they remove the quotes - our code expects the quotes to be left in place Until we fix our DN handling, and get rid of the double quoted DNs, we just use the mozldap versions of these functions. --- lib/ldaputil/cert.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/ldaputil/cert.c b/lib/ldaputil/cert.c index 30fd0f4b..c26ff41f 100644 --- a/lib/ldaputil/cert.c +++ b/lib/ldaputil/cert.c @@ -221,12 +221,12 @@ _explode_dn (const char* dn) { auto char*** exp = NULL; if (dn && *dn) { - auto char** rdns = ldap_explode_dn (dn, 0); + auto char** rdns = slapi_ldap_explode_dn (dn, 0); if (rdns) { auto size_t expLen = 0; auto char** rdn; for (rdn = rdns; *rdn; ++rdn) { - auto char** avas = ldap_explode_rdn (*rdn, 0); + auto char** avas = slapi_ldap_explode_rdn (*rdn, 0); if (avas && *avas) { exp = (char***) ldapu_realloc (exp, sizeof(char**) * (expLen + 2)); if (exp) { -- cgit