+
+
+
+def sync_calculated_attributes(samdb, names):
+ """Synchronize attributes used for constructed ones, with the
+ old constructed that were stored in the database.
+
+ This apply for instance to msds-keyversionnumber that was
+ stored and that is now constructed from replpropertymetadata.
+
+ :param samdb: An LDB object attached to the currently upgraded samdb
+ :param names: Various key parameter about current provision.
+ """
+ listAttrs = ["msDs-KeyVersionAttribute"]
+ hash = search_constructed_attrs_stored(samdb, names.rootdn, listAttrs)
+ increment_calculated_keyversion_number(samdb, names.rootdn, hash)
+