1
0
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:
Matthieu Patou
2010-08-10 18:19:40 +04:00
parent 503824b757
commit 3e49b20cf0
3 changed files with 22 additions and 3 deletions

View File

@ -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