samba_upgradeprovision: Remove alwaysRecalculate, this is too dangerous
authorAndrew Bartlett <abartlet@samba.org>
Mon, 18 Feb 2013 02:00:31 +0000 (13:00 +1100)
committerStefan Metzmacher <metze@samba.org>
Mon, 4 Mar 2013 07:33:33 +0000 (08:33 +0100)
I am unclear on why this was added, but the idea that we ever always reset data
in the directory is not reasonable to me, so I am removing it.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/scripting/bin/samba_upgradeprovision

index 0eacf1d6d68cbe7e46901b1b63c8de066ffad7fd..6b5df1e20166dc19ff46854830453e8a33b10d98 100755 (executable)
@@ -1226,9 +1226,6 @@ def fix_wellknown_sd(samdb, names):
     :param samdb: An LDB object pointing to the sam of the current provision
     :param names: A list of key provision parameters
     """
-    alwaysRecalculate = False
-    if len(dnToRecalculate) == 0 and len(dnNotToRecalculate) == 0:
-        alwaysRecalculate = True
 
     list_wellknown_dns = []
 
@@ -1287,7 +1284,7 @@ def fix_wellknown_sd(samdb, names):
 
     for [dn, descriptor_fn] in subcontainers:
         list_wellknown_dns.append(dn)
-        if alwaysRecalculate or dn in dnToRecalculate:
+        if dn in dnToRecalculate:
             delta = Message()
             delta.dn = Dn(samdb, str(dn))
             descr = descriptor_fn(names.domainsid, name_map=names.name_map)