From: Gao feng Date: Fri, 7 Jun 2013 07:12:24 +0000 (+0800) Subject: LXC: controller: change the owner of /dev to the root user of container X-Git-Tag: CVE-2013-2230~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40a8fe6d25b02c5b13b823e691b9689e024d72cc;p=thirdparty%2Flibvirt.git LXC: controller: change the owner of /dev to the root user of container container will create /dev/pts directory in /dev. the owner of /dev 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 5d721cfccd..0231ecb5d6 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -1257,6 +1257,9 @@ static int virLXCControllerSetupDev(virLXCControllerPtr ctrl) goto cleanup; } + if (virLXCControllerChown(ctrl, dev) < 0) + goto cleanup; + ret = 0; cleanup: VIR_FREE(opts);