summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2018-05-09 16:09:00 +0100
committerAndrew Bartlett <abartlet@samba.org>2018-09-05 23:27:12 +0200
commit3fd9b77ad49aa8c482c15f7b408c3599c157716b (patch)
tree87171818e55e375e7993f30a77bb3247030bc7a2 /auth
parent8970ec195c6a3a18486bd7f4fada3adf90ff8f13 (diff)
downloadsamba-3fd9b77ad49aa8c482c15f7b408c3599c157716b.tar.gz
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>
Diffstat (limited to 'auth')
-rw-r--r--auth/credentials/pycredentials.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/auth/credentials/pycredentials.c b/auth/credentials/pycredentials.c
index c626e3fa8a0..56174fefbb4 100644
--- a/auth/credentials/pycredentials.c
+++ b/auth/credentials/pycredentials.c
@@ -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);