[Libvirt-cim] [PATCH] libxkutil: Handle vnc password when retrieving domain XML

Sharad Mishra snmishra at us.ibm.com
Mon Jul 18 15:11:37 UTC 2011


Sharad Mishra
Open Virtualization
Linux Technology Center
IBM

libvirt-cim-bounces at redhat.com wrote on 07/18/2011 07:41:51 AM:

> Chip Vincent <cvincent at linux.vnet.ibm.com>
> Sent by: libvirt-cim-bounces at redhat.com
>
> 07/18/11 07:41 AM
>
> Please respond to
> cvincent at linux.vnet.ibm.com; Please respond to
> List for discussion and development of libvirt CIM
<libvirt-cim at redhat.com>
>
> To
>
> libvirt-cim at redhat.com
>
> cc
>
> Subject
>
> Re: [Libvirt-cim] [PATCH] libxkutil: Handle vnc password when
> retrieving domain XML
>
> +1 and pushed.
>
> BTW - Prior to this change, libvirt-cim was using the info store
> (has_vnc_passwd) for persisting the fact the password was set. It
> appears we can now remove that logic since the XML contains this data.

Please remove the logic.

>
> For reference:
> Virt_VirtualSystemManagementService.c ~1548 sets has_vnc_passwd
> Virt_RASD.c ~457 fetches has_vnc_passwd
>
> Objections?

I don't see any.

>
> On 07/18/2011 10:13 AM, Eduardo Lima (Etrunko) wrote:
> > # HG changeset patch
> > # User Eduardo Lima (Etrunko)<eblima at br.ibm.com>
> > # Date 1310998420 10800
> > # Node ID 3c90a88a5199a4ed931a4a76097cff8f55deae41
> > # Parent  3ac0556ffdf12015839ebafe035547cea5b715f5
> > libxkutil: Handle vnc password when retrieving domain XML
> >
> > Whenever a call for ModifyResourceSettings was issued, the XML for the
> > domain was requested, parsed, the property had its value changed and
then
> > XML was updated with the new value.
> >
> > It occurs that we need to specify the VIR_DOMAIN_XML_SECURE flag to
retrieve
> > full domain info, including sensitive fields, such as passwords. This
patch
> > fixes the problem for vnc password, which was not handled in the XML
parsing
> > code.
> >
> > Signed-off-by: Eduardo Lima (Etrunko)<eblima at br.ibm.com>
> >
> > diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c
> > --- a/libxkutil/device_parsing.c
> > +++ b/libxkutil/device_parsing.c
> > @@ -525,6 +525,7 @@
> >                   gdev->port = get_attr_value(node, "port");
> >                   gdev->host = get_attr_value(node, "listen");
> >                   gdev->keymap = get_attr_value(node, "keymap");
> > +                gdev->passwd = get_attr_value(node, "passwd");
> >
> >                   if (gdev->port == NULL || gdev->host == NULL)
> >                           goto err;
> > @@ -1127,7 +1128,7 @@
> >           char *xml;
> >           int ret;
> >           int start;
> > -        xml = virDomainGetXMLDesc(dom, 0);
> > +        xml = virDomainGetXMLDesc(dom, VIR_DOMAIN_XML_SECURE);
> >
> >           if (xml == NULL)
> >                   return 0;
> >
> > _______________________________________________
> > Libvirt-cim mailing list
> > Libvirt-cim at redhat.com
> > https://www.redhat.com/mailman/listinfo/libvirt-cim
>
> --
> Chip Vincent
> Open Virtualization
> IBM Linux Technology Center
> cvincent at linux.vnet.ibm.com
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20110718/f57515f0/attachment.htm>


More information about the Libvirt-cim mailing list