[PATCH 11/11] rpc: Don't overwrite virAuthGet{Username|Password}Path errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux