diff options
Diffstat (limited to 'source4/torture/raw')
-rw-r--r-- | source4/torture/raw/read.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c index da9580a472..483f1c6677 100644 --- a/source4/torture/raw/read.c +++ b/source4/torture/raw/read.c @@ -513,6 +513,26 @@ static BOOL test_readx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) CHECK_VALUE(io.readx.out.nread, io.readx.in.maxcnt); CHECK_BUFFER(buf, seed, io.readx.out.nread); + if (cli->transport->negotiate.capabilities & CAP_LARGE_READX) { + printf("Trying large readx\n"); + io.readx.in.offset = 0; + io.readx.in.mincnt = 0; + io.readx.in.maxcnt = 0x10000 - 1; + status = smb_raw_read(cli->tree, &io); + CHECK_STATUS(status, NT_STATUS_OK); + CHECK_VALUE(io.readx.out.nread, 0xFFFF); + + io.readx.in.maxcnt = 0x10000; + status = smb_raw_read(cli->tree, &io); + CHECK_STATUS(status, NT_STATUS_OK); + CHECK_VALUE(io.readx.out.nread, 0); + + io.readx.in.maxcnt = 0x10001; + status = smb_raw_read(cli->tree, &io); + CHECK_STATUS(status, NT_STATUS_OK); + CHECK_VALUE(io.readx.out.nread, 0); + } + printf("Trying locked region\n"); cli->session->pid++; if (NT_STATUS_IS_ERR(smbcli_lock(cli->tree, fnum, 103, 1, 0, WRITE_LOCK))) { |