summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-05-22 23:07:16 +1000
committerAndrew Tridgell <tridge@samba.org>2008-05-22 23:07:16 +1000
commit2e0f61a18ab002a90faa06477fa258e36b8a5fc0 (patch)
tree388d1dfd6d6770a1082ea62ef770de7892507703 /source4/ntvfs
parentac185ae0c5bca7fdf82e90a7d925c77e9cbe1888 (diff)
downloadsamba-2e0f61a18ab002a90faa06477fa258e36b8a5fc0.tar.gz
samba-2e0f61a18ab002a90faa06477fa258e36b8a5fc0.tar.bz2
samba-2e0f61a18ab002a90faa06477fa258e36b8a5fc0.zip
SMB2 read returns NT_STATUS_END_OF_FILE on read past end of file
(This used to be commit 1590494daf5abe43e43402e7602f92267bcda34b)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/ntvfs_generic.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c
index a706e621c9..62a1427405 100644
--- a/source4/ntvfs/ntvfs_generic.c
+++ b/source4/ntvfs/ntvfs_generic.c
@@ -1276,6 +1276,11 @@ static NTSTATUS ntvfs_map_read_finish(struct ntvfs_module_context *ntvfs,
rd->smb2.out.data.length= rd2->generic.out.nread;
rd->smb2.out.remaining = 0;
rd->smb2.out.reserved = 0;
+ if (NT_STATUS_IS_OK(status) &&
+ rd->smb2.out.data.length == 0 &&
+ rd->smb2.in.length != 0) {
+ status = NT_STATUS_END_OF_FILE;
+ }
break;
default:
return NT_STATUS_INVALID_LEVEL;