From: Gao feng Date: Fri, 7 Jun 2013 07:12:26 +0000 (+0800) Subject: LXC: controller: change the owner of /dev/pts and ptmx to the root of container X-Git-Tag: CVE-2013-2230~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c7665e1500a2020c21ac8a572ec46a21832ffcc;p=thirdparty%2Flibvirt.git LXC: controller: change the owner of /dev/pts and ptmx to the root of container These files 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 8ee4dd448f..4c825aa05d 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -1548,6 +1548,10 @@ virLXCControllerSetupDevPTS(virLXCControllerPtr ctrl) goto cleanup; } + if ((virLXCControllerChown(ctrl, ctrl->devptmx) < 0) || + (virLXCControllerChown(ctrl, devpts) < 0)) + goto cleanup; + ret = 0; cleanup: