We copy the RPC header directly from the incoming client - remember to
authorJeremy Allison <jra@samba.org>
Mon, 12 Mar 2001 21:09:55 +0000 (21:09 +0000)
committerJeremy Allison <jra@samba.org>
Mon, 12 Mar 2001 21:09:55 +0000 (21:09 +0000)
set little-endian flag on marshalling. AS/U now correctly tries to join
our domain !
Jeremy.

source/rpc_parse/parse_rpc.c

index 9fe893d4be2ad92a84af42b8317c86e6ff6b75fc..f330c5947e670ed30cf2185f50ff1f644728fb96 100644 (file)
@@ -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);
        }