[Pkg-libvirt-commits] [libguestfs] 98/384: v2v: Get passwords in domain XML (RHBZ#1174123).

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 29 16:55:52 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit dfded7c94118e8888dec38f11c2af62d8156a59e
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Mon Dec 15 08:55:12 2014 +0000

    v2v: Get passwords in domain XML (RHBZ#1174123).
    
    Thanks: Tingting Zheng
---
 v2v/domainxml-c.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/v2v/domainxml-c.c b/v2v/domainxml-c.c
index b57440c..c9ed8c5 100644
--- a/v2v/domainxml-c.c
+++ b/v2v/domainxml-c.c
@@ -138,7 +138,10 @@ v2v_dumpxml (value passwordv, value connv, value domnamev)
   authdata.cb = libvirt_auth_default_wrapper;
   authdata.cbdata = (void *) password;
 
-  conn = virConnectOpenAuth (conn_uri, &authdata, VIR_CONNECT_RO);
+  /* Note this cannot be a read-only connection since we need to use
+   * the VIR_DOMAIN_XML_SECURE flag below.
+   */
+  conn = virConnectOpenAuth (conn_uri, &authdata, 0);
   if (conn == NULL) {
     if (conn_uri)
       snprintf (errmsg, sizeof errmsg,
@@ -188,7 +191,8 @@ v2v_dumpxml (value passwordv, value connv, value domnamev)
     }
   }
 
-  xml = virDomainGetXMLDesc (dom, 0);
+  /* Use VIR_DOMAIN_XML_SECURE to get passwords (RHBZ#1174123). */
+  xml = virDomainGetXMLDesc (dom, VIR_DOMAIN_XML_SECURE);
   if (xml == NULL) {
     err = virGetLastError ();
     snprintf (errmsg, sizeof errmsg,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list