diff options
Diffstat (limited to 'source3/python')
-rw-r--r-- | source3/python/py_winbind.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/python/py_winbind.c b/source3/python/py_winbind.c index ebceb95d71..6050cfb2a7 100644 --- a/source3/python/py_winbind.c +++ b/source3/python/py_winbind.c @@ -427,7 +427,10 @@ static PyObject *py_auth_crap(PyObject *self, PyObject *args, PyObject *kw) ZERO_STRUCT(request); ZERO_STRUCT(response); - fstrcpy(request.data.auth_crap.user, username); + if (push_utf8_fstring(request.data.auth_crap.user, username) == -1) { + PyErr_SetString("unable to create utf8 string"); + return NULL; + } generate_random_buffer(request.data.auth_crap.chal, 8, False); @@ -473,7 +476,10 @@ static PyObject *py_auth_smbd(PyObject *self, PyObject *args, PyObject *kw) ZERO_STRUCT(request); ZERO_STRUCT(response); - fstrcpy(request.data.smbd_auth_crap.user, username); + if (push_utf8_fstring(request.data.auth_crap.user, username) == -1) { + PyErr_SetString("unable to create utf8 string"); + return NULL; + } generate_random_buffer(request.data.smbd_auth_crap.chal, 8, False); |