summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-23 19:48:03 -0700
committerAndrew Tridgell <tridge@samba.org>2010-09-25 10:38:45 -0700
commitbd228f98588919880ca3a9e4c1f23e17ce78aca5 (patch)
treecf57d093d561b1654ccf98553b402ae9a5477e59 /source4
parent781796c557025f4bf8c62b903acc1be64acc35b8 (diff)
downloadsamba-bd228f98588919880ca3a9e4c1f23e17ce78aca5.tar.gz
samba-bd228f98588919880ca3a9e4c1f23e17ce78aca5.tar.bz2
samba-bd228f98588919880ca3a9e4c1f23e17ce78aca5.zip
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 <anatoliy.atanasov@postpath.com>
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c9
1 files changed, 9 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 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;