python/samba/netcmd: net.change_password should be passed string
authorNoel Power <noel.power@suse.com>
Wed, 16 May 2018 15:51:34 +0000 (16:51 +0100)
committerNoel Power <npower@samba.org>
Thu, 17 May 2018 09:31:29 +0000 (11:31 +0200)
commite7144f2e115f7d446de880a5680c2f2f02dd9467
tree5f31a0ebd675a94bd341f25d068a78589d1b1a33
parent75e1019f6162814eae3edb050d41784179cfa8ab
python/samba/netcmd:  net.change_password should be passed string

password param which in python2 (is str) is incorrectly encoded
before passing to net.change_password.

python2 - password is either unicode or str, if str we should
          decode to get unicode (and then pass to net.change_password).
python3 - password is either str or bytes, if bytes then decode
          (and pass as 'str' to net.change_password).
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/netcmd/user.py