mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
auth/credentials: py2/py3 credential key needs to return bytes
new_client_authenticator returns a dictionary. The key 'credential' needs to return bytes in Python3, without this change the the code will attempt to convert the binary data to a string (resulting sometimes in decode errors). Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
8970ec195c
commit
3fd9b77ad4
@ -659,7 +659,7 @@ static PyObject *py_creds_new_client_authenticator(PyObject *self,
|
||||
netlogon_creds_client_authenticator(
|
||||
nc,
|
||||
&auth);
|
||||
ret = Py_BuildValue("{ss#si}",
|
||||
ret = Py_BuildValue("{s"PYARG_BYTES_LEN"si}",
|
||||
"credential",
|
||||
(const char *) &auth.cred, sizeof(auth.cred),
|
||||
"timestamp", auth.timestamp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user