[libvirt] [PATCH] Fix sec label setup when attaching to QEMU processes
Eric Blake
eblake at redhat.com
Tue Mar 11 16:06:37 UTC 2014
On 03/11/2014 09:17 AM, Daniel P. Berrange wrote:
> When attaching to a QEMU process, the def->seclabels array is
> going to be empty. The qemuProcessAttach method must thus
> populate it with data for the security drivers.
>
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
> src/qemu/qemu_process.c | 19 +++++++++++++++++--
> 1 file changed, 17 insertions(+), 2 deletions(-)
>
> @@ -4529,10 +4530,16 @@ int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED,
> goto error;
>
> for (i = 0; sec_managers[i]; i++) {
> + seclabelgen = false;
> + VIR_ERROR("Iter %zu", i);
> model = virSecurityManagerGetModel(sec_managers[i]);
> seclabeldef = virDomainDefGetSecurityLabelDef(vm->def, model);
> - if (seclabeldef == NULL)
> - goto error;
> + VIR_ERROR("model %s def %p", model, seclabeldef);
Do you really want VIR_ERROR() in here, or was this debug printf?
Everything else makes sense; ACK.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140311/ce691168/attachment-0001.sig>
More information about the libvir-list
mailing list