[libvirt] [PATCH] qemu: fix cannot set graphic passwd via qemuDomainSaveImageDefineXML

lhuang lhuang at redhat.com
Thu Jan 29 00:49:47 UTC 2015


On 01/29/2015 12:25 AM, Michal Privoznik wrote:
> On 20.01.2015 10:04, Luyao Huang wrote:
>> https://bugzilla.redhat.com/show_bug.cgi?id=1183890
>>
>> When we try to update a xml to a image file, we will clear the
>> graphics passwd settings, because we do not pass VIR_DOMAIN_XML_SECURE
>> to qemuDomainDefCopy, qemuDomainDefFormatBuf won't format the passwd.
>>
>> Add VIR_DOMAIN_XML_SECURE flag when we call qemuDomainDefCopy
>> in qemuDomainSaveImageUpdateDef.
>>
>> Signed-off-by: Luyao Huang <lhuang at redhat.com>
>> ---
>>   src/qemu/qemu_driver.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>> index 5994558..abe3b9f 100644
>> --- a/src/qemu/qemu_driver.c
>> +++ b/src/qemu/qemu_driver.c
>> @@ -5613,7 +5613,8 @@ qemuDomainSaveImageUpdateDef(virQEMUDriverPtr driver,
>>   
>>       if (!(newdef_migr = qemuDomainDefCopy(driver,
>>                                             newdef,
>> -                                          VIR_DOMAIN_XML_MIGRATABLE)))
>> +                                          VIR_DOMAIN_XML_MIGRATABLE |
>> +                                          VIR_DOMAIN_XML_SECURE)))
>>           goto cleanup;
>>   
>>       if (!virDomainDefCheckABIStability(def, newdef_migr)) {
>>
> ACKed and pushed. Thanks for catching that.

Thanks for your review and push.
>
> Michal

Luyao




More information about the libvir-list mailing list