diff options
author | Rich Megginson <rmeggins@redhat.com> | 2010-08-27 11:55:29 -0600 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2010-08-31 10:51:34 -0600 |
commit | bb75d74d5ea1695e64cc63b1e328cc5ebeb5cdd5 (patch) | |
tree | 8de1353bffc78f642d06b782c71c43fa33e0a45c /ldap/servers/slapd/back-ldbm/ldbm_modrdn.c | |
parent | 4f54c63d50d8552b59fbeb1f6f0e59422282f897 (diff) | |
download | ds-bb75d74d5ea1695e64cc63b1e328cc5ebeb5cdd5.tar.gz ds-bb75d74d5ea1695e64cc63b1e328cc5ebeb5cdd5.tar.xz ds-bb75d74d5ea1695e64cc63b1e328cc5ebeb5cdd5.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/back-ldbm/ldbm_modrdn.c')
-rw-r--r-- | ldap/servers/slapd/back-ldbm/ldbm_modrdn.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c index dbe53e5b..645fea92 100644 --- a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c +++ b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c @@ -701,7 +701,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb ) { char **rdns; int i; - if ( (rdns = ldap_explode_rdn( slapi_sdn_get_dn(&dn_newrdn), 0 )) != NULL ) + if ( (rdns = slapi_ldap_explode_rdn( slapi_sdn_get_dn(&dn_newrdn), 0 )) != NULL ) { for ( i = 0; rdns[i] != NULL; i++ ) { @@ -1199,10 +1199,10 @@ moddn_newrdn_mods(Slapi_PBlock *pb, const char *olddn, struct backentry *ec, Sla int baddn = 0; /* set to true if could not parse dn */ int badrdn = 0; /* set to true if could not parse rdn */ dn = slapi_ch_strdup(olddn); - dns = ldap_explode_dn( dn, 0 ); + dns = slapi_ldap_explode_dn( dn, 0 ); if ( dns != NULL ) { - rdns = ldap_explode_rdn( dns[0], 0 ); + rdns = slapi_ldap_explode_rdn( dns[0], 0 ); if ( rdns != NULL ) { for ( i = 0; rdns[i] != NULL; i++ ) @@ -1251,7 +1251,7 @@ moddn_newrdn_mods(Slapi_PBlock *pb, const char *olddn, struct backentry *ec, Sla /* * add new RDN values to the entry (non-normalized) */ - rdns = ldap_explode_rdn( newrdn, 0 ); + rdns = slapi_ldap_explode_rdn( newrdn, 0 ); if ( rdns != NULL ) { for ( i = 0; rdns[i] != NULL; i++ ) @@ -1431,7 +1431,7 @@ moddn_rename_child_entry( * excluding the old parent entry DN, and adding the new * superior entry DN. * - * ldap_explode_dn is probably a bit slow, but it knows about + * slapi_ldap_explode_dn is probably a bit slow, but it knows about * DN escaping which is pretty complicated, and we wouldn't * want to reimplement that here. * @@ -1446,7 +1446,7 @@ moddn_rename_child_entry( int i; olddn = slapi_entry_get_dn(ec->ep_entry); - olddns = ldap_explode_dn( olddn, 0 ); + olddns = slapi_ldap_explode_dn( olddn, 0 ); for(;olddns[olddncomps]!=NULL;olddncomps++); for(i=0;i<olddncomps-parentdncomps;i++) { @@ -1537,7 +1537,7 @@ moddn_rename_children( * Break down the parent entry dn into its components. */ { - char **parentdns = ldap_explode_dn( slapi_sdn_get_dn(dn_parentdn), 0 ); + char **parentdns = slapi_ldap_explode_dn( slapi_sdn_get_dn(dn_parentdn), 0 ); if (parentdns) { for(;parentdns[parentdncomps]!=NULL;parentdncomps++); @@ -1552,7 +1552,7 @@ moddn_rename_children( /* * Break down the new superior entry dn into its components. */ - newsuperiordns = ldap_explode_dn( slapi_sdn_get_dn(dn_newsuperiordn), 0 ); + newsuperiordns = slapi_ldap_explode_dn( slapi_sdn_get_dn(dn_newsuperiordn), 0 ); if (newsuperiordns) { for(;newsuperiordns[newsuperiordncomps]!=NULL;newsuperiordncomps++); |