Re: [PATCH v2 2/3] capabilities: add baselabel per sec driver/virt type to secmodel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 05, 2013 at 01:49:44PM +0200, Giuseppe Scrivano wrote:
>      for (i = 0; sec_managers[i]; i++) {
> +        virCapsHostSecModelPtr sm = &caps->host.secModels[i];
>          doi = virSecurityManagerGetDOI(sec_managers[i]);
>          model = virSecurityManagerGetModel(sec_managers[i]);
> -        if (VIR_STRDUP(caps->host.secModels[i].model, model) < 0 ||
> -            VIR_STRDUP(caps->host.secModels[i].doi, doi) < 0)
> +        label = virSecurityManagerGetBaseLabel(sec_managers[i]);

You need to call this twice, once for kvm and once for qemu
since different labels will be used

> +        if (VIR_STRDUP(sm->model, model) < 0 ||
> +            VIR_STRDUP(sm->doi, doi) < 0 ||
> +            virCapabilitiesHostSecModelAddBaseLabel(sm, "kvm", label) < 0 ||
> +            virCapabilitiesHostSecModelAddBaseLabel(sm, "qemu", label) < 0)

And pass in the different labels here.

Also, you need to update the lxc_driver code to set this metadata since
it uses sVirt too.

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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]