1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

provision: Ignore duplicate attid and governsID check

During the provision this causes a huge performance hit as these two
attributes are unindexed.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
Bob Campbell
2016-06-30 15:03:39 +12:00
committed by Andrew Bartlett
parent c76b0090ae
commit 6e378546ce
6 changed files with 43 additions and 10 deletions

View File

@ -142,6 +142,8 @@ class dbcheck(object):
error_count += self.check_deleted_objects_containers()
self.attribute_or_class_ids = set()
for object in res:
self.dn_set.add(str(object.dn))
error_count += self.check_object(object.dn, attrs=attrs)
@ -1557,6 +1559,14 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
self.err_doubled_userParameters(obj, attrname, obj[attrname])
continue
if attrname.lower() == 'attributeid' or attrname.lower() == 'governsid':
if obj[attrname][0] in self.attribute_or_class_ids:
error_count += 1
self.report('Error: %s %s on %s already exists as an attributeId or governsId'
% (attrname, obj.dn, obj[attrname][0]))
else:
self.attribute_or_class_ids.add(obj[attrname][0])
# check for empty attributes
for val in obj[attrname]:
if val == '':