svn commit: samba r11078 - in trunk/source/libsmb: .
jra at samba.org
jra at samba.org
Sat Oct 15 00:46:29 GMT 2005
Author: jra
Date: 2005-10-15 00:46:29 +0000 (Sat, 15 Oct 2005)
New Revision: 11078
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11078
Log:
Narrowing down on the #1828 PPC bug. The PPC client sends an
initial NTLMSSP negotiate blob of only 16 bytes - no strings
added ! (So don't try parsing them).
Jeremy.
Modified:
trunk/source/libsmb/ntlmssp.c
Changeset:
Modified: trunk/source/libsmb/ntlmssp.c
===================================================================
--- trunk/source/libsmb/ntlmssp.c 2005-10-15 00:45:16 UTC (rev 11077)
+++ trunk/source/libsmb/ntlmssp.c 2005-10-15 00:46:29 UTC (rev 11078)
@@ -419,7 +419,6 @@
fstring dnsname, dnsdomname;
uint32 neg_flags = 0;
uint32 ntlmssp_command, chal_flags;
- char *cliname=NULL, *domname=NULL;
const uint8 *cryptkey;
const char *target_name;
@@ -429,40 +428,15 @@
#endif
if (request.length) {
- BOOL parse_ok = msrpc_parse(&request, "CddAA",
- "NTLMSSP",
- &ntlmssp_command,
- &neg_flags,
- &cliname,
- &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"));
+ if ((request.length < 16) || !msrpc_parse(&request, "Cdd",
+ "NTLMSSP",
+ &ntlmssp_command,
+ &neg_flags)) {
+ DEBUG(1, ("ntlmssp_server_negotiate: failed to parse NTLMSSP Negotiate of length %u\n",
+ (unsigned int)request.length));
dump_data(2, (const char *)request.data, request.length);
- SAFE_FREE(cliname);
- SAFE_FREE(domname);
return NT_STATUS_INVALID_PARAMETER;
}
-
- DEBUG(10, ("ntlmssp_server_negotiate: client = %s, domain = %s\n",
- cliname ? cliname : "", domname ? domname : ""));
-
- SAFE_FREE(cliname);
- SAFE_FREE(domname);
-
debug_ntlmssp_flags(neg_flags);
}
More information about the samba-cvs
mailing list