Re: xattr names for unprivileged stacking?

Christian Schoenebeck
2020-08-13T09:01:42Z

On Mittwoch, 12. August 2020 16:33:23 CEST Dr. David Alan Gilbert wrote:
> > On macOS there was (or actually still is) even a quite complex API which
> > separated forks into "resource forks" and "data forks", where resource
> > forks were typically used as components of an application binary (e.g.
> > menu structure, icons, executable binary modules, text and translations).
> > So resource forks not only had names, they also had predefined 16-bit
> > type identifiers:
> > https://en.wikipedia.org/wiki/Resource_fork
>
> Yeh, lots of different ways.
>
> In a way, if you had a way to drop the 64kiB limit on xattr, then you
> could have one type of object, but then add new ways of accessing them
> as forks.

That's yet another question: should xattrs and forks share the same data- and
namespace, or rather be orthogonal to each other.

Say forks would (one day) have their own ownership and permissions, then
restricted environments would want to project forks' permissions onto xattrs,
which would suggest an orthogonal approach (i.e. forks having their own
xattrs).

OTOH a shared namespace would allow a mellow transition for heterogenous
systems and their apps from in-memory-only xattrs towards I/O based forks.

Another option: shared namespace, but allowing forks having subforks. That
would e.g. allow restricted environments to project permissions onto subforks,
and the latter in turn being accessible by xattr API at the same time.

Or yet another option: shared data space, but nesting the namespace of one
side under prefix on the other side (e.g. fork "foo" <=> xattr "fork.foo").

Best regards,
Christian Schoenebeck