[libvirt] [PATCH RESEND 4/7] LXC: Change the owner of live attached disk device

Daniel P. Berrange berrange at redhat.com
Tue Jul 16 10:47:33 UTC 2013


On Tue, Jul 16, 2013 at 10:00:03AM +0800, Gao feng wrote:
> The owner of this disk device should be the root user of container.
> 
> Signed-off-by: Gao feng <gaofeng at cn.fujitsu.com>
> ---
>  src/lxc/lxc_driver.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
> index 1279edf..bd92135 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

ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list