git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f970818
)
SMB2 read returns NT_STATUS_END_OF_FILE on read past end of file
author
Andrew Tridgell
<tridge@samba.org>
Thu, 22 May 2008 13:07:16 +0000
(23:07 +1000)
committer
Andrew Tridgell
<tridge@samba.org>
Thu, 22 May 2008 13:07:16 +0000
(23:07 +1000)
source/ntvfs/ntvfs_generic.c
patch
|
blob
|
history
diff --git
a/source/ntvfs/ntvfs_generic.c
b/source/ntvfs/ntvfs_generic.c
index a706e621c9083f1cd8be07f125810424f39a2026..62a142740536086206f475287d929270ba8bfcae 100644
(file)
--- a/
source/ntvfs/ntvfs_generic.c
+++ b/
source/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;
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;
break;
default:
return NT_STATUS_INVALID_LEVEL;