diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-03-28 14:45:23 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-03-29 20:29:04 +0100 |
commit | a41b116767cfb0880fae10ad1d59d652e74f8529 (patch) | |
tree | 974cb99ebd9ee2dace29b439cf31ff272715e0ea /fuse/test-fuse.sh | |
parent | 97245561cf6a7f0b6c5d2eac8c2bdf1618d466ec (diff) | |
download | libguestfs-a41b116767cfb0880fae10ad1d59d652e74f8529.tar.gz libguestfs-a41b116767cfb0880fae10ad1d59d652e74f8529.tar.xz libguestfs-a41b116767cfb0880fae10ad1d59d652e74f8529.zip |
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
Diffstat (limited to 'fuse/test-fuse.sh')
-rwxr-xr-x | fuse/test-fuse.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fuse/test-fuse.sh b/fuse/test-fuse.sh index 6d2f0fe0..dfc944dd 100755 --- a/fuse/test-fuse.sh +++ b/fuse/test-fuse.sh @@ -1,6 +1,6 @@ #!/bin/bash - # libguestfs -# Copyright (C) 2009 Red Hat Inc. +# Copyright (C) 2009-2011 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -92,10 +92,15 @@ $guestfish <<EOF run part-disk /dev/sda mbr mkfs ext2 /dev/sda1 - mount /dev/sda1 / + mount_options acl,user_xattr /dev/sda1 / write /hello.txt hello write /world.txt "hello world" touch /empty + touch /user_xattr + setxattr user.test hello123 8 /user_xattr + touch /acl + # XXX hack until libguestfs gets ACL support + debug sh "setfacl -m u:500:r /sysroot/acl" | cat > /dev/null EOF stage Mounting the filesystem |