diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 51bd5b2e89bca4bc57a115cc8ac3dfd58c55cede..7689306e82f6b4332db39610958892ada256accb 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 5ca20cf73cafbe1d1a9cf81615c12c6eca3787ee..0469e2ee8d14fa96d5eb2babc6f38a55377494c5 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 475ddf866e495bef8fe09261f4c4457318609bc7..14f013dd7a5182b76e4608159279c85f0a8f84d6 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -5,11 +5,6 @@ # Keep this file sorted by header name, then by symbols with each header. # -# authhelper.h -virRequestPassword; -virRequestUsername; - - # bitmap.h virBitmapAlloc; virBitmapClearBit; @@ -1165,6 +1160,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 4b99465850a241461e0d38b4a7c15a60658d17b9..470706d9515a999455f3a20ed90d485a29bb825e 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 a3c6b94f394f78804d2d783d76eab13f8d9923f3..d7375e9c0f7e8f5d5b4885cce8943f9e7bfc01cc 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 2c8d80f556ac1878cd1010164f739e542225ce3a..88567010c909685b42b69416c746d236b7577973 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 8d261ef5f57d9266dfdfe864c5157f1a1f43f912..3f88c915a5fc1a00174f8b3a5f6af9f6d6bdf56d 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,