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(a)redhat.com>
---
src/rpc/virnetlibsshsession.c | 2 --
src/rpc/virnetsshsession.c | 5 +----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c
index 21eb9f2500..7c5f158f4d 100644
--- a/src/rpc/virnetlibsshsession.c
+++ b/src/rpc/virnetlibsshsession.c
@@ -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;
}
diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c
index 6566f36ce0..35dc6c5356 100644
--- a/src/rpc/virnetsshsession.c
+++ b/src/rpc/virnetsshsession.c
@@ -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,
--
2.17.1