mirror of
https://github.com/samba-team/samba.git
synced 2025-07-16 20:59:12 +03:00
s4 upgradeprovision: Fixes for increment_keyversion
fix
This commit is contained in:
@ -732,6 +732,7 @@ def increment_calculated_keyversion_number(samdb, rootdn, hashDns):
|
||||
scope=SCOPE_SUBTREE, attrs=["msDs-KeyVersionNumber"],
|
||||
controls=["search_options:1:2"])
|
||||
done = 0
|
||||
hashDone = {}
|
||||
if len(entry) == 0:
|
||||
raise ProvisioningError("Unable to find msDs-KeyVersionNumber")
|
||||
else:
|
||||
@ -739,7 +740,7 @@ def increment_calculated_keyversion_number(samdb, rootdn, hashDns):
|
||||
if hashDns.has_key(str(e.dn).lower()):
|
||||
val = e.get("msDs-KeyVersionNumber")
|
||||
if not val:
|
||||
continue
|
||||
val = "0"
|
||||
version = int(str(hashDns[str(e.dn).lower()]))
|
||||
if int(str(val)) < version:
|
||||
done = done + 1
|
||||
|
Reference in New Issue
Block a user