diff options
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/clireadwrite.c | 1 | ||||
-rw-r--r-- | source4/libcli/raw/interfaces.h | 1 | ||||
-rw-r--r-- | source4/libcli/raw/rawreadwrite.c | 3 | ||||
-rw-r--r-- | source4/libcli/smb_composite/loadfile.c | 1 |
4 files changed, 6 insertions, 0 deletions
diff --git a/source4/libcli/clireadwrite.c b/source4/libcli/clireadwrite.c index afffba968a..03d1864a5d 100644 --- a/source4/libcli/clireadwrite.c +++ b/source4/libcli/clireadwrite.c @@ -56,6 +56,7 @@ ssize_t smbcli_read(struct smbcli_tree *tree, int fnum, void *_buf, off_t offset parms.readx.in.mincnt = readsize; parms.readx.in.maxcnt = readsize; parms.readx.in.remaining = size - total; + parms.readx.in.read_for_execute = False; parms.readx.out.data = buf + total; status = smb_raw_read(tree, &parms); diff --git a/source4/libcli/raw/interfaces.h b/source4/libcli/raw/interfaces.h index e476a00b68..086686b9e9 100644 --- a/source4/libcli/raw/interfaces.h +++ b/source4/libcli/raw/interfaces.h @@ -1352,6 +1352,7 @@ union smb_read { uint16_t mincnt; uint32_t maxcnt; uint16_t remaining; + BOOL read_for_execute; } in; struct { uint8_t *data; diff --git a/source4/libcli/raw/rawreadwrite.c b/source4/libcli/raw/rawreadwrite.c index 00dc71971e..c4e2ab2498 100644 --- a/source4/libcli/raw/rawreadwrite.c +++ b/source4/libcli/raw/rawreadwrite.c @@ -84,6 +84,9 @@ struct smbcli_request *smb_raw_read_send(struct smbcli_tree *tree, union smb_rea if (bigoffset) { SIVAL(req->out.vwv, VWV(10),parms->readx.in.offset>>32); } + if (parms->readx.in.read_for_execute) { + req->flags2 |= FLAGS2_READ_PERMIT_EXECUTE; + } break; } diff --git a/source4/libcli/smb_composite/loadfile.c b/source4/libcli/smb_composite/loadfile.c index 9a593c0726..db074bfd2b 100644 --- a/source4/libcli/smb_composite/loadfile.c +++ b/source4/libcli/smb_composite/loadfile.c @@ -106,6 +106,7 @@ static NTSTATUS loadfile_open(struct composite_context *c, state->io_read->readx.in.mincnt = MIN(32768, io->out.size); state->io_read->readx.in.maxcnt = state->io_read->readx.in.mincnt; state->io_read->readx.in.remaining = 0; + state->io_read->readx.in.read_for_execute = False; state->io_read->readx.out.data = io->out.data; state->req = smb_raw_read_send(tree, state->io_read); |