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

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

index 5d721cfccdf8eb5a79c6aff676e8f734f38fe77b..0231ecb5d6642a5407f2558fee5c913720f70105 100644 (file)
@@ -1257,6 +1257,9 @@ static int virLXCControllerSetupDev(virLXCControllerPtr ctrl)
         goto cleanup;
     }
 
+    if (virLXCControllerChown(ctrl, dev) < 0)
+        goto cleanup;
+
     ret = 0;
 cleanup:
     VIR_FREE(opts);