Bug 972292
Summary: | lgetxattrs can't show the file attribute list with ntfs FS in rhel7 | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | bfan |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
Status: | CLOSED NOTABUG | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | leiwang, wshi |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-04-25 09:21:14 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
bfan
2013-06-08 07:52:46 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). 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. 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. |