mirror of
https://github.com/samba-team/samba.git
synced 2025-03-22 02:50:28 +03:00
s4-drs: make sure the DNs we put in the db have a extended GUID
This commit is contained in:
parent
6628588dfb
commit
4eecfc80bc
@ -609,13 +609,6 @@ static int replmd_add_fix_la(struct ldb_module *module, struct ldb_message_eleme
|
||||
NTSTATUS status;
|
||||
int ret;
|
||||
|
||||
ret = replmd_build_la_val(el->values, v, dsdb_dn, invocationId,
|
||||
seq_num, seq_num, now, 0, false);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
talloc_free(tmp_ctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* note that the DN already has the extended
|
||||
components from the extended_dn_store module */
|
||||
status = dsdb_get_extended_dn_guid(dsdb_dn->dn, &target_guid, "GUID");
|
||||
@ -625,6 +618,18 @@ static int replmd_add_fix_la(struct ldb_module *module, struct ldb_message_eleme
|
||||
talloc_free(tmp_ctx);
|
||||
return ret;
|
||||
}
|
||||
ret = dsdb_set_extended_dn_guid(dsdb_dn->dn, &target_guid, "GUID");
|
||||
if (ret != LDB_SUCCESS) {
|
||||
talloc_free(tmp_ctx);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = replmd_build_la_val(el->values, v, dsdb_dn, invocationId,
|
||||
seq_num, seq_num, now, 0, false);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
talloc_free(tmp_ctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = replmd_add_backlink(module, schema, guid, &target_guid, true, sa, false);
|
||||
@ -1178,6 +1183,10 @@ static int get_parsed_dns(struct ldb_module *module, TALLOC_CTX *mem_ctx,
|
||||
ldb_dn_get_linearized(dn));
|
||||
return ret;
|
||||
}
|
||||
ret = dsdb_set_extended_dn_guid(dn, p->guid, "GUID");
|
||||
if (ret != LDB_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
} else if (!NT_STATUS_IS_OK(status)) {
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user