From: Gao feng Date: Tue, 16 Jul 2013 02:00:01 +0000 (+0800) Subject: LXC: controller: change the owner of disk to the root of container X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ae4e916f0433da7c8894eaee743262166ee853d8;p=libvirt.git LXC: controller: change the owner of disk to the root of container These disk devices are created for container, the owner should be the root user of container. Signed-off-by: Gao feng --- diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index e9d2848302..38b632e355 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -1369,6 +1369,9 @@ static int virLXCControllerSetupDisk(virLXCControllerPtr ctrl, goto cleanup; } + if (virLXCControllerChown(ctrl, dst) < 0) + goto cleanup; + /* Labelling normally operates on src, but we need * to actally label the dst here, so hack the config */ def->src = dst;