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:
John Ferlan 2018-08-14 10:33:26 -04:00
parent a9a476e3fb
commit f951277716
2 changed files with 1 additions and 6 deletions

View File

@ -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;
}

View File

@ -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,