From f719eb9598d4d82d5fec2d13b67f7a5b2e86e4df Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 25 May 2006 04:46:38 +0000 Subject: r15880: the ntvfs_handle changes broke rpc on big-endian boxes, as the 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs/ipc/vfs_ipc.c') diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c index 03e026e423..31233968e7 100644 --- a/source4/ntvfs/ipc/vfs_ipc.c +++ b/source4/ntvfs/ipc/vfs_ipc.c @@ -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) { -- cgit