On Mon, 2005-01-03 at 14:25 -0800, H. Peter Anvin wrote:
I'm honestly not sure that using an ASCII string in an xattr is the sane way of doing this. Even a binary byte in an xattr would make more sense in some ways.
ASCII strings require no special tools to manipulate from shell scripts.
>
I think the xattr mechanism is ignored largely because it's painfully complex.
A plus with using xattr is that in theory (but of course not in practice!) it would let one store a copy of a DOS filesystem on an ext3 (or xfs, or...) filesystem and have it restored, all using standard (but by necessity, xattr-aware) tools. However, the splitting of xattr into namespaces may very well make that impossible, since what's a "system" attribute to one filesystem is a "user" attribute to another. Classic design flaw, by the way.
The design does allow users to store whatever they want as an xattr
without having to worry about how the kernel chooses to interpret it,
though. (i.e. the user namespace is just a byte array that the kernel
stores for you, while the system/security namespaces are probably
generated and interpreted on demand.)