[libvirt] [PATCH 5/5] xenapi: Drop check for auth

Marcos Paulo de Souza marcos.souza.org at gmail.com
Fri Aug 3 00:27:55 UTC 2018


Since they are done inside virAuthGetPassword and virAuthGetUsername
when needed. Also, only auth is checked, but auth->cb, which that could
lead to a crash if the callback is NULL.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
---
 src/xenapi/xenapi_driver.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index 34f9e2c717..3af5eeafcf 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -152,12 +152,6 @@ xenapiConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
         goto error;
     }
 
-    if (auth == NULL) {
-        xenapiSessionErrorHandler(conn, VIR_ERR_AUTH_FAILED,
-                                  _("Authentication Credentials not found"));
-        goto error;
-    }
-
     if (conn->uri->user != NULL) {
         if (VIR_STRDUP(username, conn->uri->user) < 0)
             goto error;
-- 
2.17.1




More information about the libvir-list mailing list