summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins
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/plugins
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/plugins')
-rw-r--r--ldap/servers/plugins/acl/acl.c4
-rw-r--r--ldap/servers/plugins/acl/aclutil.c4
-rw-r--r--ldap/servers/plugins/referint/referint.c4
-rw-r--r--ldap/servers/plugins/replication/winsync-plugin.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/ldap/servers/plugins/acl/acl.c b/ldap/servers/plugins/acl/acl.c
index cb20dbeb..4fcdf744 100644
--- a/ldap/servers/plugins/acl/acl.c
+++ b/ldap/servers/plugins/acl/acl.c
@@ -172,9 +172,9 @@ static int check_rdn_access( Slapi_PBlock *pb, Slapi_Entry *e, char *dn,
int retCode = LDAP_INSUFFICIENT_ACCESS;
int i;
- if ( (dns = ldap_explode_dn( dn, 0 )) != NULL ) {
+ if ( (dns = slapi_ldap_explode_dn( dn, 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++ ) {
char *type;
diff --git a/ldap/servers/plugins/acl/aclutil.c b/ldap/servers/plugins/acl/aclutil.c
index e1eb0ab1..d5729110 100644
--- a/ldap/servers/plugins/acl/aclutil.c
+++ b/ldap/servers/plugins/acl/aclutil.c
@@ -556,8 +556,8 @@ aclutil_expand_paramString ( char *str, Slapi_Entry *e )
char *buf = NULL;
- e_dns = ldap_explode_dn ( slapi_entry_get_ndn ( e ), 0 );
- a_dns = ldap_explode_dn ( str, 0 );
+ e_dns = slapi_ldap_explode_dn ( slapi_entry_get_ndn ( e ), 0 );
+ a_dns = slapi_ldap_explode_dn ( str, 0 );
i = 0;
ncomponents = 0;
diff --git a/ldap/servers/plugins/referint/referint.c b/ldap/servers/plugins/referint/referint.c
index 454c5162..3207e5b3 100644
--- a/ldap/servers/plugins/referint/referint.c
+++ b/ldap/servers/plugins/referint/referint.c
@@ -375,7 +375,7 @@ _update_one_per_mod(const char *entryDN, /* DN of the searched entry */
Slapi_Value *v = NULL;
/* need to put together rdn into a dn */
- dnParts = ldap_explode_dn( origDN, 0 );
+ dnParts = slapi_ldap_explode_dn( origDN, 0 );
if (NULL == newRDN) {
newRDN = dnParts[0];
}
@@ -553,7 +553,7 @@ _update_all_per_mod(const char *entryDN, /* DN of the searched entry */
Slapi_Value *v = NULL;
/* need to put together rdn into a dn */
- dnParts = ldap_explode_dn( origDN, 0 );
+ dnParts = slapi_ldap_explode_dn( origDN, 0 );
if (NULL == newRDN) {
newRDN = dnParts[0];
}
diff --git a/ldap/servers/plugins/replication/winsync-plugin.h b/ldap/servers/plugins/replication/winsync-plugin.h
index 5a0f65d5..e70c4a94 100644
--- a/ldap/servers/plugins/replication/winsync-plugin.h
+++ b/ldap/servers/plugins/replication/winsync-plugin.h
@@ -371,7 +371,7 @@ test_winsync_get_new_ds_user_dn_cb(void *cbdata, const Slapi_Entry *rawentry,
"--> test_winsync_get_new_ds_user_dn_cb -- old dn [%s] -- begin\n",
*new_dn_string);
- rdns = ldap_explode_dn(*new_dn_string, 0);
+ rdns = slapi_ldap_explode_dn(*new_dn_string, 0);
if (!rdns || !rdns[0]) {
ldap_value_free(rdns);
return;