From cbf2174daf7ce8f5aa2f67a4d2641bc9d09d7811 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 26 Jul 2011 15:16:29 -0700 Subject: [PATCH] Fix bug #8324 - smbclient cannot list directories from a big-endian machine. Two uses of the setup array are not being correctly byte-swapped to little endian. --- source3/libsmb/clilist.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index d74d3d8..59d01b7 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -573,7 +573,7 @@ static struct tevent_req *cli_list_trans_send(TALLOC_CTX *mem_ctx, state->max_matches = 1366; /* Match W2k */ - state->setup[0] = TRANSACT2_FINDFIRST; + SSVAL(&state->setup[0], 0, TRANSACT2_FINDFIRST); nlen = 2*(strlen(mask)+1); state->param = TALLOC_ARRAY(state, uint8_t, 12+nlen+2); @@ -735,7 +735,7 @@ static void cli_list_trans_done(struct tevent_req *subreq) return; } - state->setup[0] = TRANSACT2_FINDNEXT; + SSVAL(&state->setup[0], 0, TRANSACT2_FINDNEXT); nlen = 2*(strlen(state->mask) + 1); -- 1.7.3.1