summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_streams_xattr.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index 033d0272c2..b68fa02a35 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -916,6 +916,9 @@ static ssize_t streams_xattr_pread(vfs_handle_struct *handle,
NTSTATUS status;
size_t length, overlap;
+ DEBUG(10, ("streams_xattr_pread: offset=%d, size=%d\n",
+ (int)offset, (int)n));
+
if (sio == NULL) {
return SMB_VFS_NEXT_PREAD(handle, fsp, data, n, offset);
}
@@ -932,10 +935,12 @@ static ssize_t streams_xattr_pread(vfs_handle_struct *handle,
length = ea.value.length-1;
+ DEBUG(10, ("streams_xattr_pread: get_ea_value returned %d bytes\n",
+ (int)length));
+
/* Attempt to read past EOF. */
if (length <= offset) {
- errno = EINVAL;
- return -1;
+ return 0;
}
overlap = (offset + n) > length ? (length - offset) : n;