diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-09-16 11:13:05 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-09-19 10:57:02 +1000 |
commit | cea37b0d6d0f5f32fdfafd160dfbcf2c5dccdb12 (patch) | |
tree | fa979c441fde325d05412d4160d96b7047d9797b /source4/dsdb/samdb | |
parent | aa960d8fa70ab243e97eed5d7bb7a47f4386487c (diff) | |
download | samba-cea37b0d6d0f5f32fdfafd160dfbcf2c5dccdb12.tar.gz samba-cea37b0d6d0f5f32fdfafd160dfbcf2c5dccdb12.tar.bz2 samba-cea37b0d6d0f5f32fdfafd160dfbcf2c5dccdb12.zip |
s4-drs: cope with REPL_OBJ getncchanges call for new object
when we do a subdomain join we create a new object using a REPL_OBJ
getncchanges call for the partitions DN. This has a side effect of
creating that object. We need to skip the UDV update in that case
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index e50e2a06ca..3b4e2804a3 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -3972,6 +3972,15 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a unix_to_nt_time(&now, t); + if (ar->search_msg == NULL) { + /* this happens for a REPL_OBJ call where we are + creating the target object by replicating it. The + subdomain join code does this for the partition DN + */ + DEBUG(4,(__location__ ": Skipping UDV and repsFrom update as no target DN\n")); + return ldb_module_done(ar->req, NULL, NULL, LDB_SUCCESS); + } + 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", @@ -4251,11 +4260,7 @@ static int replmd_replicated_uptodate_search_callback(struct ldb_request *req, break; case LDB_REPLY_DONE: - if (ar->search_msg == NULL) { - ret = replmd_replicated_request_werror(ar, WERR_DS_DRA_INTERNAL_ERROR); - } else { - ret = replmd_replicated_uptodate_modify(ar); - } + ret = replmd_replicated_uptodate_modify(ar); if (ret != LDB_SUCCESS) { return ldb_module_done(ar->req, NULL, NULL, ret); } |