3 ms·
You missed: - Unix xattrs have a terrible API and awful command line tools: listxattr(2) returning \0-separated character arrays with lists of attributes that
by rwmj 10y ago
You missed:
- Unix xattrs have a terrible API and awful command line tools: listxattr(2) returning \0-separated character arrays with lists of attributes that are next to impossible to decipher in C? - check! Hiding certain xattrs by default based only on their names? - check!
- xattrs have magical qualities based on their names, the kernel version, the kernel configuration, and the filesystem mount options (eg. "security.selinux", "trusted.*")
- Some xattrs are \0 terminated (and the APIs set and return the \0 making them very awkward to use from shell scripts), some don't, and some are indeterminate. They can also be binary blobs.
- ivank 10y agoAlso, add too many xattrs and you can no longer get a list of them: As noted in xattr(7), the VFS imposes a limit of 64 kB on the size of the extended attribute name list returned by listxattr(7). If the total size of attribute names attached to a file exceeds this limit, it is no longer possible to retrieve the list of attribute names. http://man7.org/linux/man-pages/man2/listxattr.2.html http://man7.org/linux/man-pages/man2/listxattr.2.html
- nailer 10y agoIs \0 ASCII null?
- rwmj 10y agoYes. For more details see http://man7.org/linux/man-pages/man2/listxattr.2.html http://man7.org/linux/man-pages/man2/listxattr.2.html