diff options
author | Jeremy Allison <jra@samba.org> | 2005-10-14 21:59:36 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:05:00 -0500 |
commit | 458da8987e8f406cdfd5bd602b3c3cf315675725 (patch) | |
tree | b19db742eb652a4610292aee1d6950839bda7c5e /source/libsmb/ntlmssp.c | |
parent | db8d85aa1ec5c486f061f97627b6b18a0e17cd34 (diff) | |
download | samba-458da8987e8f406cdfd5bd602b3c3cf315675725.tar.gz samba-458da8987e8f406cdfd5bd602b3c3cf315675725.tar.xz samba-458da8987e8f406cdfd5bd602b3c3cf315675725.zip |
r11075: Still working on bug #1828, PPC hell. The PPC client sends the
NTLMSSP client and domain strings as Unicode, even when setting
flags as OEM. Cope with this.
Jeremy.
Diffstat (limited to 'source/libsmb/ntlmssp.c')
-rw-r--r-- | source/libsmb/ntlmssp.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/source/libsmb/ntlmssp.c b/source/libsmb/ntlmssp.c index 6b551e8774c..42a4b95e298 100644 --- a/source/libsmb/ntlmssp.c +++ b/source/libsmb/ntlmssp.c @@ -429,14 +429,31 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state, #endif if (request.length) { - if (!msrpc_parse(&request, "CddAA", + BOOL parse_ok = msrpc_parse(&request, "CddAA", "NTLMSSP", &ntlmssp_command, &neg_flags, &cliname, - &domname)) { + &domname); + + if (!parse_ok) { + /* PocketPC 2003 sends the cliname and domname strings in unicode, + but doesn't set the unicode bit. Try with a parse string of "CddUU" */ + SAFE_FREE(cliname); + SAFE_FREE(domname); + parse_ok = msrpc_parse(&request, "CddUU", + "NTLMSSP", + &ntlmssp_command, + &neg_flags, + &cliname, + &domname); + } + + if (!parse_ok) { DEBUG(1, ("ntlmssp_server_negotiate: failed to parse NTLMSSP Negotiate:\n")); dump_data(2, (const char *)request.data, request.length); + SAFE_FREE(cliname); + SAFE_FREE(domname); return NT_STATUS_INVALID_PARAMETER; } |