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

[libvirt] [PATCH 10/14] Rename virRequest{Username, Password} to virAuthGet{Username, Password}



From: "Daniel P. Berrange" <berrange redhat com>

Ensure that the functions in virauth.h have names matching the file
prefix, by renaming  virRequest{Username,Password} to
virAuthGet{Username,Password}
---
 src/esx/esx_driver.c       |    8 ++++----
 src/hyperv/hyperv_driver.c |    4 ++--
 src/libvirt_private.syms   |    5 +++++
 src/phyp/phyp_driver.c     |    4 ++--
 src/util/virauth.c         |    4 ++--
 src/util/virauth.h         |    4 ++--
 src/xenapi/xenapi_driver.c |    4 ++--
 7 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 51bd5b2..7689306 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -700,7 +700,7 @@ esxConnectToHost(esxPrivate *priv, virConnectAuthPtr auth,
             goto cleanup;
         }
     } else {
-        username = virRequestUsername(auth, "root", hostname);
+        username = virAuthGetUsername(auth, "root", hostname);
 
         if (username == NULL) {
             ESX_ERROR(VIR_ERR_AUTH_FAILED, "%s", _("Username request failed"));
@@ -708,7 +708,7 @@ esxConnectToHost(esxPrivate *priv, virConnectAuthPtr auth,
         }
     }
 
-    unescapedPassword = virRequestPassword(auth, username, hostname);
+    unescapedPassword = virAuthGetPassword(auth, username, hostname);
 
     if (unescapedPassword == NULL) {
         ESX_ERROR(VIR_ERR_AUTH_FAILED, "%s", _("Password request failed"));
@@ -830,7 +830,7 @@ esxConnectToVCenter(esxPrivate *priv, virConnectAuthPtr auth,
             goto cleanup;
         }
     } else {
-        username = virRequestUsername(auth, "administrator", hostname);
+        username = virAuthGetUsername(auth, "administrator", hostname);
 
         if (username == NULL) {
             ESX_ERROR(VIR_ERR_AUTH_FAILED, "%s", _("Username request failed"));
@@ -838,7 +838,7 @@ esxConnectToVCenter(esxPrivate *priv, virConnectAuthPtr auth,
         }
     }
 
-    unescapedPassword = virRequestPassword(auth, username, hostname);
+    unescapedPassword = virAuthGetPassword(auth, username, hostname);
 
     if (unescapedPassword == NULL) {
         ESX_ERROR(VIR_ERR_AUTH_FAILED, "%s", _("Password request failed"));
diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index 5ca20cf..0469e2e 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -147,7 +147,7 @@ hypervOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int flags)
             goto cleanup;
         }
     } else {
-        username = virRequestUsername(auth, "administrator", conn->uri->server);
+        username = virAuthGetUsername(auth, "administrator", conn->uri->server);
 
         if (username == NULL) {
             HYPERV_ERROR(VIR_ERR_AUTH_FAILED, "%s", _("Username request failed"));
@@ -155,7 +155,7 @@ hypervOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int flags)
         }
     }
 
-    password = virRequestPassword(auth, username, conn->uri->server);
+    password = virAuthGetPassword(auth, username, conn->uri->server);
 
     if (password == NULL) {
         HYPERV_ERROR(VIR_ERR_AUTH_FAILED, "%s", _("Password request failed"));
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 3f69ec1..07302cd 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1165,6 +1165,11 @@ virUUIDGenerate;
 virUUIDParse;
 
 
+# virauth.h
+virAuthGetUsername;
+virAuthGetPassword;
+
+
 # viraudit.h
 virAuditClose;
 virAuditEncode;
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 4b99465..470706d 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -1006,7 +1006,7 @@ openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
             goto err;
         }
 
-        username = virRequestUsername(auth, NULL, conn->uri->server);
+        username = virAuthGetUsername(auth, NULL, conn->uri->server);
 
         if (username == NULL) {
             PHYP_ERROR(VIR_ERR_AUTH_FAILED, "%s",
@@ -1087,7 +1087,7 @@ keyboard_interactive:
             goto disconnect;
         }
 
-        password = virRequestPassword(auth, username, conn->uri->server);
+        password = virAuthGetPassword(auth, username, conn->uri->server);
 
         if (password == NULL) {
             PHYP_ERROR(VIR_ERR_AUTH_FAILED, "%s",
diff --git a/src/util/virauth.c b/src/util/virauth.c
index a3c6b94..d7375e9 100644
--- a/src/util/virauth.c
+++ b/src/util/virauth.c
@@ -27,7 +27,7 @@
 
 
 char *
-virRequestUsername(virConnectAuthPtr auth, const char *defaultUsername,
+virAuthGetUsername(virConnectAuthPtr auth, const char *defaultUsername,
                    const char *hostname)
 {
     unsigned int ncred;
@@ -74,7 +74,7 @@ virRequestUsername(virConnectAuthPtr auth, const char *defaultUsername,
 
 
 char *
-virRequestPassword(virConnectAuthPtr auth, const char *username,
+virAuthGetPassword(virConnectAuthPtr auth, const char *username,
                    const char *hostname)
 {
     unsigned int ncred;
diff --git a/src/util/virauth.h b/src/util/virauth.h
index 2c8d80f..8856701 100644
--- a/src/util/virauth.h
+++ b/src/util/virauth.h
@@ -24,9 +24,9 @@
 
 # include "internal.h"
 
-char *virRequestUsername(virConnectAuthPtr auth, const char *defaultUsername,
+char *virAuthGetUsername(virConnectAuthPtr auth, const char *defaultUsername,
                          const char *hostname);
-char *virRequestPassword(virConnectAuthPtr auth, const char *username,
+char *virAuthGetPassword(virConnectAuthPtr auth, const char *username,
                          const char *hostname);
 
 #endif /* __VIR_AUTH_H__ */
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index 8d261ef..3f88c91 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -138,7 +138,7 @@ xenapiOpen (virConnectPtr conn, virConnectAuthPtr auth,
             goto error;
         }
     } else {
-        username = virRequestUsername(auth, NULL, conn->uri->server);
+        username = virAuthGetUsername(auth, NULL, conn->uri->server);
 
         if (username == NULL) {
             xenapiSessionErrorHandler(conn, VIR_ERR_AUTH_FAILED,
@@ -147,7 +147,7 @@ xenapiOpen (virConnectPtr conn, virConnectAuthPtr auth,
         }
     }
 
-    password = virRequestPassword(auth, username, conn->uri->server);
+    password = virAuthGetPassword(auth, username, conn->uri->server);
 
     if (password == NULL) {
         xenapiSessionErrorHandler(conn, VIR_ERR_AUTH_FAILED,
-- 
1.7.7.6


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