s3: Fix reading beyond the end of a named stream in xattr_streams
[ira/wip.git] / source3 / modules / vfs_streams_xattr.c
index ae8af47ab732cf3f0807039d7afaab1fd4accd3d..b68fa02a354af98e4980108bd269e13e71327011 100644 (file)
@@ -940,8 +940,7 @@ static ssize_t streams_xattr_pread(vfs_handle_struct *handle,
 
         /* Attempt to read past EOF. */
         if (length <= offset) {
-                errno = EINVAL;
-                return -1;
+                return 0;
         }
 
         overlap = (offset + n) > length ? (length - offset) : n;