diff options
author | Jeremy Allison <jra@samba.org> | 2018-05-02 16:35:41 -0700 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2018-05-04 22:34:25 +0200 |
commit | 90bd74640f0a79c1d1c2c0a5fee92e62700232e9 (patch) | |
tree | 757f73c6bc1eb1855f1a2cf5a9012c1873c46772 | |
parent | c1bcf1e7fd93a1dbedb210e624f99773a6f3d6f9 (diff) | |
download | samba-90bd74640f0a79c1d1c2c0a5fee92e62700232e9.tar.gz |
s3: VFS: default: Remove fallback if we don't have HAVE_PWRITE set. Samba doesn't work without pwrite.
Start of the changes to remove synchronous VFS write.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
-rw-r--r-- | source3/modules/vfs_default.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 7c93d9a26b3..63252ea865b 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -664,24 +664,8 @@ static ssize_t vfswrap_pwrite(vfs_handle_struct *handle, files_struct *fsp, cons } #else /* HAVE_PWRITE */ - off_t curr; - int lerrno; - - curr = SMB_VFS_LSEEK(fsp, 0, SEEK_CUR); - if (curr == -1) { - return -1; - } - - if (SMB_VFS_LSEEK(fsp, offset, SEEK_SET) == -1) { - return -1; - } - - result = SMB_VFS_WRITE(fsp, data, n); - lerrno = errno; - - SMB_VFS_LSEEK(fsp, curr, SEEK_SET); - errno = lerrno; - + errno = ENOSYS; + result = -1; #endif /* HAVE_PWRITE */ return result; |