mirror of https://gitee.com/openkylin/libvirt.git
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: John Ferlan <jferlan@redhat.com> Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
This commit is contained in:
parent
a9a476e3fb
commit
f951277716
|
@ -637,8 +637,6 @@ virNetLibsshAuthenticatePassword(virNetLibsshSessionPtr sess,
|
||||||
if (!(password = virAuthGetPasswordPath(sess->authPath, sess->cred,
|
if (!(password = virAuthGetPasswordPath(sess->authPath, sess->cred,
|
||||||
"ssh", sess->username,
|
"ssh", sess->username,
|
||||||
sess->hostname))) {
|
sess->hostname))) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
|
||||||
_("failed to retrieve password"));
|
|
||||||
ret = SSH_AUTH_ERROR;
|
ret = SSH_AUTH_ERROR;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
|
@ -726,11 +726,8 @@ virNetSSHAuthenticatePassword(virNetSSHSessionPtr sess,
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!(password = virAuthGetPasswordPath(sess->authPath, sess->cred,
|
if (!(password = virAuthGetPasswordPath(sess->authPath, sess->cred,
|
||||||
"ssh", priv->username,
|
"ssh", priv->username,
|
||||||
sess->hostname))) {
|
sess->hostname)))
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
|
||||||
_("failed to retrieve password"));
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
|
||||||
|
|
||||||
/* tunelled password authentication */
|
/* tunelled password authentication */
|
||||||
if ((rc = libssh2_userauth_password(sess->session,
|
if ((rc = libssh2_userauth_password(sess->session,
|
||||||
|
|
Loading…
Reference in New Issue