]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
dbchecker: improve verbose output of do_modify()
authorStefan Metzmacher <metze@samba.org>
Mon, 8 Oct 2018 15:14:28 +0000 (17:14 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 5 Nov 2018 08:33:28 +0000 (09:33 +0100)
This makes it easier to debug dbcheck problems.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13418

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit c5c99b569569ce36cac94e967ca53e3182abd6f7)

python/samba/dbchecker.py

index 34856108a227b0d667bd2114c2a5ecdd82048752..189230503aca7808c1ddc618d7c41cc9a330d8f9 100644 (file)
@@ -378,10 +378,11 @@ systemFlags: -1946157056%s""" % (dn, guid_suffix),
 
     def do_modify(self, m, controls, msg, validate=True):
         '''perform a modify with optional verbose output'''
+        controls = controls + ["local_oid:%s:0" % dsdb.DSDB_CONTROL_DBCHECK]
         if self.verbose:
             self.report(self.samdb.write_ldif(m, ldb.CHANGETYPE_MODIFY))
+            self.report("controls: %r" % controls)
         try:
-            controls = controls + ["local_oid:%s:0" % dsdb.DSDB_CONTROL_DBCHECK]
             self.samdb.modify(m, controls=controls, validate=validate)
         except Exception, err:
             if self.in_transaction: