]> git.proxmox.com Git - mirror_lxc.git/commit
start: make us dumpable
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 22 Dec 2017 16:11:45 +0000 (17:11 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 22 Dec 2017 16:23:45 +0000 (17:23 +0100)
commit4b826b1fdc516c71c7222ef68a45c4f6ad964df1
tree1dbe2d12c7853ec37fdeaccfbd6b7824eab6d059
parent150901398d4b455956e6ad10ae49313f1e58a825
start: make us dumpable

When set set{u,g}id() the kernel will make us undumpable. This is unnecessary
since we can guarantee that whatever is running inside the child process at
this point this is fully trusted by the parent. Making us dumpable let's users
use debuggers on the child process before the exec as well and also allows us
to open /proc/<child-pid> files in lieu of the child.
Note, that we only need to perform the prctl(PR_SET_DUMPABLE, ...) if our
effective uid on the host is not 0. If our effective uid on the host is 0 then
we will keep all capabilities in the child user namespace across set{g,u}id().

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c