提交 f9512777 编写于 作者: J John Ferlan

rpc: Don't overwrite virAuthGet{Username|Password}Path errors

Now that the virAuthGet*Path API's generate all the error messages
we can remove them from the callers.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
Reviewed-by: NMarcos Paulo de Souza <marcos.souza.org@gmail.com>
上级 a9a476e3
......@@ -637,8 +637,6 @@ virNetLibsshAuthenticatePassword(virNetLibsshSessionPtr sess,
if (!(password = virAuthGetPasswordPath(sess->authPath, sess->cred,
"ssh", sess->username,
sess->hostname))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("failed to retrieve password"));
ret = SSH_AUTH_ERROR;
goto cleanup;
}
......
......@@ -726,11 +726,8 @@ virNetSSHAuthenticatePassword(virNetSSHSessionPtr sess,
while (true) {
if (!(password = virAuthGetPasswordPath(sess->authPath, sess->cred,
"ssh", priv->username,
sess->hostname))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("failed to retrieve password"));
sess->hostname)))
goto cleanup;
}
/* tunelled password authentication */
if ((rc = libssh2_userauth_password(sess->session,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册