1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-27 07:42:04 +03:00

Fix for bug 269. Change wbinfo and ntlm_auth to convert domain, username

and workstation to utf8 before sending the winbindd request.  Also, don't
continue when the call to pull_utf8() fails but rather return a winbind
error.  (This is what was causing the crash)
This commit is contained in:
Tim Potter
-
parent ba075ff03a
commit ca1c463360
4 changed files with 45 additions and 12 deletions

View File

@ -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);