summaryrefslogtreecommitdiff
path: root/source4/lib/cmdline
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/cmdline')
-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);
}