Don't call into the next VFS backend if we know we still have a fake-fd. Just
return -1 and the caller has the logic to handle this, which results in
returning a AFP_AfpInfo blob initialized with some defaults.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
files_struct *fsp, void *data,
size_t n, off_t offset)
{
+ struct fio *fio = (struct fio *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
ssize_t nread;
int ret;
+ if (fio->fake_fd) {
+ return -1;
+ }
+
nread = SMB_VFS_NEXT_PREAD(handle, fsp, data, n, offset);
if (nread == -1 || nread == n) {
return nread;