Re: capability inheritance (was: Re: patch to make Linux capabilities into something useful (v 0.3.1))

Pavel Machek
2006-09-10T22:43:21Z

Hi!

> > tytso actually shown a clever way: add per-filesystem 'default
> > capability masks'. That should be fairly easy to merge, and
> > automatically back-compatible.
> >
> > (And it would get tou semantics you wanted in inheritance area,
> > right?)
>
> I'm not at all sure. If it's just a matter of adding a mount option
> ("inhcaps", say) so that the default file inheritable set is full when
> the option is turned on *or* when one of current->{r,e,s}uid==0 (else
> defaults to regular caps), then that can easily be done: this will
> give a reasonable inheritance with the mount option turned on and the
> current behavior with the mount option turned off (but still the
> possibility of activating inheritance for specific files).

It needs to be inhcaps=[mask] to be consistent with the rest. (What
other bitmasks are there available in the xattrs?)

> *However*, Theodore Ts'o seemed to say that he wanted POSIX-draft-16
> conformance, and I am unable to arrange this: I don't know how to come
> up with a set of semantics that are compatible at once with the POSIX
> rules and the traditional Unix semantics for root. So if someone
> knows how to do that, he should speak up at that point.

Well, current system is not posix-draft-16, and I guess someone
interested in posix-draft-16 needs to submit patch.

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html