summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-30 10:52:55 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-02 08:16:56 +1100
commit4eecfc80bc7f305cc6c57ebc2a56f2aa354a522f (patch)
tree328b5ef190f25aaf6dac89ae7295c312b5f2502b
parent6628588dfba353c3d2948d14de2d24edfafc371d (diff)
downloadsamba-4eecfc80bc7f305cc6c57ebc2a56f2aa354a522f.tar.gz
samba-4eecfc80bc7f305cc6c57ebc2a56f2aa354a522f.tar.bz2
samba-4eecfc80bc7f305cc6c57ebc2a56f2aa354a522f.zip
s4-drs: make sure the DNs we put in the db have a extended GUID
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 991d8c314d..f12b62c14b 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -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;
}