svn commit: samba r7697 - in trunk/source: include rpc_parse
jra at samba.org
jra at samba.org
Fri Jun 17 18:05:53 GMT 2005
Author: jra
Date: 2005-06-17 18:05:48 +0000 (Fri, 17 Jun 2005)
New Revision: 7697
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7697
Log:
Don't try and be clever and read an 8 byte int and 3 pad bytes
as a uint32 - you'll just get it wrong (as I did :-).
Second attempt to fix the Apple client issues.
Jeremy.
Modified:
trunk/source/include/rpc_dce.h
trunk/source/rpc_parse/parse_rpc.c
Changeset:
Modified: trunk/source/include/rpc_dce.h
===================================================================
--- trunk/source/include/rpc_dce.h 2005-06-17 18:05:46 UTC (rev 7696)
+++ trunk/source/include/rpc_dce.h 2005-06-17 18:05:48 UTC (rev 7697)
@@ -231,7 +231,7 @@
/* RPC_BIND_REQ - ms req bind */
typedef struct rpc_bind_req_info {
RPC_HDR_BBA bba;
- uint32 num_contexts; /* the number of contexts */
+ uint8 num_contexts; /* the number of contexts */
RPC_CONTEXT *rpc_context;
} RPC_HDR_RB;
Modified: trunk/source/rpc_parse/parse_rpc.c
===================================================================
--- trunk/source/rpc_parse/parse_rpc.c 2005-06-17 18:05:46 UTC (rev 7696)
+++ trunk/source/rpc_parse/parse_rpc.c 2005-06-17 18:05:48 UTC (rev 7697)
@@ -474,10 +474,10 @@
if(!smb_io_rpc_hdr_bba("", &rpc->bba, ps, depth))
return False;
- if(!prs_uint32("num_contexts", ps, depth, &rpc->num_contexts))
+ if(!prs_uint8("num_contexts", ps, depth, &rpc->num_contexts))
return False;
- rpc->num_contexts &= 0xff; /* Actually a 1 byte field.. */
+ /* 3 pad bytes following - will be mopped up by the prs_align in smb_io_rpc_context(). */
/* num_contexts must not be zero. */
if (rpc->num_contexts == 0)
More information about the samba-cvs
mailing list