summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-12 21:09:55 +0000
committerJeremy Allison <jra@samba.org>2001-03-12 21:09:55 +0000
commitea35aae3bfad9c73a6768abcd76726b26b6c4f9a (patch)
tree519d49fd22130bd5380c72ecd367c4cbdc25d797
parent5107a7a96acf1949f5ae0cdc49e9c84570f3482a (diff)
downloadsamba-ea35aae3bfad9c73a6768abcd76726b26b6c4f9a.tar.gz
samba-ea35aae3bfad9c73a6768abcd76726b26b6c4f9a.tar.bz2
samba-ea35aae3bfad9c73a6768abcd76726b26b6c4f9a.zip
We copy the RPC header directly from the incoming client - remember to
set little-endian flag on marshalling. AS/U now correctly tries to join our domain ! Jeremy. (This used to be commit 0185f8159dbd30820d1ec9ce2aec8eb1cddcfc0b)
-rw-r--r--source3/rpc_parse/parse_rpc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 9fe893d4be..f330c5947e 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -187,6 +187,11 @@ BOOL smb_io_rpc_hdr(char *desc, RPC_HDR *rpc, prs_struct *ps, int depth)
return False;
if(!prs_uint8 ("flags ", ps, depth, &rpc->flags))
return False;
+
+ /* We always marshall in little endian format. */
+ if (MARSHALLING(ps))
+ rpc->pack_type[0] = 0x10;
+
if(!prs_uint8("pack_type0", ps, depth, &rpc->pack_type[0]))
return False;
if(!prs_uint8("pack_type1", ps, depth, &rpc->pack_type[1]))
@@ -201,7 +206,7 @@ BOOL smb_io_rpc_hdr(char *desc, RPC_HDR *rpc, prs_struct *ps, int depth)
* format. Set the flag in the prs_struct to specify reverse-endainness.
*/
- if (ps->io && rpc->pack_type[0] == 0) {
+ if (UNMARSHALLING(ps) && rpc->pack_type[0] == 0) {
DEBUG(10,("smb_io_rpc_hdr: PDU data format is big-endian. Setting flag.\n"));
prs_set_endian_data(ps, RPC_BIG_ENDIAN);
}