From 6f9b901fa0db18faae603db67d8d31e229d92c27 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 30 Aug 2005 01:19:41 +0000 Subject: r9772: Make credentials callbacks more consistant with the abstraction function interface used in the credentials code. Fix bug in ntlm_auth, where we would overwrite the PW specified as a first input. (Reported and chased by Kai Blin , bug #3040) Andrew Bartlett (This used to be commit 04af95bd31de39ad6aff349a4838dd77cb300034) --- source4/gtk/common/credentials.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'source4/gtk/common') diff --git a/source4/gtk/common/credentials.c b/source4/gtk/common/credentials.c index ccc9759e8f..01132ec6bd 100644 --- a/source4/gtk/common/credentials.c +++ b/source4/gtk/common/credentials.c @@ -132,18 +132,7 @@ static const char *gtk_get_domain(struct cli_credentials *credentials) void cli_credentials_set_gtk_callbacks(struct cli_credentials *cred) { - if (cred->password_obtained <= CRED_CALLBACK) { - cred->password_cb = gtk_get_userpassword; - cred->password_obtained = CRED_CALLBACK; - } - - if (cred->username_obtained <= CRED_CALLBACK) { - cred->username_cb = gtk_get_username; - cred->username_obtained = CRED_CALLBACK; - } - - if (cred->domain_obtained <= CRED_CALLBACK) { - cred->domain_cb = gtk_get_domain; - cred->domain_obtained = CRED_CALLBACK; - } + cli_credentials_set_username_callback(cred, gtk_get_username); + cli_credentials_set_domain_callback(cred, gtk_get_domain); + cli_credentials_set_password_callback(cred, gtk_get_userpassword); } -- cgit