summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/rdn.c
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2010-08-27 11:55:29 -0600
committerRich Megginson <rmeggins@redhat.com>2010-08-31 10:51:34 -0600
commitbb75d74d5ea1695e64cc63b1e328cc5ebeb5cdd5 (patch)
tree8de1353bffc78f642d06b782c71c43fa33e0a45c /ldap/servers/slapd/rdn.c
parent4f54c63d50d8552b59fbeb1f6f0e59422282f897 (diff)
downloadds-openldap.tar.gz
ds-openldap.tar.xz
ds-openldap.zip
implement slapi_ldap_explode_dn and slapi_ldap_explode_rdnopenldap
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.
Diffstat (limited to 'ldap/servers/slapd/rdn.c')
-rw-r--r--ldap/servers/slapd/rdn.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ldap/servers/slapd/rdn.c b/ldap/servers/slapd/rdn.c
index 1ef2b836..39b40bd2 100644
--- a/ldap/servers/slapd/rdn.c
+++ b/ldap/servers/slapd/rdn.c
@@ -101,7 +101,7 @@ slapi_rdn_init_dn(Slapi_RDN *rdn,const char *dn)
slapi_rdn_init(rdn);
if(dn!=NULL)
{
- char **dns= ldap_explode_dn(dn, 0);
+ char **dns= slapi_ldap_explode_dn(dn, 0);
if(dns!=NULL)
{
rdn->rdn= slapi_ch_strdup(dns[0]);
@@ -174,9 +174,9 @@ _slapi_rdn_init_all_dn_ext(Slapi_RDN *rdn, const Slapi_DN *sdn)
if (q) {
char bakup = *q;
*q = '\0';
- dns = ldap_explode_dn(dn, 0);
+ dns = slapi_ldap_explode_dn(dn, 0);
if (NULL == dns) { /* if dn contains NULL RDN (e.g., ",,"),
- ldap_explode_dn returns NULL */
+ slapi_ldap_explode_dn returns NULL */
*q = bakup;
return -1;
}
@@ -187,16 +187,16 @@ _slapi_rdn_init_all_dn_ext(Slapi_RDN *rdn, const Slapi_DN *sdn)
rc = 0; /* success */
} else {
/* Given dn does not belong to this server. Just set it. */
- dns = ldap_explode_dn(dn, 0);
+ dns = slapi_ldap_explode_dn(dn, 0);
}
}
} else {
/* Given dn does not belong to this server. Just set it. */
- dns = ldap_explode_dn(dn, 0);
+ dns = slapi_ldap_explode_dn(dn, 0);
}
} else {
/* Given dn does not belong to this server. Just set it. */
- dns = ldap_explode_dn(dn, 0);
+ dns = slapi_ldap_explode_dn(dn, 0);
}
/* Get the last matched position */
@@ -329,7 +329,7 @@ slapi_rdn_get_rdns(Slapi_RDN *rdn)
}
if(rdn->rdn!=NULL)
{
- rdn->rdns = ldap_explode_rdn( rdn->rdn, 0 );
+ rdn->rdns = slapi_ldap_explode_rdn( rdn->rdn, 0 );
rdns= rdn->rdns;
}
slapi_setbit_uchar(rdn->flag,FLAG_RDNS);