summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-05-05 02:39:02 +0000
committerJeremy Allison <jra@samba.org>2000-05-05 02:39:02 +0000
commita12b2cd9e806fefeabdbe73b46b569f5b9bc927f (patch)
tree26815acd625783fc1696be03fcabbec34bc5eed3
parent091c9706829ad0a076ee7ae9ffc77b65fd502508 (diff)
downloadsamba-a12b2cd9e806fefeabdbe73b46b569f5b9bc927f.tar.gz
samba-a12b2cd9e806fefeabdbe73b46b569f5b9bc927f.tar.bz2
samba-a12b2cd9e806fefeabdbe73b46b569f5b9bc927f.zip
Fix for read_file() returning -1.
Jeremy. (This used to be commit b899943658bee90994b416aa6caff0ee7cab5f28)
-rw-r--r--source3/smbd/fileio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index 2d83378b3d..6507f56606 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -116,6 +116,8 @@ ssize_t read_file(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n)
if (n > 0) {
readret = fsp->conn->vfs_ops.read(fsp->fd,data,n);
+ if (readret == -1)
+ return -1;
if (readret > 0) ret += readret;
}