The branch, master has been updated
       via  444a05c28df693a745809fef73ae583a78be7c8f (commit)
       via  00d7aad85a594c123d4f00dd7eb15357ed7f3495 (commit)
      from  5b86a0ac013173e9d00f2f1476fb3ee54463e930 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 444a05c28df693a745809fef73ae583a78be7c8f
Author: Volker Lendecke <[email protected]>
Date:   Wed Sep 16 03:20:49 2009 +0200

    s3: Fix reading beyond the end of a named stream in xattr_streams
    
    This was found thanks to a test by Sivani from Microsoft against Samba at 
the
    SDC plugfest

commit 00d7aad85a594c123d4f00dd7eb15357ed7f3495
Author: Volker Lendecke <[email protected]>
Date:   Wed Sep 16 03:15:53 2009 +0200

    s3: Add some debugs to streams_xattr

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/vfs_streams_xattr.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_streams_xattr.c 
b/source3/modules/vfs_streams_xattr.c
index 033d027..b68fa02 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;


-- 
Samba Shared Repository

Reply via email to