1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

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>
This commit is contained in:
Stefan Metzmacher 2014-03-13 23:12:39 +01:00 committed by Andrew Bartlett
parent 7f03a94ffa
commit 821d7dc7b3

View File

@ -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