summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-05-25 04:46:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:37 -0500
commitf719eb9598d4d82d5fec2d13b67f7a5b2e86e4df (patch)
treef61c670456140239e2587a380827000f9dee310d
parent01b8c1913d75a9b74a1a4bf3e7d8a80f18db0b2d (diff)
downloadsamba-f719eb9598d4d82d5fec2d13b67f7a5b2e86e4df.tar.gz
samba-f719eb9598d4d82d5fec2d13b67f7a5b2e86e4df.tar.bz2
samba-f719eb9598d4d82d5fec2d13b67f7a5b2e86e4df.zip
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)
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c6
1 files changed, 4 insertions, 2 deletions
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) {