[PATCH 1/2] rpc: libssh2: Add more debugging info

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

 



---
 src/rpc/virnetsshsession.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c
index 7f47b29..becdf6e 100644
--- a/src/rpc/virnetsshsession.c
+++ b/src/rpc/virnetsshsession.c
@@ -524,6 +524,8 @@ virNetSSHAuthenticateAgent(virNetSSHSessionPtr sess,
     int ret;
     char *errmsg;

+    VIR_DEBUG("sess=%p", sess);
+
     if (libssh2_agent_connect(sess->agent) < 0) {
         virReportError(VIR_ERR_SSH, "%s",
                        _("Failed to connect to ssh agent"));
@@ -595,6 +597,8 @@ virNetSSHAuthenticatePrivkey(virNetSSHSessionPtr sess,
     int ret;
     char *tmp;

+    VIR_DEBUG("sess=%p", sess);
+
     /* try open the key with no password */
     if ((ret = libssh2_userauth_publickey_fromfile(sess->session,
                                                    priv->username,
@@ -697,6 +701,8 @@ virNetSSHAuthenticatePassword(virNetSSHSessionPtr sess,
     int ret = -1;
     int rc;

+    VIR_DEBUG("sess=%p", sess);
+
     if (priv->password) {
         /* tunelled password authentication */
         if ((ret = libssh2_userauth_password(sess->session,
@@ -770,6 +776,8 @@ virNetSSHAuthenticateKeyboardInteractive(virNetSSHSessionPtr sess,
     char *errmsg;
     int ret;

+    VIR_DEBUG("sess=%p", sess);
+
     if (!sess->cred || !sess->cred->cb) {
         virReportError(VIR_ERR_SSH, "%s",
                        _("Can't perform keyboard-interactive authentication: "
@@ -837,6 +845,8 @@ virNetSSHAuthenticate(virNetSSHSessionPtr sess)
     size_t i;
     int ret;

+    VIR_DEBUG("sess=%p", sess);
+
     if (!sess->nauths) {
         virReportError(VIR_ERR_SSH, "%s",
                        _("No authentication methods and credentials "
-- 
2.4.5

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