Emmanuel Dreyfus <m...@netbsd.org> wrote: [Linux flavor] > - Attribute values cannot contain a NUL character [FreeBSD flavor] > - Attribute value cannot cannot be bigger than 255 bytes
This is nonsense posted too early in the morning :-) The attribute value can contain random binary data in both API. Attribute *names* have the constraints above in the extattr_list_file() and listxattr() system calls. But since attribute names are passed as NUL-terminated strings input arguments for get/set/remove operations of both API, they cannot contain a NUL character anyway, both with FreeBSD and Linux API. So here is my fixed sumary: listxattr() flistxattr() and llistxattr() - #include <sys/xattr.h> - Attribute names must include a namespace prefix delimited by a dot (e.g.: system.foo) - system, trusted, security and user namespaces are predefined with their own access semantics - One can use other random namespace, which will behave as user namespace. - Attributes names list is returned as NUL-separated strings - Attribute values can contain random binary data - Used in Linux, MacOS X and FUSE extattr_list_file() extattr_list_fd() extattr_list_link() - #include <sys/extattr.h> - Attribute namespace is provided as an int - system and user namespaces are defined - Other namespaces values usage is a mystery. - Attributes names list is returned as one-byte length prefixed, non NUL terminated strings - Attribute names cannot cannot be bigger than 255 bytes - Attribute values can contain random binary data - Used in FreeBSD -- Emmanuel Dreyfus http://hcpnet.free.fr/pubz m...@netbsd.org