From ff3a23e90f85508de39610eb3503562b76c22773 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 30 Apr 2018 09:50:04 -0700 Subject: [PATCH] s3: VFS: default: Remove fallback if we don't have HAVE_PREAD set. Samba doesn't work without pread. Start of the changes to remove synchronous VFS read. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/modules/vfs_default.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 6de0329b337..6e8a99690cf 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -641,28 +641,8 @@ static ssize_t vfswrap_pread(vfs_handle_struct *handle, files_struct *fsp, void } #else /* HAVE_PREAD */ - off_t curr; - int lerrno; - - curr = SMB_VFS_LSEEK(fsp, 0, SEEK_CUR); - if (curr == -1 && errno == ESPIPE) { - /* Maintain the fiction that pipes can be seeked (sought?) on. */ - result = SMB_VFS_READ(fsp, data, n); - fsp->fh->pos = 0; - return result; - } - - if (SMB_VFS_LSEEK(fsp, offset, SEEK_SET) == -1) { - return -1; - } - - errno = 0; - result = SMB_VFS_READ(fsp, data, n); - lerrno = errno; - - SMB_VFS_LSEEK(fsp, curr, SEEK_SET); - errno = lerrno; - + errno = ENOSYS; + result = -1; #endif /* HAVE_PREAD */ return result; -- 2.11.4.GIT