|
|
@@ -512,7 +512,16 @@ ldbm_instance_config_load_dse_info(ldbm_instance *inst)
|
|
|
rval = 1;
|
|
|
goto bail;
|
|
|
}
|
|
|
+
|
|
|
search_pb = slapi_pblock_new();
|
|
|
+ if (!search_pb) {
|
|
|
+ LDAPDebug(LDAP_DEBUG_ANY,
|
|
|
+ "ldbm_instance_config_load_dse_info: Out of memory\n",
|
|
|
+ 0, 0, 0);
|
|
|
+ rval = 1;
|
|
|
+ goto bail;
|
|
|
+ }
|
|
|
+
|
|
|
slapi_search_internal_set_pb(search_pb, dn, LDAP_SCOPE_BASE,
|
|
|
"objectclass=*", NULL, 0, NULL, NULL,
|
|
|
li->li_identity, 0);
|
|
|
@@ -741,7 +750,16 @@ ldbm_instance_modify_config_entry_callback(Slapi_PBlock *pb, Slapi_Entry* entryB
|
|
|
PR_Lock(inst->inst_config_mutex);
|
|
|
|
|
|
slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &mods );
|
|
|
-
|
|
|
+
|
|
|
+ if (!returntext) {
|
|
|
+ rc = LDAP_OPERATIONS_ERROR;
|
|
|
+ LDAPDebug(LDAP_DEBUG_ANY,
|
|
|
+ "ldbm_instance_modify_config_entry_callback: "
|
|
|
+ "NULL return text\n",
|
|
|
+ 0, 0, 0);
|
|
|
+ goto out;
|
|
|
+ }
|
|
|
+
|
|
|
returntext[0] = '\0';
|
|
|
|
|
|
/*
|
|
|
@@ -755,10 +773,8 @@ ldbm_instance_modify_config_entry_callback(Slapi_PBlock *pb, Slapi_Entry* entryB
|
|
|
if (strcasecmp(attr_name, CONFIG_INSTANCE_SUFFIX) == 0) {
|
|
|
/* naughty naughty, we don't allow this */
|
|
|
rc = LDAP_UNWILLING_TO_PERFORM;
|
|
|
- if (returntext) {
|
|
|
- PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE,
|
|
|
- "Can't change the root suffix of a backend");
|
|
|
- }
|
|
|
+ PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE,
|
|
|
+ "Can't change the root suffix of a backend");
|
|
|
LDAPDebug(LDAP_DEBUG_ANY,
|
|
|
"ldbm: modify attempted to change the root suffix "
|
|
|
"of a backend (which is not allowed)\n",
|
|
|
@@ -787,6 +803,7 @@ ldbm_instance_modify_config_entry_callback(Slapi_PBlock *pb, Slapi_Entry* entryB
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+out:
|
|
|
PR_Unlock(inst->inst_config_mutex);
|
|
|
|
|
|
*returncode = rc;
|