summaryrefslogtreecommitdiff
path: root/source4/scripting/bin
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-02-18 15:15:52 +1100
committerStefan Metzmacher <metze@samba.org>2013-03-04 08:33:51 +0100
commit0f247dce00fd26230cdb0566ce4f51a2ea8cfc2b (patch)
tree92595973163467db0582e6bff215df3546f00e31 /source4/scripting/bin
parent9bc32bfd65700c816ebb2a3004ad568327218f86 (diff)
downloadsamba-0f247dce00fd26230cdb0566ce4f51a2ea8cfc2b.tar.gz
samba-0f247dce00fd26230cdb0566ce4f51a2ea8cfc2b.tar.bz2
samba-0f247dce00fd26230cdb0566ce4f51a2ea8cfc2b.zip
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 <metze@samba.org>
Diffstat (limited to 'source4/scripting/bin')
-rwxr-xr-xsource4/scripting/bin/samba_upgradeprovision8
1 files 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)