r15880: the ntvfs_handle changes broke rpc on big-endian boxes, as the
authorAndrew Tridgell <tridge@samba.org>
Thu, 25 May 2006 04:46:38 +0000 (04:46 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:08:37 +0000 (14:08 -0500)
uint16_t fnum was being byte order converted twice in the ipc server.

Metze, can you have a look at this? This change does make rpc work
again, but perhaps you might like to approach it differently
(This used to be commit 50246e6282087fdf7050ea052ad516dc620d6c7e)

source4/ntvfs/ipc/vfs_ipc.c

index 03e026e4239a7478abe5f4daf239890c052b3354..31233968e77ce0bea2f756efdd655fb7962d9b95 100644 (file)
@@ -658,9 +658,11 @@ static NTSTATUS ipc_dcerpc_cmd(struct ntvfs_module_context *ntvfs,
        struct ipc_private *private = ntvfs->private_data;
        NTSTATUS status;
        DATA_BLOB fnum_key;
+       uint16_t fnum;
 
-       /* the fnum is in setup[1] */
-       fnum_key = data_blob_const(&trans->in.setup[1], sizeof(trans->in.setup[1]));
+       /* the fnum is in setup[1], a 16 bit value */
+       SSVAL(&fnum, 0, trans->in.setup[1]);
+       fnum_key = data_blob_const(&fnum, 2);
 
        p = pipe_state_find_key(private, req, &fnum_key);
        if (!p) {