s4/script/samba_upgradeprovision: set global dnNotToRecalculateFound var
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 10 Oct 2018 04:51:54 +0000 (17:51 +1300)
committerDouglas Bagnall <dbagnall@samba.org>
Fri, 12 Oct 2018 02:16:22 +0000 (04:16 +0200)
as probably intended. Without this the local variable shadows the
global one and is never used while the global one is never changed.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <noel.power@suse.com>
source4/scripting/bin/samba_upgradeprovision

index 51f14a02ee9e7af128fbaf63e9c2d05a9b836d78..df7a8e01721e05f9b5ab9be40e0ebcb9ada83238 100755 (executable)
@@ -904,6 +904,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")
+                    global dnNotToRecalculateFound
                     dnNotToRecalculateFound = True
                 else:
                     dnToRecalculate.append(dn)
@@ -1806,7 +1807,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 dnNotToRecalculateFound is False 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)