]> git.ipfire.org Git - thirdparty/libvirt.git/commit
LXC: introduce virLXCControllerSetupUserns and lxcContainerSetID
authorGao feng <gaofeng@cn.fujitsu.com>
Fri, 7 Jun 2013 07:12:21 +0000 (15:12 +0800)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 2 Jul 2013 10:20:04 +0000 (11:20 +0100)
commit9a085a228c8cf87cd75144d3993e3d4eae952e2e
tree9ce061b6cf31955ae5cd24f7f5953358b4f150a7
parent43d4f46aeb7fa7b9888c190d2b9e3d1155f97956
LXC: introduce virLXCControllerSetupUserns and lxcContainerSetID

This patch introduces new helper function
virLXCControllerSetupUserns, in this function,
we set the files uid_map and gid_map of the init
task of container.

lxcContainerSetID is used for creating cred for
tasks running in container. Since after setuid/setgid,
we may be a new user. This patch calls lxcContainerSetUserns
at first to make sure the new created files belong to
right user.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
src/lxc/lxc_container.c
src/lxc/lxc_controller.c