diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-03-13 23:12:39 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-05-02 01:19:19 +0200 |
commit | 821d7dc7b33598f72c4518f8975073b058df5960 (patch) | |
tree | 7fbccdcb52e6ab15f64315d6bc8616a0b654ff44 /python/samba | |
parent | 7f03a94ffa3752ccdb28cc50033b4e2a26e2b3f2 (diff) | |
download | samba-821d7dc7b33598f72c4518f8975073b058df5960.tar.gz samba-821d7dc7b33598f72c4518f8975073b058df5960.tar.xz samba-821d7dc7b33598f72c4518f8975073b058df5960.zip |
dbchecker: make the deleted objects container detection more generic
Change-Id: I282ad887c41412e25fdf73476e405f4e88e0b239
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba')
-rw-r--r-- | python/samba/dbchecker.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py index f276cc56430..26398cf3aab 100644 --- a/python/samba/dbchecker.py +++ b/python/samba/dbchecker.py @@ -1043,6 +1043,13 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base))) got_repl_property_meta_data = False got_objectclass = False + nc_dn = self.samdb.get_nc_root(obj.dn) + try: + deleted_objects_dn = self.samdb.get_wellknown_dn(nc_dn, + samba.dsdb.DS_GUID_DELETED_OBJECTS_CONTAINER) + except KeyError, e: + deleted_objects_dn = ldb.Dn(self.samdb, "CN=Deleted Objects,%s" % nc_dn) + for attrname in obj: if attrname == 'dn': continue @@ -1143,8 +1150,7 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base))) show_dn = True if got_repl_property_meta_data: - rdn = (str(dn).split(","))[0] - if rdn == "CN=Deleted Objects": + if obj.dn == deleted_objects_dn: isDeletedAttId = 131120 # It's 29/12/9999 at 23:59:59 UTC as specified in MS-ADTS 7.1.1.4.2 Deleted Objects Container |