diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-05-27 18:20:23 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-05-27 18:20:23 +1000 |
commit | 8daeee5c5d7d5851677089cceaf26a0e32675a96 (patch) | |
tree | 6c7892ea7b20fd5c68ae826a49ea670d23cdd464 /source4/ntvfs/posix | |
parent | 4f0d968d1dd185a4f5b38c2669f520536b1f8445 (diff) | |
download | samba-8daeee5c5d7d5851677089cceaf26a0e32675a96.tar.gz samba-8daeee5c5d7d5851677089cceaf26a0e32675a96.tar.bz2 samba-8daeee5c5d7d5851677089cceaf26a0e32675a96.zip |
ensure that we honor SMB2 read min_count properly
(This used to be commit 318038d6f670efffa96d8b0db63f46b3752e1cd3)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r-- | source4/ntvfs/posix/pvfs_read.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_read.c b/source4/ntvfs/posix/pvfs_read.c index 418b7e09fb..a01a8a57e3 100644 --- a/source4/ntvfs/posix/pvfs_read.c +++ b/source4/ntvfs/posix/pvfs_read.c @@ -93,6 +93,14 @@ NTSTATUS pvfs_read(struct ntvfs_module_context *ntvfs, return pvfs_map_errno(pvfs, errno); } + /* only SMB2 honors mincnt */ + if (req->ctx->protocol == PROTOCOL_SMB2) { + if (rd->readx.in.mincnt > ret || + (ret == 0 && maxcnt > 0)) { + return NT_STATUS_END_OF_FILE; + } + } + f->handle->position = f->handle->seek_offset = rd->readx.in.offset + ret; rd->readx.out.nread = ret; |