From: Jeremy Allison Date: Wed, 2 May 2018 23:35:41 +0000 (-0700) Subject: s3: VFS: default: Remove fallback if we don't have HAVE_PWRITE set. Samba doesn't... X-Git-Tag: ldb-1.4.0~411 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90bd74640f0a79c1d1c2c0a5fee92e62700232e9;p=thirdparty%2Fsamba.git 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 --- 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;