/*
check if any links need upgrading from w2k format
+
+ The parent_ctx is the ldb_message_element which contains the values array that dns[i].v points at, and which should be used for allocating any new value.
*/
-static int replmd_check_upgrade_links(struct parsed_dn *dns, uint32_t count, const struct GUID *invocation_id)
+static int replmd_check_upgrade_links(struct parsed_dn *dns, uint32_t count, struct ldb_message_element *parent_ctx, const struct GUID *invocation_id)
{
uint32_t i;
for (i=0; i<count; i++) {
}
/* it's an old one that needs upgrading */
- ret = replmd_update_la_val(dns, dns[i].v, dns[i].dsdb_dn, dns[i].dsdb_dn, invocation_id,
+ ret = replmd_update_la_val(parent_ctx->values, dns[i].v, dns[i].dsdb_dn, dns[i].dsdb_dn, invocation_id,
1, 1, 0, 0, false);
if (ret != LDB_SUCCESS) {
return ret;
talloc_free(tmp_ctx);
return LDB_ERR_OPERATIONS_ERROR;
}
-
- ret = replmd_check_upgrade_links(old_dns, old_num_values, invocation_id);
+
+ ret = replmd_check_upgrade_links(old_dns, old_num_values, old_el, invocation_id);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return ret;
return LDB_ERR_OPERATIONS_ERROR;
}
- ret = replmd_check_upgrade_links(old_dns, old_el->num_values, invocation_id);
+ ret = replmd_check_upgrade_links(old_dns, old_el->num_values, old_el, invocation_id);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return ret;
return LDB_ERR_OPERATIONS_ERROR;
}
- ret = replmd_check_upgrade_links(old_dns, old_num_values, invocation_id);
+ ret = replmd_check_upgrade_links(old_dns, old_num_values, old_el, invocation_id);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return ret;
return LDB_ERR_OPERATIONS_ERROR;
}
- ret = replmd_check_upgrade_links(pdn_list, old_el->num_values, our_invocation_id);
+ ret = replmd_check_upgrade_links(pdn_list, old_el->num_values, old_el, our_invocation_id);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return ret;