form DOMAIN/user into a domain and a user */
static bool parse_ntlm_auth_domain_user(const char *domuser, fstring domain,
- fstring user)
+ fstring user, char winbind_separator)
{
- char *p = strchr(domuser,*lp_winbind_separator(global_loadparm));
+ char *p = strchr(domuser, winbind_separator);
if (!p) {
return false;
if (unix_name) {
asprintf(unix_name,
"%s%c%s", domain,
- *lp_winbind_separator(global_loadparm),
+ *lp_winbind_separator(lp_ctx),
username);
}
} else {
}
/**
- * Callback for password credentails. This is not async, and when
- * GENSEC and the credentails code is made async, it will look rather
+ * Callback for password credentials. This is not async, and when
+ * GENSEC and the credentials code is made async, it will look rather
* different.
*/
case NTLMSSP_CLIENT_1:
/* setup the client side */
- nt_status = gensec_client_start(NULL, &state->gensec_state, NULL);
+ nt_status = gensec_client_start(NULL, &state->gensec_state, NULL, lp_ctx);
if (!NT_STATUS_IS_OK(nt_status)) {
exit(1);
}
if (!ev) {
exit(1);
}
- msg = messaging_client_init(state, lp_messaging_path(state, global_loadparm), ev);
+ msg = messaging_client_init(state, lp_messaging_path(state, lp_ctx), ev);
if (!msg) {
exit(1);
}
- if (!NT_STATUS_IS_OK(gensec_server_start(state, ev, msg, &state->gensec_state))) {
+ if (!NT_STATUS_IS_OK(gensec_server_start(state, ev, lp_ctx, msg, &state->gensec_state))) {
exit(1);
}
break;
}
creds = cli_credentials_init(state->gensec_state);
- cli_credentials_set_conf(creds, global_loadparm);
+ cli_credentials_set_conf(creds, lp_ctx);
if (opt_username) {
cli_credentials_set_username(creds, opt_username, CRED_SPECIFIED);
}
reply_code = "AF";
reply_arg = talloc_asprintf(state->gensec_state,
"%s%s%s", session_info->server_info->domain_name,
- lp_winbind_separator(global_loadparm), session_info->server_info->account_name);
+ lp_winbind_separator(lp_ctx), session_info->server_info->account_name);
talloc_free(session_info);
}
} else if (state->gensec_state->gensec_role == GENSEC_CLIENT) {
fstring fstr_user;
fstring fstr_domain;
- if (!parse_ntlm_auth_domain_user(full_username, fstr_user, fstr_domain)) {
+ if (!parse_ntlm_auth_domain_user(full_username, fstr_user, fstr_domain,
+ *lp_winbind_separator(lp_ctx))) {
/* username might be 'tainted', don't print into our new-line deleimianted stream */
mux_printf(mux_id, "Error: Could not parse into domain and username\n");
}