]> git.ipfire.org Git - thirdparty/lxc.git/commit
container start: clone newcgroup immediately 1058/head
authorSerge Hallyn <serge@hallyn.com>
Sat, 25 Jun 2016 05:05:08 +0000 (00:05 -0500)
committerSerge Hallyn <serge@hallyn.com>
Sat, 25 Jun 2016 05:10:33 +0000 (00:10 -0500)
commit9fac8fbbd9801867c5329ba43a9cbc0f0e80e14c
tree89a6af79ddd57ffda93ffd7da510c1258f663eb4
parentb2a245c2b4538ebd1861882cdd2bb66176f031ca
container start: clone newcgroup immediately

rather than waiting and later unsharing.

This "makes the creation of a new cgroup early enough that the existing
cgroup mounts are visible.  Which means any fancy permission checks
I dream will work on a future version of liblxc."

This also includes what should be a tiny improvement regarding netns,
though it's conceivable it'll break something.  Remember that with new
kernels we need to unshare netns after we've become the root user in the
new userns, so that netns files are owned by that root.  But we were
passing the unfiltered handler->clone_flags to the original clone().
This just resulted in a temporary extra netns generation, but still
worked since our target netns, which we passed our devices into, was
created late enough.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
src/lxc/start.c