Re: [PATCH] Prevent crash of libvirtd when attaching to existing qemu process

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

 



On 12/07/2011 11:27 AM, Jim Fehlig wrote:
> With security_driver set to "none" in /etc/libvirt/qemu.conf,
> libvirtd would crash when attempted to attach to an existing
> qemu process.  Only copy the security model if it actually exists.
> ---
>  src/qemu/qemu_process.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index 9309761..45ed011 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -3609,7 +3609,8 @@ int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED,
>      if (virSecurityManagerGetProcessLabel(driver->securityManager,
>                                            vm, seclabel) < 0)
>          goto cleanup;
> -    if (!(vm->def->seclabel.model = strdup(driver->caps->host.secModel.model)))
> +    if (driver->caps->host.secModel.model &&
> +        !(vm->def->seclabel.model = strdup(driver->caps->host.secModel.model)))

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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