summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-10-14 21:59:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:00 -0500
commitdaf33dc4fc888b839aa38d1e757ed066edf06996 (patch)
treec6bc6f0d5a955bd81af06ba5e05dada2d5bd1c46 /source3/libsmb
parentd45d113659e31977630c410db1253de47bb34bd4 (diff)
downloadsamba-daf33dc4fc888b839aa38d1e757ed066edf06996.tar.gz
samba-daf33dc4fc888b839aa38d1e757ed066edf06996.tar.bz2
samba-daf33dc4fc888b839aa38d1e757ed066edf06996.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. (This used to be commit 458da8987e8f406cdfd5bd602b3c3cf315675725)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/ntlmssp.c21
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;
}