summaryrefslogtreecommitdiff
path: root/source3/python
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-08-12 00:46:15 +0000
committerTim Potter <tpot@samba.org>2003-08-12 00:46:15 +0000
commitdffd0f379fdbb74533ceab18d199302f3b15a7c9 (patch)
tree07fe79a13ddd865a2fa1b2010525e6bda2fe0557 /source3/python
parent102de75a7ca4055dee21610061429e100cfc5699 (diff)
downloadsamba-dffd0f379fdbb74533ceab18d199302f3b15a7c9.tar.gz
samba-dffd0f379fdbb74533ceab18d199302f3b15a7c9.tar.bz2
samba-dffd0f379fdbb74533ceab18d199302f3b15a7c9.zip
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 ca1c463360b75538a93b56a87cbb4a6ee7b6cec6)
Diffstat (limited to 'source3/python')
-rw-r--r--source3/python/py_winbind.c10
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);