summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-28 17:22:12 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-02 08:16:54 +1100
commitd48237d547470e064b7f5fb464758e7e9eaae17d (patch)
tree6f01e28b9a1d26cdf7c5e888a8cc23be4c59c804 /source4/dsdb/samdb
parent5dd6e089f136d3ce04127b930da59913704bf083 (diff)
downloadsamba-d48237d547470e064b7f5fb464758e7e9eaae17d.tar.gz
samba-d48237d547470e064b7f5fb464758e7e9eaae17d.tar.bz2
samba-d48237d547470e064b7f5fb464758e7e9eaae17d.zip
s4-drs: re-resolve the DN in linked attribute processing
w2k8-r2 sometimes sends the DN with an old target
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index b9d9a744f1..991d8c314d 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -3471,6 +3471,16 @@ linked_attributes[0]:
return LDB_ERR_OPERATIONS_ERROR;
}
+ /* re-resolve the DN by GUID, as the DRS server may give us an
+ old DN value */
+ ret = dsdb_module_dn_by_guid(module, dsdb_dn, &guid, &dsdb_dn->dn);
+ if (ret != LDB_SUCCESS) {
+ ldb_asprintf_errstring(ldb, __location__ ": Failed to re-resolve GUID %s",
+ GUID_string(tmp_ctx, &guid));
+ talloc_free(tmp_ctx);
+ return ret;
+ }
+
/* see if this link already exists */
pdn = parsed_dn_find(pdn_list, old_el->num_values, &guid, dsdb_dn->dn);
if (pdn != NULL) {