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/entry.c | |
parent | 4f54c63d50d8552b59fbeb1f6f0e59422282f897 (diff) | |
download | ds-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/entry.c')
-rw-r--r-- | ldap/servers/slapd/entry.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ldap/servers/slapd/entry.c b/ldap/servers/slapd/entry.c index 3f956bc6..aa83c96f 100644 --- a/ldap/servers/slapd/entry.c +++ b/ldap/servers/slapd/entry.c @@ -2873,9 +2873,9 @@ slapi_entry_rdn_values_present( const Slapi_Entry *e ) /* JCM Use the Slapi_RDN code */ rc = 1; - if ( (dns = ldap_explode_dn( slapi_entry_get_dn_const(e), 0 )) != NULL ) + if ( (dns = slapi_ldap_explode_dn( slapi_entry_get_dn_const(e), 0 )) != NULL ) { - if ( (rdns = ldap_explode_rdn( dns[0], 0 )) != NULL ) + if ( (rdns = slapi_ldap_explode_rdn( dns[0], 0 )) != NULL ) { for ( i = 0; rdns[i] != NULL; i++ ) { @@ -2934,10 +2934,10 @@ slapi_entry_add_rdn_values( Slapi_Entry *e ) /* JCM Use the Slapi_RDN code */ /* make sure RDN values are also in the entry */ - if ( (dns = ldap_explode_dn( dn, 0 )) == NULL ) { + if ( (dns = slapi_ldap_explode_dn( dn, 0 )) == NULL ) { return( LDAP_INVALID_DN_SYNTAX ); } - if ( (rdns = ldap_explode_rdn( dns[0], 0 )) == NULL ) { + if ( (rdns = slapi_ldap_explode_rdn( dns[0], 0 )) == NULL ) { slapi_ldap_value_free( dns ); return( LDAP_INVALID_DN_SYNTAX ); } |