]> git.ipfire.org Git - thirdparty/lxc.git/commit
conf: handle kernels with CAP_SETFCAP 3827/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 6 May 2021 16:16:45 +0000 (18:16 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 6 May 2021 16:16:45 +0000 (18:16 +0200)
commit86c780115a6ad14673f0b6b057219020b0523014
treeed1b58f8e714b478f7a6fe38bcb5e6374358e093
parent78af4d9c908c4c2f885528f31447c4ddebd7edfa
conf: handle kernels with CAP_SETFCAP

LXC is being very clever and sometimes maps the caller's uid into the
child userns. This means that the caller can technically write fscaps
that are valid in the ancestor userns (which can be a security issue in
some scenarios) so newer kernels require CAP_SETFCAP to do this. Until
newuidmap/newgidmap are updated to account for this simply write the
mapping directly in this case.

Cc: stable-4.0
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c