1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

domain_update: Add an additional error with revision

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Garming Sam 2017-12-13 13:35:14 +13:00 committed by Garming Sam
parent 60b70e9540
commit b5f7677af9

View File

@ -137,7 +137,12 @@ class DomainUpdate(object):
self.check_updates_range(min_update, expected_update)
expected_version = functional_level_to_version[functional_level]
if update_revision and int(res[0]['revision'][0]) < expected_version:
found_version = int(res[0]['revision'][0])
if update_revision and found_version < expected_version:
if not self.fix:
raise DomainUpdateException("Revision is not high enough. Fix is set to False."
"\nExpected: %dGot: %d" % (expected_version,
found_version))
self.samdb.modify_ldif("""dn: %s
changetype: modify
replace: revision