return 0;
}
/* HACK: (this module should not call lp_ funtions) */
- return *lp_winbind_separator(global_loadparm);
+ return *lp_winbind_separator(cmdline_lp_ctx);
}
sep = response.data.info.winbind_separator;
return 0;
}
/* HACK: (this module should not call lp_ funtions) */
- sep = *lp_winbind_separator(global_loadparm);
+ sep = *lp_winbind_separator(cmdline_lp_ctx);
}
return sep;
d_fprintf(stderr, "could not obtain winbind domain name!\n");
/* HACK: (this module should not call lp_ funtions) */
- return lp_workgroup(global_loadparm);
+ return lp_workgroup(cmdline_lp_ctx);
}
fstrcpy(winbind_domain, response.data.domain_name);
/* Authenticate a user with a challenge/response */
-static bool wbinfo_auth_crap(char *username)
+static bool wbinfo_auth_crap(struct loadparm_context *lp_ctx, char *username)
{
struct winbindd_request request;
struct winbindd_response response;
generate_random_buffer(request.data.auth_crap.chal, 8);
- if (lp_client_ntlmv2_auth(global_loadparm)) {
+ if (lp_client_ntlmv2_auth(lp_ctx)) {
DATA_BLOB server_chal;
DATA_BLOB names_blob;
server_chal = data_blob(request.data.auth_crap.chal, 8);
/* Pretend this is a login to 'us', for blob purposes */
- names_blob = NTLMv2_generate_names_blob(mem_ctx, lp_netbios_name(global_loadparm), lp_workgroup(global_loadparm));
+ names_blob = NTLMv2_generate_names_blob(mem_ctx, lp_netbios_name(lp_ctx), lp_workgroup(lp_ctx));
if (!SMBNTLMv2encrypt(mem_ctx, name_user, name_domain, pass, &server_chal,
&names_blob,
data_blob_free(&lm_response);
} else {
- if (lp_client_lanman_auth(global_loadparm)
+ if (lp_client_lanman_auth(lp_ctx)
&& SMBencrypt(pass, request.data.auth_crap.chal,
(unsigned char *)request.data.auth_crap.lm_resp)) {
request.data.auth_crap.lm_resp_len = 24;
got_error = true;
}
- if (!wbinfo_auth_crap(string_arg)) {
+ if (!wbinfo_auth_crap(cmdline_lp_ctx, string_arg)) {
d_fprintf(stderr, "Could not authenticate user %s with "
"challenge/response\n", string_arg);
got_error = true;