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 <gaofeng@cn.fujitsu.com>
This commit is contained in:
Gao feng 2013-07-16 10:00:03 +08:00 committed by Eric Blake
parent 14a0c4084d
commit 4f41a8e5b2

View File

@ -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