summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-07-31 13:24:21 +0200
committerAndrew Bartlett <abartlet@samba.org>2013-08-05 17:48:04 +1200
commitbbd63dd8a17468d3e332969a30c06e2b2f1540fc (patch)
treeb6dfecc06657049fd83d4c26397e3b43b1bf3a4d
parentd47bf469b8a9064f4f7033918b1fe519adfa0c26 (diff)
downloadsamba-bbd63dd8a17468d3e332969a30c06e2b2f1540fc.tar.gz
samba-bbd63dd8a17468d3e332969a30c06e2b2f1540fc.tar.bz2
samba-bbd63dd8a17468d3e332969a30c06e2b2f1540fc.zip
s4:ntlm_auth: make use of cli_credentials_[set_]callback_data*
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--source4/utils/ntlm_auth.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c
index c363c9d5b6..136e2387ed 100644
--- a/source4/utils/ntlm_auth.c
+++ b/source4/utils/ntlm_auth.c
@@ -299,10 +299,11 @@ static void manage_gensec_get_pw_request(enum stdio_helper_mode stdio_helper_mod
static const char *get_password(struct cli_credentials *credentials)
{
char *password = NULL;
-
+ void *cb = cli_credentials_callback_data_void(credentials);
+
/* Ask for a password */
- mux_printf((unsigned int)(uintptr_t)credentials->priv_data, "PW\n");
- credentials->priv_data = NULL;
+ mux_printf((unsigned int)(uintptr_t)cb, "PW\n");
+ cli_credentials_set_callback_data(credentials, NULL);
manage_squid_request(cmdline_lp_ctx, NUM_HELPER_MODES /* bogus */, manage_gensec_get_pw_request, (void **)&password);
return password;
@@ -505,8 +506,9 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode,
if (state->set_password) {
cli_credentials_set_password(creds, state->set_password, CRED_SPECIFIED);
} else {
+ void *cb = (void*)(uintptr_t)mux_id;
+ cli_credentials_set_callback_data(creds, cb);
cli_credentials_set_password_callback(creds, get_password);
- creds->priv_data = (void*)(uintptr_t)mux_id;
}
if (opt_workstation) {
cli_credentials_set_workstation(creds, opt_workstation, CRED_SPECIFIED);