diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-08-30 01:19:41 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2005-08-30 01:19:41 +0000 |
commit | cf10def61d40d7ecf7c42d9509a8f659a73b81f3 (patch) | |
tree | 6aa1e3f30f417c0714372b0b373ee6b41aa77535 /source/gtk/common/credentials.c | |
parent | 814ea5b90d445b2d59f17f85a53f33ceb39a50ea (diff) | |
download | samba-cf10def61d40d7ecf7c42d9509a8f659a73b81f3.tar.gz samba-cf10def61d40d7ecf7c42d9509a8f659a73b81f3.tar.xz samba-cf10def61d40d7ecf7c42d9509a8f659a73b81f3.zip |
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 <blin@gmx.net>, bug
#3040)
Andrew Bartlett
Diffstat (limited to 'source/gtk/common/credentials.c')
-rw-r--r-- | source/gtk/common/credentials.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/source/gtk/common/credentials.c b/source/gtk/common/credentials.c index ccc9759e8f5..01132ec6bd6 100644 --- a/source/gtk/common/credentials.c +++ b/source/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); } |