From: Gao feng Date: Tue, 16 Jul 2013 02:00:03 +0000 (+0800) Subject: LXC: Change the owner of live attached disk device X-Git-Tag: v1.1.1-rc1~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f41a8e5b2291595374ecc02b43ec4441eb9c4e0;p=thirdparty%2Flibvirt.git LXC: Change the owner of live attached disk device The owner of this disk device should be the root user of container. Signed-off-by: Gao feng --- diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 1279edfaa6..bd921351a2 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -3258,6 +3258,10 @@ lxcDomainAttachDeviceDiskLive(virLXCDriverPtr driver, dst); goto cleanup; } + + if (lxcContainerChown(vm->def, dst) < 0) + goto cleanup; + created = true; /* Labelling normally operates on src, but we need