]> xenbits.xensource.com Git - people/dariof/libvirt.git/commitdiff
LXC: controller: change the owner of /dev/pts and ptmx to the root of container
authorGao feng <gaofeng@cn.fujitsu.com>
Fri, 7 Jun 2013 07:12:26 +0000 (15:12 +0800)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 2 Jul 2013 10:20:05 +0000 (11:20 +0100)
These files are created for container,
the owner should be the root user of container.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
src/lxc/lxc_controller.c

index 8ee4dd448fa5bbf07debdbe68e2e0a4b84632496..4c825aa05dc86ef9f3e45128cc5e456c4206602b 100644 (file)
@@ -1548,6 +1548,10 @@ virLXCControllerSetupDevPTS(virLXCControllerPtr ctrl)
         goto cleanup;
     }
 
+    if ((virLXCControllerChown(ctrl, ctrl->devptmx) < 0) ||
+        (virLXCControllerChown(ctrl, devpts) < 0))
+         goto cleanup;
+
     ret = 0;
 
 cleanup: