From d48237d547470e064b7f5fb464758e7e9eaae17d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 28 Dec 2009 17:22:12 +1100 Subject: [PATCH] s4-drs: re-resolve the DN in linked attribute processing w2k8-r2 sometimes sends the DN with an old target --- source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index b9d9a744f1b..991d8c314d3 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) { -- 2.34.1