From: John Ferlan Date: Tue, 14 Aug 2018 14:33:26 +0000 (-0400) Subject: rpc: Don't overwrite virAuthGet{Username|Password}Path errors X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f951277716e88d96577099a7b2d821528bf2d333;p=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 Reviewed-by: Marcos Paulo de Souza --- 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,