From bd228f98588919880ca3a9e4c1f23e17ce78aca5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 23 Sep 2010 19:48:03 -0700 Subject: s4-repl: don't store repsFrom on DNs other than NC heads we don't want a refsFrom on the Rid Manage$ DN Pair-Programmed-With: Anatoliy Atanasov --- source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source4') diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index 1712c03feb..5fdcf9b166 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -3305,6 +3305,7 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a time_t t = time(NULL); NTTIME now; int ret; + uint32_t instanceType; ldb = ldb_module_get_ctx(ar->module); ruv = ar->objs->uptodateness_vector; @@ -3315,6 +3316,13 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a unix_to_nt_time(&now, t); + instanceType = ldb_msg_find_attr_as_uint(ar->search_msg, "instanceType", 0); + if (! (instanceType & INSTANCE_TYPE_IS_NC_HEAD)) { + DEBUG(4,(__location__ ": Skipping UDV and repsFrom update as not NC root: %s\n", + ldb_dn_get_linearized(ar->search_msg->dn))); + return ldb_module_done(ar->req, NULL, NULL, LDB_SUCCESS); + } + /* * first create the new replUpToDateVector */ @@ -3613,6 +3621,7 @@ static int replmd_replicated_uptodate_vector(struct replmd_replicated_request *a static const char *attrs[] = { "replUpToDateVector", "repsFrom", + "instanceType", NULL }; struct ldb_request *search_req; -- cgit