[PATCH 4/5] phyp: Drop check for auth and auth->cb

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

 



Since they are done inside virAuthGetPassword and virAuthGetUsername
when needed.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@xxxxxxxxx>
---
 src/phyp/phyp_driver.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index d78de83231..5b17508dae 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -957,12 +957,6 @@ openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
         if (VIR_STRDUP(username, conn->uri->user) < 0)
             goto err;
     } else {
-        if (auth == NULL || auth->cb == NULL) {
-            virReportError(VIR_ERR_AUTH_FAILED,
-                           "%s", _("No authentication callback provided."));
-            goto err;
-        }
-
         username = virAuthGetUsername(conn, auth, "ssh", NULL, conn->uri->server);
 
         if (username == NULL) {
@@ -1039,11 +1033,6 @@ openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
     if (rc == LIBSSH2_ERROR_SOCKET_NONE
         || rc == LIBSSH2_ERROR_PUBLICKEY_UNRECOGNIZED
         || rc == LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED) {
-        if (auth == NULL || auth->cb == NULL) {
-            virReportError(VIR_ERR_AUTH_FAILED,
-                           "%s", _("No authentication callback provided."));
-            goto disconnect;
-        }
 
         password = virAuthGetPassword(conn, auth, "ssh", username, conn->uri->server);
 
-- 
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