diff options
author | Matthieu Patou <mat@matws.net> | 2011-06-13 17:13:26 +0400 |
---|---|---|
committer | Matthieu Patou <mat@samba.org> | 2011-06-19 23:21:08 +0200 |
commit | 0065742909453f85709635aa44787b6998cccfc3 (patch) | |
tree | 767d3ee8ff1e7e33a293ad2b56d26bdc1f45e0a3 /source4/scripting/bin | |
parent | 45df4d81ed37f6d470e3f42a310a6e5f0afa06bf (diff) | |
download | samba-0065742909453f85709635aa44787b6998cccfc3.tar.gz samba-0065742909453f85709635aa44787b6998cccfc3.tar.bz2 samba-0065742909453f85709635aa44787b6998cccfc3.zip |
s4-upgradeprovision: handle_special_attributes don't really need ranges of USNs, just the information if we are using replPropertyMetadata for attribute selection
Diffstat (limited to 'source4/scripting/bin')
-rwxr-xr-x | source4/scripting/bin/upgradeprovision | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision index 9d3b683940..c625625c44 100755 --- a/source4/scripting/bin/upgradeprovision +++ b/source4/scripting/bin/upgradeprovision @@ -297,7 +297,7 @@ def print_provision_key_parameters(names): message(GUESS, "domainlevel :" + str(names.domainlevel)) -def handle_special_case(att, delta, new, old, usn, basedn, aldb): +def handle_special_case(att, delta, new, old, useReplMetadata, basedn, aldb): """Define more complicate update rules for some attributes :param att: The attribute to be updated @@ -305,7 +305,8 @@ def handle_special_case(att, delta, new, old, usn, basedn, aldb): between the updated object and the reference one :param new: The reference object :param old: The Updated object - :param usn: The highest usn modified by a previous (upgrade)provision + :param useReplMetadata: A boolean that indicate if the update process + use replPropertyMetaData to decide what has to be updated. :param basedn: The base DN of the provision :param aldb: An ldb object used to build DN :return: True to indicate that the attribute should be kept, False for @@ -315,7 +316,7 @@ def handle_special_case(att, delta, new, old, usn, basedn, aldb): # We do most of the special case handle if we do not have the # highest usn as otherwise the replPropertyMetaData will guide us more # correctly - if usn is None: + if not useReplMetadata: if (att == "sPNMappings" and flag == FLAG_MOD_REPLACE and ldb.Dn(aldb, "CN=Directory Service,CN=Windows NT," "CN=Services,CN=Configuration,%s" % basedn) @@ -889,7 +890,7 @@ def update_present(ref_samdb, samdb, basedn, listPresent, usns, invocationid): # idea to change it delta.remove(att) continue - if handle_special_case(att, delta, reference, current, usns, basedn, samdb): + if handle_special_case(att, delta, reference, current, True, basedn, samdb): # This attribute is "complicated" to handle and handling # was done in handle_special_case continue @@ -959,7 +960,7 @@ def update_present(ref_samdb, samdb, basedn, listPresent, usns, invocationid): if not hashOverwrittenAtt.has_key(att): if msgElt.flags() != FLAG_MOD_ADD: if not handle_special_case(att, delta, reference, current, - usns, basedn, samdb): + False, basedn, samdb): if opts.debugchange or opts.debugall: try: dump_denied_change(dn, att, |