svn commit: samba r11075 - in branches/SAMBA_3_0/source/libsmb: .

jra at samba.org jra at samba.org
Fri Oct 14 21:59:42 GMT 2005


Author: jra
Date: 2005-10-14 21:59:36 +0000 (Fri, 14 Oct 2005)
New Revision: 11075

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11075

Log:
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.

Modified:
   branches/SAMBA_3_0/source/libsmb/ntlmssp.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/ntlmssp.c
===================================================================
--- branches/SAMBA_3_0/source/libsmb/ntlmssp.c	2005-10-14 21:59:25 UTC (rev 11074)
+++ branches/SAMBA_3_0/source/libsmb/ntlmssp.c	2005-10-14 21:59:36 UTC (rev 11075)
@@ -429,14 +429,31 @@
 #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;
 		}
 		



More information about the samba-cvs mailing list