diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2012-01-30 17:20:28 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-02-13 09:49:20 +1100 |
commit | 05f9495ff36c2335ff9c69ea408cd9328f6cc6e6 (patch) | |
tree | e0ed11873313f7b660ed187c2990424d693a0398 /source4/scripting/python | |
parent | 1e46ccba5ada1be310be4bbf4a954df73cde6c3a (diff) | |
download | samba-05f9495ff36c2335ff9c69ea408cd9328f6cc6e6.tar.gz samba-05f9495ff36c2335ff9c69ea408cd9328f6cc6e6.tar.bz2 samba-05f9495ff36c2335ff9c69ea408cd9328f6cc6e6.zip |
s4:join python code - "msDS-KeyVersionNumber" does not exist on Win2k
No problem since "secretsdb_self_join()" then chooses 1 as a default
value.
Fix case sensitivity for "msDS-KeyVersionNumber".
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/join.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/join.py b/source4/scripting/python/samba/join.py index dc09b46059..b695277db3 100644 --- a/source4/scripting/python/samba/join.py +++ b/source4/scripting/python/samba/join.py @@ -506,8 +506,12 @@ class dc_join(object): domain_name=ctx.domain_name, newpassword=ctx.acct_pass) - res = ctx.samdb.search(base=ctx.acct_dn, scope=ldb.SCOPE_BASE, attrs=["msDS-keyVersionNumber"]) - ctx.key_version_number = int(res[0]["msDS-keyVersionNumber"][0]) + res = ctx.samdb.search(base=ctx.acct_dn, scope=ldb.SCOPE_BASE, + attrs=["msDS-KeyVersionNumber"]) + if "msDS-KeyVersionNumber" in res[0]: + ctx.key_version_number = int(res[0]["msDS-KeyVersionNumber"][0]) + else: + ctx.key_version_number = None print("Enabling account") m = ldb.Message() |