diff options
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/raw/interfaces.h | 6 | ||||
-rw-r--r-- | source4/libcli/raw/rawioctl.c | 2 | ||||
-rw-r--r-- | source4/libcli/raw/rawnotify.c | 2 | ||||
-rw-r--r-- | source4/libcli/raw/rawtrans.c | 9 |
4 files changed, 9 insertions, 10 deletions
diff --git a/source4/libcli/raw/interfaces.h b/source4/libcli/raw/interfaces.h index c2f0c3530b..60cefe6931 100644 --- a/source4/libcli/raw/interfaces.h +++ b/source4/libcli/raw/interfaces.h @@ -2115,14 +2115,14 @@ struct smb_nttrans { uint32_t max_data; uint32_t setup_count; uint16_t function; - uint16_t *setup; + uint8_t *setup; DATA_BLOB params; DATA_BLOB data; } in; struct { - uint8_t setup_count; - uint16_t *setup; + uint8_t setup_count; /* in units of 16 bit words */ + uint8_t *setup; DATA_BLOB params; DATA_BLOB data; } out; diff --git a/source4/libcli/raw/rawioctl.c b/source4/libcli/raw/rawioctl.c index a9812022ea..9477af4eb2 100644 --- a/source4/libcli/raw/rawioctl.c +++ b/source4/libcli/raw/rawioctl.c @@ -79,7 +79,7 @@ static struct smbcli_request *smb_raw_ntioctl_send(struct smbcli_tree *tree, nt.in.max_param = 0; nt.in.max_data = parms->ntioctl.in.max_data; nt.in.setup_count = 4; - nt.in.setup = (uint16_t *)setup; + nt.in.setup = setup; SIVAL(setup, 0, parms->ntioctl.in.function); SSVAL(setup, 4, parms->ntioctl.in.file.fnum); SCVAL(setup, 6, parms->ntioctl.in.fsctl); diff --git a/source4/libcli/raw/rawnotify.c b/source4/libcli/raw/rawnotify.c index 5f3fa0f50e..e847368f73 100644 --- a/source4/libcli/raw/rawnotify.c +++ b/source4/libcli/raw/rawnotify.c @@ -28,7 +28,7 @@ change notify (async send) struct smbcli_request *smb_raw_changenotify_send(struct smbcli_tree *tree, union smb_notify *parms) { struct smb_nttrans nt; - uint16_t setup[4]; + uint8_t setup[8]; if (parms->nttrans.level != RAW_NOTIFY_NTTRANS) { return NULL; diff --git a/source4/libcli/raw/rawtrans.c b/source4/libcli/raw/rawtrans.c index 08d7483a87..164354c701 100644 --- a/source4/libcli/raw/rawtrans.c +++ b/source4/libcli/raw/rawtrans.c @@ -449,15 +449,14 @@ NTSTATUS smb_raw_nttrans_recv(struct smbcli_request *req, SMBCLI_CHECK_WCT(req, 18 + parms->out.setup_count); if (parms->out.setup_count > 0) { - int i; - parms->out.setup = talloc_array(mem_ctx, uint16_t, parms->out.setup_count); + parms->out.setup = talloc_array(mem_ctx, uint8_t, + parms->out.setup_count*2); if (!parms->out.setup) { req->status = NT_STATUS_NO_MEMORY; return smbcli_request_destroy(req); } - for (i=0;i<parms->out.setup_count;i++) { - parms->out.setup[i] = SVAL(req->in.vwv, VWV(18+i)); - } + memcpy(parms->out.setup, VWV(18) + (uint8_t *)req->out.vwv, + sizeof(uint16_t) * parms->out.setup_count); } while (recvd_data < total_data || |