[libvirt] [PATCH v4 07/10] LXC: controller: change the owner of /dev to the root user of container

Gao feng gaofeng at cn.fujitsu.com
Fri Jun 7 07:12:24 UTC 2013


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 at cn.fujitsu.com>
---
 src/lxc/lxc_controller.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 66eae16..f6622bf 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);
-- 
1.8.1.4




More information about the libvir-list mailing list