tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: extattr namespaces

On Mon, 6 Feb 2012 09:51:19 +0000
Emmanuel Dreyfus <> wrote:

> We ahve two extended attributes API in tree: one from FreeBSD and one from 
> Linux. We are about to toss the FreeBSD one in favor of the Linux one. 
> That is easy now since we never had working extended attributes in a 
> release.

One thing that I'm wondering: what are the character constraints on
those class names in the Linux API?

The reason is that if UTF8 is allowed, it'd be possible for two names
to show as an equivalent representation to humans, while they'd be
different for the system, and this could have security implications if
we ever use these to support extended permissions such as ACLs in the

> In the FreeBSD API, namespaces are int. There are two namesapces defined:
> ssytem and user. There is no way to add other namespaces, though I have
> no idea what happens if one use an int valude different than system or user.

For performance and security, integers make more sense to me than
strings.  However, I don't think there'd be a problem if internally
they're integers, yet showed to userland with a strings interface (we
traditionally do this for user and group IDs, in which case tools such
as id or ls can show the IDs as well as names).  Or if names were
restricted as necessary if IDs were dropped.

At least for namespace name strings and the SYSTEM namespace attribute
name strings, they should probably be restricted to a-z (or A-Z).  I
don't think that this would matter much for user namespace attributes,

Home | Main Index | Thread Index | Old Index