提交 a6584eb6 编写于 作者: P Peter Krempa 提交者: Cole Robinson

rpc: libssh2: Add more debugging info

(cherry picked from commit 387c316e)
上级 9a51c500
...@@ -524,6 +524,8 @@ virNetSSHAuthenticateAgent(virNetSSHSessionPtr sess, ...@@ -524,6 +524,8 @@ virNetSSHAuthenticateAgent(virNetSSHSessionPtr sess,
int ret; int ret;
char *errmsg; char *errmsg;
VIR_DEBUG("sess=%p", sess);
if (libssh2_agent_connect(sess->agent) < 0) { if (libssh2_agent_connect(sess->agent) < 0) {
virReportError(VIR_ERR_SSH, "%s", virReportError(VIR_ERR_SSH, "%s",
_("Failed to connect to ssh agent")); _("Failed to connect to ssh agent"));
...@@ -595,6 +597,8 @@ virNetSSHAuthenticatePrivkey(virNetSSHSessionPtr sess, ...@@ -595,6 +597,8 @@ virNetSSHAuthenticatePrivkey(virNetSSHSessionPtr sess,
int ret; int ret;
char *tmp; char *tmp;
VIR_DEBUG("sess=%p", sess);
/* try open the key with no password */ /* try open the key with no password */
if ((ret = libssh2_userauth_publickey_fromfile(sess->session, if ((ret = libssh2_userauth_publickey_fromfile(sess->session,
priv->username, priv->username,
...@@ -697,6 +701,8 @@ virNetSSHAuthenticatePassword(virNetSSHSessionPtr sess, ...@@ -697,6 +701,8 @@ virNetSSHAuthenticatePassword(virNetSSHSessionPtr sess,
int ret = -1; int ret = -1;
int rc; int rc;
VIR_DEBUG("sess=%p", sess);
if (priv->password) { if (priv->password) {
/* tunelled password authentication */ /* tunelled password authentication */
if ((ret = libssh2_userauth_password(sess->session, if ((ret = libssh2_userauth_password(sess->session,
...@@ -770,6 +776,8 @@ virNetSSHAuthenticateKeyboardInteractive(virNetSSHSessionPtr sess, ...@@ -770,6 +776,8 @@ virNetSSHAuthenticateKeyboardInteractive(virNetSSHSessionPtr sess,
char *errmsg; char *errmsg;
int ret; int ret;
VIR_DEBUG("sess=%p", sess);
if (!sess->cred || !sess->cred->cb) { if (!sess->cred || !sess->cred->cb) {
virReportError(VIR_ERR_SSH, "%s", virReportError(VIR_ERR_SSH, "%s",
_("Can't perform keyboard-interactive authentication: " _("Can't perform keyboard-interactive authentication: "
...@@ -837,6 +845,8 @@ virNetSSHAuthenticate(virNetSSHSessionPtr sess) ...@@ -837,6 +845,8 @@ virNetSSHAuthenticate(virNetSSHSessionPtr sess)
size_t i; size_t i;
int ret; int ret;
VIR_DEBUG("sess=%p", sess);
if (!sess->nauths) { if (!sess->nauths) {
virReportError(VIR_ERR_SSH, "%s", virReportError(VIR_ERR_SSH, "%s",
_("No authentication methods and credentials " _("No authentication methods and credentials "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册