]> xenbits.xensource.com Git - libvirt.git/commitdiff
LXC: controller: change the owner of disk to the root of container
authorGao feng <gaofeng@cn.fujitsu.com>
Tue, 16 Jul 2013 02:00:01 +0000 (10:00 +0800)
committerEric Blake <eblake@redhat.com>
Tue, 16 Jul 2013 15:58:53 +0000 (09:58 -0600)
These disk devices 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 e9d2848302b98107075d9e8f0be41fd7cfffd00c..38b632e355da113756126e58797e3bec65595e79 100644 (file)
@@ -1369,6 +1369,9 @@ static int virLXCControllerSetupDisk(virLXCControllerPtr ctrl,
         goto cleanup;
     }
 
+    if (virLXCControllerChown(ctrl, dst) < 0)
+        goto cleanup;
+
     /* Labelling normally operates on src, but we need
      * to actally label the dst here, so hack the config */
     def->src = dst;