From: Gao feng Date: Fri, 7 Jun 2013 07:12:25 +0000 (+0800) Subject: LXC: controller: change the owner of devices created on host X-Git-Tag: CVE-2013-2230~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a591ae6068fd34daa2db5c69d736b7193becbe56;p=thirdparty%2Flibvirt.git 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 --- 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); }