Re: [PATCH v4] Introduce v3 namespaced file capabilities

From: Amir Goldstein
Date: Tue Jun 20 2017 - 15:57:05 EST

On Tue, Jun 20, 2017 at 8:33 PM, Stefan Berger
<stefanb@xxxxxxxxxxxxxxxxxx> wrote:
> On 06/20/2017 08:19 AM, Stefan Berger wrote:
>> On 06/20/2017 01:42 AM, Amir Goldstein wrote:

>>> Apropos stackable filesystems [cc some overlayfs folks], is there any
>>> way that parts of this work could be generalized towards ns aware
>>> trusted@uid.* xattr?
>> I am at least removing all string comparison with xattr names from the
>> core code and move the enabled xattr names into a list. For the security.*
>> extended attribute names we would enumerated the enabled ones in that list,
>> only security.capability for now. I am not sure how the trusted.* space
>> works.
> I extended 'the infrastructure' now to support prefix matching for trusted.*
> and probably others as well. It's fairly easy to do that but would not write
> the code like that for exact string matching to support security.capability.
> The patch lets me write from within the userns if
> uid=100 exists, rejects it otherwise. It may be written out as
> for root mapping to uid 1000. I can list this entry on
> the host. For some reason trusted.* is not listed at all inside the userns.
> So something else needs to be enabled as well. For now it looks like this:

That looks useful!
I hope someone who knows his way around trusted xattr can say what's missing.