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

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

index 0231ecb5d6642a5407f2558fee5c913720f70105..8ee4dd448fa5bbf07debdbe68e2e0a4b84632496 100644 (file)
@@ -1305,6 +1305,10 @@ static int virLXCControllerPopulateDevices(virLXCControllerPtr ctrl)
                                  path);
             goto cleanup;
         }
+
+        if (virLXCControllerChown(ctrl, path) < 0)
+            goto cleanup;
+
         VIR_FREE(path);
     }