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 <gaofeng@cn.fujitsu.com>
This commit is contained in:
Gao feng 2013-07-16 10:00:01 +08:00 committed by Eric Blake
parent 7161f0a385
commit ae4e916f04

View File

@ -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;