s3-xattr_tdb: Fix listxattr
authorVolker Lendecke <vl@samba.org>
Thu, 2 Feb 2012 17:11:32 +0000 (18:11 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 2 Feb 2012 19:35:28 +0000 (20:35 +0100)
We have to tell the caller how many bytes we actually want

source3/modules/vfs_xattr_tdb.c

index f00caa4ea7b41cf82f3857c9375672da222e7675..1f3f20e4993042509bc49fc7ac9bb1b58a71ea9c 100644 (file)
@@ -426,7 +426,7 @@ static ssize_t xattr_tdb_listattr(struct db_context *db_ctx,
        if (len > size) {
                TALLOC_FREE(attribs);
                errno = ERANGE;
-               return -1;
+               return len;
        }
 
        len = 0;