s4/libnet: Allow passwords containing non ascii characters to be passed
authorNoel Power <noel.power@suse.com>
Wed, 16 May 2018 15:46:41 +0000 (16:46 +0100)
committerNoel Power <npower@samba.org>
Thu, 17 May 2018 09:31:28 +0000 (11:31 +0200)
commit75e1019f6162814eae3edb050d41784179cfa8ab
tree6c851663fd3626d1720841dfa07f9fb8ad8fcc33
parenta8d8c6ec439fb64ce33dc2406bb38792050ca3a1
s4/libnet: Allow passwords containing non ascii characters to be passed

Although we can pass unicode to py_net_change_password unfortunately in
Python2 unicode strings are encoded with the default encoding (e.g. ascii)
 when extracting the unicode string to buffer.
In Python3 the default encoding for "s" format is utf8. Use the "es"
format instead of "s" so we can specify the encoding so behaviour is
correct in py2/py3.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/libnet/py_net.c