summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-02 11:20:26 +1000
committerAndrew Tridgell <tridge@samba.org>2009-09-02 18:19:55 +1000
commit4b336fed94b953cd78087a1ffcf75b65cb846c0f (patch)
treee25f04cf362d0ef3f1edd6f1a11432a81afe45a8 /source4
parenta19ad210332008c25e24dd6aba6a3479ba9ffe3f (diff)
downloadsamba-4b336fed94b953cd78087a1ffcf75b65cb846c0f.tar.gz
samba-4b336fed94b953cd78087a1ffcf75b65cb846c0f.tar.bz2
samba-4b336fed94b953cd78087a1ffcf75b65cb846c0f.zip
Display ldif formatted versions of all DRS changes at log level 4
This helps a lot with debugging the DRS replication code
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c18
1 files changed, 18 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 5d4c486d9a..4508882dd5 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -658,6 +658,12 @@ static int replmd_replicated_apply_add(struct replmd_replicated_request *ar)
replmd_ldb_message_sort(msg, ar->schema);
+ if (DEBUGLVL(4)) {
+ char *s = ldb_ldif_message_string(ldb, ar, LDB_CHANGETYPE_ADD, msg);
+ DEBUG(4, ("DRS replication add message:\n%s\n", s));
+ talloc_free(s);
+ }
+
ret = ldb_build_add_req(&change_req,
ldb,
ar,
@@ -905,6 +911,12 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar)
msg->elements[i].flags = LDB_FLAG_MOD_REPLACE;
}
+ if (DEBUGLVL(4)) {
+ char *s = ldb_ldif_message_string(ldb, ar, LDB_CHANGETYPE_MODIFY, msg);
+ DEBUG(4, ("DRS replication modify message:\n%s\n", s));
+ talloc_free(s);
+ }
+
ret = ldb_build_mod_req(&change_req,
ldb,
ar,
@@ -1312,6 +1324,12 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a
*/
nrf_el->flags = LDB_FLAG_MOD_REPLACE;
+ if (DEBUGLVL(4)) {
+ char *s = ldb_ldif_message_string(ldb, ar, LDB_CHANGETYPE_MODIFY, msg);
+ DEBUG(4, ("DRS replication uptodate modify message:\n%s\n", s));
+ talloc_free(s);
+ }
+
/* prepare the ldb_modify() request */
ret = ldb_build_mod_req(&change_req,
ldb,