|
|
@@ -1132,6 +1132,8 @@ int mapping_tree_entry_modify_callback(Slapi_PBlock *pb, Slapi_Entry* entryBefor
|
|
|
"Error: could not find parent for %s\n",
|
|
|
slapi_entry_get_dn(entryAfter), 0, 0);
|
|
|
slapi_sdn_free(&subtree);
|
|
|
+ slapi_ch_free_string(&plugin_fct);
|
|
|
+ slapi_ch_free_string(&plugin_lib);
|
|
|
*returncode = LDAP_UNWILLING_TO_PERFORM;
|
|
|
return SLAPI_DSE_CALLBACK_ERROR;
|
|
|
}
|
|
|
@@ -1170,6 +1172,8 @@ int mapping_tree_entry_modify_callback(Slapi_PBlock *pb, Slapi_Entry* entryBefor
|
|
|
{
|
|
|
free_mapping_tree_node_arrays(&backends, &be_names, &be_states, &be_list_count);
|
|
|
slapi_sdn_free(&subtree);
|
|
|
+ slapi_ch_free_string(&plugin_fct);
|
|
|
+ slapi_ch_free_string(&plugin_lib);
|
|
|
*returncode = LDAP_UNWILLING_TO_PERFORM;
|
|
|
return SLAPI_DSE_CALLBACK_ERROR;
|
|
|
}
|
|
|
@@ -1183,6 +1187,8 @@ int mapping_tree_entry_modify_callback(Slapi_PBlock *pb, Slapi_Entry* entryBefor
|
|
|
mtn_unlock();
|
|
|
free_mapping_tree_node_arrays(&backends, &be_names, &be_states, &be_list_count);
|
|
|
slapi_sdn_free(&subtree);
|
|
|
+ slapi_ch_free_string(&plugin_fct);
|
|
|
+ slapi_ch_free_string(&plugin_lib);
|
|
|
return SLAPI_DSE_CALLBACK_ERROR;
|
|
|
}
|
|
|
|
|
|
@@ -1211,12 +1217,16 @@ int mapping_tree_entry_modify_callback(Slapi_PBlock *pb, Slapi_Entry* entryBefor
|
|
|
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "must use replace operation to change state\n");
|
|
|
*returncode = LDAP_UNWILLING_TO_PERFORM;
|
|
|
slapi_sdn_free(&subtree);
|
|
|
+ slapi_ch_free_string(&plugin_fct);
|
|
|
+ slapi_ch_free_string(&plugin_lib);
|
|
|
return SLAPI_DSE_CALLBACK_ERROR;
|
|
|
}
|
|
|
if ((mods[i]->mod_bvalues == NULL) || (mods[i]->mod_bvalues[0] == NULL))
|
|
|
{
|
|
|
slapi_sdn_free(&subtree);
|
|
|
*returncode = LDAP_OPERATIONS_ERROR;
|
|
|
+ slapi_ch_free_string(&plugin_fct);
|
|
|
+ slapi_ch_free_string(&plugin_lib);
|
|
|
return SLAPI_DSE_CALLBACK_ERROR;
|
|
|
}
|
|
|
|
|
|
@@ -1230,6 +1240,8 @@ int mapping_tree_entry_modify_callback(Slapi_PBlock *pb, Slapi_Entry* entryBefor
|
|
|
{
|
|
|
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "need to set nsslapd-backend before moving to backend state\n");
|
|
|
slapi_sdn_free(&subtree);
|
|
|
+ slapi_ch_free_string(&plugin_fct);
|
|
|
+ slapi_ch_free_string(&plugin_lib);
|
|
|
*returncode = LDAP_UNWILLING_TO_PERFORM;
|
|
|
return SLAPI_DSE_CALLBACK_ERROR;
|
|
|
}
|
|
|
@@ -1242,6 +1254,8 @@ int mapping_tree_entry_modify_callback(Slapi_PBlock *pb, Slapi_Entry* entryBefor
|
|
|
{
|
|
|
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "need to set nsslapd-referral before moving to referral state\n");
|
|
|
slapi_sdn_free(&subtree);
|
|
|
+ slapi_ch_free_string(&plugin_fct);
|
|
|
+ slapi_ch_free_string(&plugin_lib);
|
|
|
*returncode = LDAP_UNWILLING_TO_PERFORM;
|
|
|
return SLAPI_DSE_CALLBACK_ERROR;
|
|
|
}
|
|
|
@@ -1280,6 +1294,8 @@ int mapping_tree_entry_modify_callback(Slapi_PBlock *pb, Slapi_Entry* entryBefor
|
|
|
*returncode = LDAP_UNWILLING_TO_PERFORM;
|
|
|
mtn_unlock();
|
|
|
slapi_sdn_free(&subtree);
|
|
|
+ slapi_ch_free_string(&plugin_fct);
|
|
|
+ slapi_ch_free_string(&plugin_lib);
|
|
|
return SLAPI_DSE_CALLBACK_ERROR;
|
|
|
}
|
|
|
|
|
|
@@ -1353,7 +1369,7 @@ int mapping_tree_entry_modify_callback(Slapi_PBlock *pb, Slapi_Entry* entryBefor
|
|
|
if (SLAPI_IS_MOD_REPLACE(mods[i]->mod_op)
|
|
|
|| SLAPI_IS_MOD_ADD(mods[i]->mod_op))
|
|
|
{
|
|
|
- const char *sval;
|
|
|
+ const char *sval;
|
|
|
slapi_entry_attr_find(entryAfter,
|
|
|
"nsslapd-distribution-root-update", &attr);
|
|
|
slapi_attr_first_value(attr, &val);
|
|
|
@@ -1365,13 +1381,13 @@ int mapping_tree_entry_modify_callback(Slapi_PBlock *pb, Slapi_Entry* entryBefor
|
|
|
plugin_rootmode = CHAIN_ROOT_UPDATE_REJECT;
|
|
|
} else {
|
|
|
sval = slapi_value_get_string(val);
|
|
|
- if (strcmp(sval,"reject") == 0)
|
|
|
- plugin_rootmode = CHAIN_ROOT_UPDATE_REJECT;
|
|
|
- else if (strcmp(sval,"local") == 0)
|
|
|
- plugin_rootmode = CHAIN_ROOT_UPDATE_LOCAL;
|
|
|
- else if (strcmp(sval,"referral") == 0)
|
|
|
- plugin_rootmode = CHAIN_ROOT_UPDATE_REFERRAL;
|
|
|
- }
|
|
|
+ if (strcmp(sval,"reject") == 0)
|
|
|
+ plugin_rootmode = CHAIN_ROOT_UPDATE_REJECT;
|
|
|
+ else if (strcmp(sval,"local") == 0)
|
|
|
+ plugin_rootmode = CHAIN_ROOT_UPDATE_LOCAL;
|
|
|
+ else if (strcmp(sval,"referral") == 0)
|
|
|
+ plugin_rootmode = CHAIN_ROOT_UPDATE_REFERRAL;
|
|
|
+ }
|
|
|
}
|
|
|
else if (SLAPI_IS_MOD_DELETE(mods[i]->mod_op))
|
|
|
{
|