fuse: Fix getxattr, listxattr calls and add a regression test (RHBZ#691389).
The documentation for the getxattr and listxattr calls is not very
clear and as a result we were always returning something different
from that which the Linux kernel would usually return.
This fixes these calls, at least far enough that both the 'getfattr'
and 'getfacl' programs now work fine on FUSE-mounted filesystems.
Note that SELinux attrs are *not* passed through. This appears to be
a known bug between SELinux and FUSE. For more information see:
http://www.spinics.net/lists/selinux/msg09460.html
Cherry picked from commit
0d6fd9e1d2488841c912c5351086e536772837ef:
- rebased on stable-1.8 branch
- removed unintended hunk (which changed -m documentation in
guestmount --help output)
- removed parts of test-fuse.sh which will fail because
there is no support for passing acl,user_xattr options in
an extended -m option