s4-dbchecker: fixed handling of DSDB DNs in dbcheck
authorAndrew Tridgell <tridge@samba.org>
Fri, 23 Sep 2011 07:37:23 +0000 (17:37 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 4 Oct 2011 04:08:56 +0000 (15:08 +1100)
we need to use the original value, as ldb.Dn() can't parse a DSDB
binary DN

source4/scripting/python/samba/dbchecker.py

index 03303b8ab6ed67ef29ee1e0d86df7150812f535e..ea5a9030c62868bceebe1dfe63b3d99f85285502 100644 (file)
@@ -256,7 +256,7 @@ class dbcheck(object):
             return
         m = ldb.Message()
         m.dn = dn
-        m['old_value'] = ldb.MessageElement(str(ldb.Dn(self.samdb, val)), ldb.FLAG_MOD_DELETE, attrname)
+        m['old_value'] = ldb.MessageElement(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_recycled:1"],
                           "Failed to fix incorrect DN string on attribute %s" % attrname):