Fix bug #8324 - smbclient cannot list directories from a big-endian machine.
authorJeremy Allison <jra@samba.org>
Tue, 26 Jul 2011 22:15:26 +0000 (15:15 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 27 Jul 2011 01:14:48 +0000 (03:14 +0200)
Two uses of the setup array are not being correctly byte-swapped to little
endian.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Jul 27 03:14:48 CEST 2011 on sn-devel-104

source3/libsmb/clilist.c

index 1aa5699be55a1be9b31ae2a5e301bdb95d6f53a8..55a6636a730f7d34efc30acf3c52840471dd9830 100644 (file)
@@ -572,7 +572,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);
 
        state->param = talloc_array(state, uint8_t, 12);
        if (tevent_req_nomem(state->param, req)) {
@@ -736,7 +736,7 @@ static void cli_list_trans_done(struct tevent_req *subreq)
                return;
        }
 
-       state->setup[0] = TRANSACT2_FINDNEXT;
+       SSVAL(&state->setup[0], 0, TRANSACT2_FINDNEXT);
 
        param = talloc_realloc(state, state->param, uint8_t, 12);
        if (tevent_req_nomem(param, req)) {