1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +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 used to be commit ca1c463360)
This commit is contained in:
Tim Potter
2003-08-12 00:46:15 +00:00
parent 102de75a7c
commit dffd0f379f
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);