Quoting Stefan Berger (stefanb@xxxxxxxxxxxxxxxxxx):
On 07/13/2017 08:38 PM, Eric W. Biederman wrote:Not really. If the file is owned by a uid mapped into the container,
Stefan Berger <stefanb@xxxxxxxxxxxxxxxxxx> writes:That case would prevent a container user from overriding the xattr
On 07/13/2017 01:49 PM, Eric W. Biederman wrote:The latter.
My big question right now is can you implement Ted's suggestedWe need to raw-list the xattrs and do the check before writing them. I am fairly sure this can be done.
restriction. Only one security.foo or secuirty.foo@... attribute ?
So now you want to allow security.foo and one security.foo@uid=<> or just a single one security.foo(@[[:print:]]*)?
on the host. Is that what we want? For limiting the number of xattrs
then the container root can chown the file which will clear the file
capability, after which he can set a new one. If the file is not
owned by a uid mapped into the container, then container root could
not set a filecap anyway.