summaryrefslogtreecommitdiff
path: root/source4/nsswitch/wbinfo.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-03 21:25:17 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:47 +0100
commitb83a7a135f3247f553cb04173646b2d871b97235 (patch)
tree4b2ea9eab1a603a6324e78bc98f91e9f3150a348 /source4/nsswitch/wbinfo.c
parent1f69adddc54d3b4b91df0ce639b3faccb85b2eb7 (diff)
downloadsamba-b83a7a135f3247f553cb04173646b2d871b97235.tar.gz
samba-b83a7a135f3247f553cb04173646b2d871b97235.tar.bz2
samba-b83a7a135f3247f553cb04173646b2d871b97235.zip
r26268: Avoid more use of global_loadparm - put lp_ctx in smb_server and wbsrv_connection.
(This used to be commit 7c008664238ed966cb82adf5b25b22157bb50730)
Diffstat (limited to 'source4/nsswitch/wbinfo.c')
-rw-r--r--source4/nsswitch/wbinfo.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/nsswitch/wbinfo.c b/source4/nsswitch/wbinfo.c
index 4538911f97..4303f36e4a 100644
--- a/source4/nsswitch/wbinfo.c
+++ b/source4/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;