dbcheck: use string DN in delete when fixing broken strings DNs
authorAndrew Tridgell <tridge@samba.org>
Thu, 14 Jul 2011 04:02:38 +0000 (14:02 +1000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 21 Jul 2011 01:44:37 +0000 (11:44 +1000)
this prevents the extended_dn_in module from 'fixing' the DN for us

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/scripting/python/samba/dbchecker.py

index a1836cf98ef621ed5ea442ceb4dc828d1114d2a5..b16b75aa165c2fa1ed4eecc5d987bdf5b5acd03e 100644 (file)
@@ -246,7 +246,7 @@ class dbcheck(object):
             return
         m = ldb.Message()
         m.dn = dn
-        m['old_value'] = ldb.MessageElement(val, ldb.FLAG_MOD_DELETE, attrname)
+        m['old_value'] = ldb.MessageElement(str(ldb.Dn(self.samdb, val)), ldb.FLAG_MOD_DELETE, attrname)
         m['new_value'] = ldb.MessageElement(str(dsdb_dn), ldb.FLAG_MOD_ADD, attrname)
         if self.do_modify(m, ["show_deleted:1"],
                           "Failed to fix incorrect DN string on attribute %s" % attrname):