[PATCH] samba-tool dbcheck: handle missing objectClass

Stefan (metze) Metzmacher metze at samba.org
Fri Mar 21 01:58:05 MDT 2014


Hi Felix,

> +    def err_missing_objectclass(self, dn):
> +        """handle object without objectclass"""
> +        self.report("ERROR: missing objectclass in object %s" % (dn))
> +        if not self.confirm_all("Delete object'%s'?" % dn, 'fix_all_missing_objectclass'):
> +            self.report("Not deleting object with missing objectclass '%s'" % dn)
> +            return
> +        if self.do_delete(dn, ["local_oid:%s:0" % dsdb.DSDB_CONTROL_DBCHECK],
> +                          "Failed to remove DN %s" % dn):
> +            self.report("Removed DN %s" % dn)

do_delete aleady adds DSDB_CONTROL_DBCHECK.

I'm wondering if it would be possible to reconstruct the objectClass
based on the objectCategory?

metze


More information about the samba-technical mailing list