diff options
author | Tim Potter <tpot@samba.org> | 2003-08-12 00:46:15 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-08-12 00:46:15 +0000 |
commit | dffd0f379fdbb74533ceab18d199302f3b15a7c9 (patch) | |
tree | 07fe79a13ddd865a2fa1b2010525e6bda2fe0557 /source3/nsswitch/wbinfo.c | |
parent | 102de75a7ca4055dee21610061429e100cfc5699 (diff) | |
download | samba-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/nsswitch/wbinfo.c')
-rw-r--r-- | source3/nsswitch/wbinfo.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c index 657d9c83bd..0018e99f60 100644 --- a/source3/nsswitch/wbinfo.c +++ b/source3/nsswitch/wbinfo.c @@ -3,7 +3,7 @@ Winbind status program. - Copyright (C) Tim Potter 2000-2002 + Copyright (C) Tim Potter 2000-2003 Copyright (C) Andrew Bartlett 2002 This program is free software; you can redistribute it and/or modify @@ -486,9 +486,18 @@ static BOOL wbinfo_auth_crap(char *username) parse_wbinfo_domain_user(username, name_domain, name_user); - fstrcpy(request.data.auth_crap.user, name_user); + if (push_utf8_fstring(request.data.auth_crap.user, name_user) == -1) { + d_printf("unable to create utf8 string for '%s'\n", + name_user); + return False; + } - fstrcpy(request.data.auth_crap.domain, name_domain); + if (push_utf8_fstring(request.data.auth_crap.domain, + name_domain) == -1) { + d_printf("unable to create utf8 string for '%s'\n", + name_domain); + return False; + } generate_random_buffer(request.data.auth_crap.chal, 8, False); |