diff options
author | Noel Power <noel.power@suse.com> | 2018-11-28 14:06:54 +0000 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2018-12-10 10:38:21 +0100 |
commit | 0d73a2b0a29c108c3a0efbbe0473142046302b71 (patch) | |
tree | 7d817da50c2278b4f61abfb6501b60c2d47fd722 /source4 | |
parent | d253e84a41b9f18243d57c41656d28fcd07e476a (diff) | |
download | samba-0d73a2b0a29c108c3a0efbbe0473142046302b71.tar.gz |
PY3: net.change_password & net.set_password take string not bytes
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/dsdb/tests/python/password_lockout.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/dsdb/tests/python/password_lockout.py b/source4/dsdb/tests/python/password_lockout.py index bc0613b71b1..415f8f7065e 100755 --- a/source4/dsdb/tests/python/password_lockout.py +++ b/source4/dsdb/tests/python/password_lockout.py @@ -662,7 +662,7 @@ userPassword: thatsAcomplPASS2XYZ # prove we can change the user password (using the correct password) new_password = "thatsAcomplPASS2" - net.change_password(newpassword=new_password.encode('utf-8'), + net.change_password(newpassword=new_password, username=username, oldpassword=creds.get_password()) creds.set_password(new_password) @@ -673,7 +673,7 @@ userPassword: thatsAcomplPASS2XYZ badPwdCount = i + 1 try: print("Trying bad password, attempt #%u" % badPwdCount) - net.change_password(newpassword=new_password.encode('utf-8'), + net.change_password(newpassword=new_password, username=creds.get_username(), oldpassword="bad-password") self.fail("Invalid SAMR change_password accepted") @@ -707,7 +707,7 @@ userPassword: thatsAcomplPASS2XYZ for password in (creds.get_password(), "bad-password"): try: print("Trying password %s" % password) - net.change_password(newpassword=new_password.encode('utf-8'), + net.change_password(newpassword=new_password, username=creds.get_username(), oldpassword=password) self.fail("Invalid SAMR change_password accepted") @@ -740,7 +740,7 @@ userPassword: thatsAcomplPASS2XYZ msDSUserAccountControlComputed=0) # check we can change the user password successfully now - net.change_password(newpassword=new_password.encode('utf-8'), + net.change_password(newpassword=new_password, username=username, oldpassword=creds.get_password()) creds.set_password(new_password) |