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

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

 



On 2012年03月21日 01:33, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"<berrange@xxxxxxxxxx>

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;


virRequest{Username,Password} are forgoten to remove.

# authhelper.h
virRequestPassword;
virRequestUsername;

ACK with they are removed.

--
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]