samba-tool: disable validation on removing an empty attribute in dbcheck
authorAndrew Tridgell <tridge@samba.org>
Tue, 14 Jun 2011 06:43:10 +0000 (16:43 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 14 Jun 2011 08:49:34 +0000 (10:49 +0200)
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Jun 14 10:49:34 CEST 2011 on sn-devel-104

source4/scripting/python/samba/netcmd/dbcheck.py

index 7bbd4d21b694a14b58c34ca0dc0ea5bfacd7302a..7af210104c6cca44df15f6f0e8fe66abca2d531f 100644 (file)
@@ -51,7 +51,7 @@ def empty_attribute(self, dn, attrname):
     m.dn = dn
     m[attrname] = ldb.MessageElement('', ldb.FLAG_MOD_DELETE, attrname)
     try:
-        self.samdb.modify(m, ["relax:0"])
+        self.samdb.modify(m, controls=["relax:0"], validate=False)
     except Exception, msg:
         print("Failed to remove empty attribute %s : %s" % (attrname, msg))
         return