
# HG changeset patch # User Eduardo Lima (Etrunko) <eblima@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@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;