diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-03 21:25:17 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:47:47 +0100 |
commit | 7c008664238ed966cb82adf5b25b22157bb50730 (patch) | |
tree | 1ff27893d1c2286198f5f763e5442fbc5d3c0e0b /source/nsswitch | |
parent | fc824a5c457e341995c14bd1cf34894ffc4c62c2 (diff) | |
download | samba-7c008664238ed966cb82adf5b25b22157bb50730.tar.gz |
r26268: Avoid more use of global_loadparm - put lp_ctx in smb_server and wbsrv_connection.
Diffstat (limited to 'source/nsswitch')
-rw-r--r-- | source/nsswitch/wbinfo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/nsswitch/wbinfo.c b/source/nsswitch/wbinfo.c index 4538911f97b..4303f36e4a6 100644 --- a/source/nsswitch/wbinfo.c +++ b/source/nsswitch/wbinfo.c @@ -786,7 +786,7 @@ static bool wbinfo_auth(char *username) /* 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; @@ -819,7 +819,7 @@ static bool wbinfo_auth_crap(char *username) 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; @@ -836,7 +836,7 @@ static bool wbinfo_auth_crap(char *username) 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, @@ -862,7 +862,7 @@ static bool wbinfo_auth_crap(char *username) 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; @@ -1218,7 +1218,7 @@ int main(int argc, char **argv, char **envp) got_error = true; } - if (!wbinfo_auth_crap(string_arg)) { + if (!wbinfo_auth_crap(global_loadparm, string_arg)) { d_fprintf(stderr, "Could not authenticate user %s with " "challenge/response\n", string_arg); got_error = true; |