summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins/chainingdb/cb_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldap/servers/plugins/chainingdb/cb_config.c')
-rw-r--r--ldap/servers/plugins/chainingdb/cb_config.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ldap/servers/plugins/chainingdb/cb_config.c b/ldap/servers/plugins/chainingdb/cb_config.c
index 1dab8462..5659353c 100644
--- a/ldap/servers/plugins/chainingdb/cb_config.c
+++ b/ldap/servers/plugins/chainingdb/cb_config.c
@@ -63,24 +63,28 @@ int cb_config_add_dse_entries(cb_backend *cb, char **entries, char *string1, cha
Slapi_PBlock *util_pb = NULL;
int res, rc = 0;
char entry_string[CB_BUFSIZE];
+ char *dn = NULL;
for(x = 0; strlen(entries[x]) > 0; x++) {
util_pb = slapi_pblock_new();
PR_snprintf(entry_string, sizeof(entry_string), entries[x], string1, string2, string3);
e = slapi_str2entry(entry_string, 0);
+ dn = slapi_ch_strdup(slapi_entry_get_dn(e)); /* for err msg */
slapi_add_entry_internal_set_pb(util_pb, e, NULL, cb->identity, 0);
slapi_add_internal_pb(util_pb);
slapi_pblock_get(util_pb, SLAPI_PLUGIN_INTOP_RESULT, &res);
if ( LDAP_SUCCESS != res && LDAP_ALREADY_EXISTS != res ) {
char ebuf[ BUFSIZ ];
- slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
"Unable to add config entry (%s) to the DSE: %s\n",
- escape_string(slapi_entry_get_dn(e), ebuf),
+ escape_string(dn, ebuf),
ldap_err2string(res));
rc = res;
slapi_pblock_destroy(util_pb);
+ slapi_ch_free_string(&dn);
break;
}
+ slapi_ch_free_string(&dn);
slapi_pblock_destroy(util_pb);
}
return rc;
@@ -161,7 +165,7 @@ int cb_config_load_dse_info(Slapi_PBlock * pb) {
/* Get the default instance value entry if it exists */
/* else create it */
-
+ /* This dn is already normalized */
PR_snprintf(defaultDn,sizeof(defaultDn),"cn=default instance config,%s",cb->pluginDN);
default_pb = slapi_pblock_new();