From a591ae6068fd34daa2db5c69d736b7193becbe56 Mon Sep 17 00:00:00 2001 From: Gao feng Date: Fri, 7 Jun 2013 15:12:25 +0800 Subject: [PATCH] LXC: controller: change the owner of devices created on host Since these devices are created for the container. the owner should be the root user of the container. Signed-off-by: Gao feng --- src/lxc/lxc_controller.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 0231ecb5d6..8ee4dd448f 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -1305,6 +1305,10 @@ static int virLXCControllerPopulateDevices(virLXCControllerPtr ctrl) path); goto cleanup; } + + if (virLXCControllerChown(ctrl, path) < 0) + goto cleanup; + VIR_FREE(path); } -- GitLab