diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-10-01 10:24:46 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-10-01 10:44:24 -0700 |
commit | 4beff4d7ba6709009ad81e3becb691b9d81e5611 (patch) | |
tree | 79b8307f720de5344e40a9914c05d843e7525fea | |
parent | 9cdebd0ebcbf9b890679fa77ce6d8e0127fce28e (diff) | |
download | samba-4beff4d7ba6709009ad81e3becb691b9d81e5611.tar.gz samba-4beff4d7ba6709009ad81e3becb691b9d81e5611.tar.xz samba-4beff4d7ba6709009ad81e3becb691b9d81e5611.zip |
s4-dsdb: fail the transaction instead of asserting on error
It is more useful to fail the transaction and give the user an error
message than to assert when we have an error in the repl_meta_data
module
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index ebd005e46ef..17dcba5929b 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -2981,9 +2981,17 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar) md_remote = replmd_replPropertyMetaData1_find_attid(rmd, DRSUAPI_ATTRIBUTE_name); if (md_remote) { md_local = replmd_replPropertyMetaData1_find_attid(&omd, DRSUAPI_ATTRIBUTE_name); - SMB_ASSERT(md_local); + if (!md_local) { + DEBUG(0,(__location__ ": No md_local in RPMD\n")); + return replmd_replicated_request_werror(ar, WERR_DS_DRA_INTERNAL_ERROR); + } if (replmd_replPropertyMetaData1_is_newer(md_local, md_remote)) { - SMB_ASSERT(ldb_dn_compare(msg->dn, ar->search_msg->dn) != 0); + if (ldb_dn_compare(msg->dn, ar->search_msg->dn) != 0) { + DEBUG(0,(__location__ ": DNs don't match in RPMD: %s %s\n", + ldb_dn_get_linearized(msg->dn), + ldb_dn_get_linearized(ar->search_msg->dn))); + return replmd_replicated_request_werror(ar, WERR_DS_DRA_INTERNAL_ERROR); + } /* TODO: Find appropriate local name (dn) for the object * and modify msg->dn appropriately */ |