summaryrefslogtreecommitdiff
path: root/source3/smbd/fileio.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-07-25 00:16:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:19 -0500
commit120422f7233446e8ca366ee7c4593cdbead79508 (patch)
tree0405e5467312b4dd06e6ff7b9c321a59da73f28f /source3/smbd/fileio.c
parent8cc35cc8da75f1e831f0b84fc667ec0c9bff6b4b (diff)
downloadsamba-120422f7233446e8ca366ee7c4593cdbead79508.tar.gz
samba-120422f7233446e8ca366ee7c4593cdbead79508.tar.bz2
samba-120422f7233446e8ca366ee7c4593cdbead79508.zip
r17220: If we're going to fail a write with an errno, make
sure we return -1. Jeremy. (This used to be commit 89b83237b03066785ca4bf3b9d120519bddeffad)
Diffstat (limited to 'source3/smbd/fileio.c')
-rw-r--r--source3/smbd/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index 375bfbe7cf..e0945be889 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -214,7 +214,7 @@ ssize_t write_file(files_struct *fsp, const char *data, SMB_OFF_T pos, size_t n)
if (!fsp->can_write) {
errno = EPERM;
- return(0);
+ return -1;
}
if (!fsp->modified) {