aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2012-03-20 11:11:10 +0000
committerDaniel P. Berrange <berrange@redhat.com>2012-03-23 13:24:07 +0000
commit4445e16bfa8056980ac643fabf17186f9e685925 (patch)
tree47cd342c7ee6afd0bf92e0349fb8d391cfaf2589 /src/hyperv
parentRefactor code prompting for SASL credentials (diff)
downloadlibvirt-4445e16bfa8056980ac643fabf17186f9e685925.tar.gz
libvirt-4445e16bfa8056980ac643fabf17186f9e685925.tar.bz2
libvirt-4445e16bfa8056980ac643fabf17186f9e685925.zip
Lookup auth credentials in config file before prompting
When SASL requests auth credentials, try to look them up in the config file first. If any are found, remove them from the list that the user is prompted for Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'src/hyperv')
-rw-r--r--src/hyperv/hyperv_driver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index 0469e2ee8..05fce4f37 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 = virAuthGetUsername(auth, "administrator", conn->uri->server);
+ username = virAuthGetUsername(conn, auth, "hyperv", "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 = virAuthGetPassword(auth, username, conn->uri->server);
+ password = virAuthGetPassword(conn, auth, "hyperv", username, conn->uri->server);
if (password == NULL) {
HYPERV_ERROR(VIR_ERR_AUTH_FAILED, "%s", _("Password request failed"));