Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
lgetxattrs can't show the file attribute list with ntfs FS though execute no error
Version-Release number of selected component (if applicable):
libguestfs-1.22.2-1.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
# guestfish -N fs:ntfs
Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.
Type: 'help' for help on commands
'man' to read the manual
'quit' to quit the shell
><fs> trace 1
><fs> mount-options user_xattr /dev/sda1 /
libguestfs: trace: mount_options "user_xattr" "/dev/sda1" "/"
libguestfs: trace: mount_options = 0
><fs> touch /test.txt
libguestfs: trace: touch "/test.txt"
libguestfs: trace: touch = 0
><fs> lsetxattr security.name "hello" 5 /test.txt
libguestfs: trace: lsetxattr "security.name" "hello" 5 "/test.txt"
libguestfs: trace: lsetxattr = 0
><fs> lsetxattr security.type "ascii file" 10 /test.txt
libguestfs: trace: lsetxattr "security.type" "ascii file" 10 "/test.txt"
libguestfs: trace: lsetxattr = 0
><fs> lgetxattrs /test.txt
libguestfs: trace: lgetxattrs "/test.txt"
libguestfs: trace: lgetxattrs = <struct guestfs_xattr_list *>
><fs>
Actual results:
lgetxattrs don't have output
Expected results:
lgetxattrs can show the attribute list
><fs> lgetxattrs /test.txt
[0] = {
attrname: security.name
attrval: hello
}
[1] = {
attrname: security.type
attrval: ascii file
}
Additional info:
1. lgetxattrs work with ext FS
2. has same issue with libguestfs-1.20.8-4.el6.x86_64 in rhel6
Comment 1Richard W.M. Jones
2013-06-10 15:24:57 UTC
I'm pretty sure I've seen the same bug in ntfs-3g itself.
The problem was that ntfs-3g wouldn't return all the xattrs
when you use listxattr(2).
Comment 2Richard W.M. Jones
2013-07-18 22:09:45 UTC
Should we expect that security.* xattrs can be set arbitrarily?
The security.* namespace is reserved by kernel security modules.
From attr(5):
Extended security attributes
The security attribute namespace is used by kernel security modules,
such as Security Enhanced Linux. Read and write access permissions to
security attributes depend on the policy implemented for each security
attribute by the security module. When no security module is loaded,
all processes have read access to extended security attributes, and
write access is limited to processes that have the CAP_SYS_ADMIN capa‐
bility.
So the fact this worked for ext4 is just luck.
If you use the user.* namespace instead, then everything works
fine even on NTFS:
$ guestfish -N fs:ntfs -m /dev/sda1:/:user_xattr <<EOF
touch /test.txt
lsetxattr user.name "hello" 5 /test.txt
lsetxattr user.type "ascii file" 10 /test.txt
lgetxattr /test.txt user.name
echo
lgetxattrs /test.txt
EOF
hello
[0] = {
attrname: user.name
attrval: hello
}
[1] = {
attrname: user.type
attrval: ascii file
}
So I would say this is not a bug.
Comment 4Richard W.M. Jones
2014-04-25 09:21:14 UTC
I looked at the description again, and it's not expected that
you should be able to set arbitrary security.* xattrs. That
namespace is reserved for the kernel. Try setting user.* xattrs
instead -- those should work.
Description of problem: lgetxattrs can't show the file attribute list with ntfs FS though execute no error Version-Release number of selected component (if applicable): libguestfs-1.22.2-1.el7.x86_64 How reproducible: 100% Steps to Reproduce: # guestfish -N fs:ntfs Welcome to guestfish, the guest filesystem shell for editing virtual machine filesystems and disk images. Type: 'help' for help on commands 'man' to read the manual 'quit' to quit the shell ><fs> trace 1 ><fs> mount-options user_xattr /dev/sda1 / libguestfs: trace: mount_options "user_xattr" "/dev/sda1" "/" libguestfs: trace: mount_options = 0 ><fs> touch /test.txt libguestfs: trace: touch "/test.txt" libguestfs: trace: touch = 0 ><fs> lsetxattr security.name "hello" 5 /test.txt libguestfs: trace: lsetxattr "security.name" "hello" 5 "/test.txt" libguestfs: trace: lsetxattr = 0 ><fs> lsetxattr security.type "ascii file" 10 /test.txt libguestfs: trace: lsetxattr "security.type" "ascii file" 10 "/test.txt" libguestfs: trace: lsetxattr = 0 ><fs> lgetxattrs /test.txt libguestfs: trace: lgetxattrs "/test.txt" libguestfs: trace: lgetxattrs = <struct guestfs_xattr_list *> ><fs> Actual results: lgetxattrs don't have output Expected results: lgetxattrs can show the attribute list ><fs> lgetxattrs /test.txt [0] = { attrname: security.name attrval: hello } [1] = { attrname: security.type attrval: ascii file } Additional info: 1. lgetxattrs work with ext FS 2. has same issue with libguestfs-1.20.8-4.el6.x86_64 in rhel6