diff options
-rw-r--r-- | source3/libsmb/ntlmssp.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c index 6b551e8774..42a4b95e29 100644 --- a/source3/libsmb/ntlmssp.c +++ b/source3/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; } |