]> xenbits.xensource.com Git - libvirt.git/commitdiff
rpc: Don't overwrite virAuthGet{Username|Password}Path errors
authorJohn Ferlan <jferlan@redhat.com>
Tue, 14 Aug 2018 14:33:26 +0000 (10:33 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 15 Aug 2018 19:42:37 +0000 (15:42 -0400)
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>
src/rpc/virnetlibsshsession.c
src/rpc/virnetsshsession.c

index 21eb9f2500183ceb575539a9d29344fac89122a9..7c5f158f4d52b6ff1f806ed6b835535074cb1afa 100644 (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;
             }
index 6566f36ce01c5c48762d4258a7f03212ef36abea..35dc6c5356fb6f676f97b25a21d5efec03d5693a 100644 (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,