summaryrefslogtreecommitdiff
path: root/source4/lib/cmdline/credentials.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-08-30 01:19:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:59 -0500
commit6f9b901fa0db18faae603db67d8d31e229d92c27 (patch)
tree8c54a8369d17994a8ef087c95038b81d87f50352 /source4/lib/cmdline/credentials.c
parentc0293aa7159c8b5c9f1a1b13f64af08e5a55ad6a (diff)
downloadsamba-6f9b901fa0db18faae603db67d8d31e229d92c27.tar.gz
samba-6f9b901fa0db18faae603db67d8d31e229d92c27.tar.bz2
samba-6f9b901fa0db18faae603db67d8d31e229d92c27.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 (This used to be commit 04af95bd31de39ad6aff349a4838dd77cb300034)
Diffstat (limited to 'source4/lib/cmdline/credentials.c')
-rw-r--r--source4/lib/cmdline/credentials.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source4/lib/cmdline/credentials.c b/source4/lib/cmdline/credentials.c
index 7832e01e4b..f46a03b236 100644
--- a/source4/lib/cmdline/credentials.c
+++ b/source4/lib/cmdline/credentials.c
@@ -29,8 +29,8 @@ static const char *cmdline_get_userpassword(struct cli_credentials *credentials)
{
char *prompt;
char *ret;
- char *domain;
- char *username;
+ const char *domain;
+ const char *username;
TALLOC_CTX *mem_ctx = talloc_new(NULL);
domain = cli_credentials_get_domain(credentials);
@@ -51,8 +51,5 @@ static const char *cmdline_get_userpassword(struct cli_credentials *credentials)
void cli_credentials_set_cmdline_callbacks(struct cli_credentials *cred)
{
- if (cred->password_obtained <= CRED_CALLBACK) {
- cred->password_cb = cmdline_get_userpassword;
- cred->password_obtained = CRED_CALLBACK;
- }
+ cli_credentials_set_password_callback(cred, cmdline_get_userpassword);
}