summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/libcli/raw/interfaces.h2
-rw-r--r--source4/ntvfs/ntvfs_generic.c6
-rw-r--r--source4/ntvfs/posix/pvfs_read.c2
-rw-r--r--source4/torture/smb2/maxwrite.c4
4 files changed, 4 insertions, 10 deletions
diff --git a/source4/libcli/raw/interfaces.h b/source4/libcli/raw/interfaces.h
index d3e7611c75..c2f0c3530b 100644
--- a/source4/libcli/raw/interfaces.h
+++ b/source4/libcli/raw/interfaces.h
@@ -1589,7 +1589,7 @@ union smb_read {
uint8_t *data;
uint16_t remaining;
uint16_t compaction_mode;
- uint16_t nread;
+ uint32_t nread;
} out;
} readx, generic;
diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c
index aff05b70a8..aa6edcdf42 100644
--- a/source4/ntvfs/ntvfs_generic.c
+++ b/source4/ntvfs/ntvfs_generic.c
@@ -1266,12 +1266,6 @@ _PUBLIC_ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs,
break;
case RAW_READ_SMB2:
- if (rd->smb2.in.length > UINT16_MAX) {
- DEBUG(0,("%s: mapping SMB2 => generic length to large %u!\n",
- __FUNCTION__, rd->smb2.in.length));
- status = NT_STATUS_FOOBAR;
- goto done;
- }
rd2->readx.in.file.ntvfs= rd->smb2.in.file.ntvfs;
rd2->readx.in.offset = rd->smb2.in.offset;
rd2->readx.in.mincnt = rd->smb2.in.length;
diff --git a/source4/ntvfs/posix/pvfs_read.c b/source4/ntvfs/posix/pvfs_read.c
index 13e8264000..c36d8ca2a3 100644
--- a/source4/ntvfs/posix/pvfs_read.c
+++ b/source4/ntvfs/posix/pvfs_read.c
@@ -59,7 +59,7 @@ NTSTATUS pvfs_read(struct ntvfs_module_context *ntvfs,
}
maxcnt = rd->readx.in.maxcnt;
- if (maxcnt > UINT16_MAX) {
+ if (maxcnt > UINT16_MAX && req->ctx->protocol < PROTOCOL_SMB2) {
maxcnt = 0;
}
diff --git a/source4/torture/smb2/maxwrite.c b/source4/torture/smb2/maxwrite.c
index b9ca46437d..1d64d1d359 100644
--- a/source4/torture/smb2/maxwrite.c
+++ b/source4/torture/smb2/maxwrite.c
@@ -37,7 +37,7 @@ static NTSTATUS torture_smb2_write(TALLOC_CTX *mem_ctx,
struct smb2_read r;
NTSTATUS status;
int i, len;
- int max = 10000000;
+ int max = 80000000;
int min = 1;
while (max > min) {
@@ -94,7 +94,7 @@ static NTSTATUS torture_smb2_write(TALLOC_CTX *mem_ctx,
printf("converged: len=%d\n", max);
- return status;
+ return NT_STATUS_OK;
}