From 0f247dce00fd26230cdb0566ce4f51a2ea8cfc2b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 18 Feb 2013 15:15:52 +1100 Subject: samba_upgradeprovision: do not maintain dnNotToRecalculate as a list We only need a boolean indication, not the actual values. Andrew Bartlett Reviewed-by: Stefan Metzmacher --- source4/scripting/bin/samba_upgradeprovision | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source4/scripting/bin/samba_upgradeprovision b/source4/scripting/bin/samba_upgradeprovision index c3c0c4e8f9..cc8c633451 100755 --- a/source4/scripting/bin/samba_upgradeprovision +++ b/source4/scripting/bin/samba_upgradeprovision @@ -149,7 +149,7 @@ hashOverwrittenAtt = { "prefixMap": replace, "systemMayContain": replace, "attributeDisplayNames": replace + add, "versionNumber": add} -dnNotToRecalculate = [] +dnNotToRecalculateFound = False dnToRecalculate = [] backlinked = [] forwardlinked = set() @@ -919,7 +919,7 @@ def checkKeepAttributeWithMetadata(delta, att, message, reference, current, message(CHANGESD, "But the SD has been changed by someonelse " "so it's impossible to know if the difference" " cames from the modification or from a previous bug") - dnNotToRecalculate.append(str(dn)) + dnNotToRecalculateFound = True else: dnToRecalculate.append(str(dn)) continue @@ -1333,8 +1333,6 @@ def rebuild_sd(samdb, names): # well known SDs have already been reset if key in listWellknown: continue - if key in dnNotToRecalculate: - continue delta = Message() delta.dn = Dn(samdb, key) sd_flags = SECINFO_OWNER | SECINFO_GROUP | SECINFO_DACL | SECINFO_SACL @@ -1872,7 +1870,7 @@ if __name__ == '__main__': # as we are assured that on this DNs we will have differences ! # Also the check must be done in a clever way as for the moment we just # compare SDDL - if len(dnNotToRecalculate) == 0 and (opts.debugchangesd or opts.debugall): + if dnNotToRecalculateFound == False and (opts.debugchangesd or opts.debugall): message(CHANGESD, "Checking recalculated SDs") check_updated_sd(new_ldbs.sam, ldbs.sam, names) -- cgit