From 90bd74640f0a79c1d1c2c0a5fee92e62700232e9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 2 May 2018 16:35:41 -0700 Subject: [PATCH] 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 Reviewed-by: Ralph Boehme --- source3/modules/vfs_default.c | 20 ++------------------ 1 file 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; -- 2.47.2