diff options
Diffstat (limited to 'source4/libcli/smb_composite/sesssetup.c')
-rw-r--r-- | source4/libcli/smb_composite/sesssetup.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/source4/libcli/smb_composite/sesssetup.c b/source4/libcli/smb_composite/sesssetup.c index 25cf8b3f12..622367e746 100644 --- a/source4/libcli/smb_composite/sesssetup.c +++ b/source4/libcli/smb_composite/sesssetup.c @@ -29,6 +29,7 @@ #include "auth/gensec/gensec.h" #include "auth/credentials/credentials.h" #include "version.h" +#include "param/param.h" struct sesssetup_state { union smb_sesssetup setup; @@ -76,7 +77,7 @@ static void set_user_session_key(struct smbcli_session *session, */ static void request_handler(struct smbcli_request *req) { - struct composite_context *c = req->async.private; + struct composite_context *c = (struct composite_context *)req->async.private; struct sesssetup_state *state = talloc_get_type(c->private_data, struct sesssetup_state); struct smbcli_session *session = req->session; DATA_BLOB session_key = data_blob(NULL, 0); @@ -222,14 +223,14 @@ static NTSTATUS session_setup_nt1(struct composite_context *c, NTSTATUS nt_status; struct sesssetup_state *state = talloc_get_type(c->private_data, struct sesssetup_state); const char *password = cli_credentials_get_password(io->in.credentials); - DATA_BLOB names_blob = NTLMv2_generate_names_blob(state, session->transport->socket->hostname, lp_workgroup()); + DATA_BLOB names_blob = NTLMv2_generate_names_blob(state, session->transport->socket->hostname, lp_workgroup(global_loadparm)); DATA_BLOB session_key; int flags = CLI_CRED_NTLM_AUTH; - if (lp_client_lanman_auth()) { + if (lp_client_lanman_auth(global_loadparm)) { flags |= CLI_CRED_LANMAN_AUTH; } - if (lp_client_ntlmv2_auth()) { + if (lp_client_ntlmv2_auth(global_loadparm)) { flags |= CLI_CRED_NTLMv2_AUTH; } @@ -262,7 +263,7 @@ static NTSTATUS session_setup_nt1(struct composite_context *c, set_user_session_key(session, &session_key); data_blob_free(&session_key); - } else if (lp_client_plaintext_auth()) { + } else if (lp_client_plaintext_auth(global_loadparm)) { state->setup.nt1.in.password1 = data_blob_talloc(state, password, strlen(password)); state->setup.nt1.in.password2 = data_blob(NULL, 0); } else { @@ -289,14 +290,14 @@ static NTSTATUS session_setup_old(struct composite_context *c, NTSTATUS nt_status; struct sesssetup_state *state = talloc_get_type(c->private_data, struct sesssetup_state); const char *password = cli_credentials_get_password(io->in.credentials); - DATA_BLOB names_blob = NTLMv2_generate_names_blob(state, session->transport->socket->hostname, lp_workgroup()); + DATA_BLOB names_blob = NTLMv2_generate_names_blob(state, session->transport->socket->hostname, lp_workgroup(global_loadparm)); DATA_BLOB session_key; int flags = 0; - if (lp_client_lanman_auth()) { + if (lp_client_lanman_auth(global_loadparm)) { flags |= CLI_CRED_LANMAN_AUTH; } - if (lp_client_ntlmv2_auth()) { + if (lp_client_ntlmv2_auth(global_loadparm)) { flags |= CLI_CRED_NTLMv2_AUTH; } @@ -323,7 +324,7 @@ static NTSTATUS session_setup_old(struct composite_context *c, set_user_session_key(session, &session_key); data_blob_free(&session_key); - } else if (lp_client_plaintext_auth()) { + } else if (lp_client_plaintext_auth(global_loadparm)) { state->setup.old.in.password = data_blob_talloc(state, password, strlen(password)); } else { /* could match windows client and return 'cannot logon from this workstation', but it just confuses everybody */ @@ -417,7 +418,7 @@ static NTSTATUS session_setup_spnego(struct composite_context *c, } } - if (chosen_oid == GENSEC_OID_SPNEGO) { + if ((const void *)chosen_oid == (const void *)GENSEC_OID_SPNEGO) { status = gensec_update(session->gensec, state, session->transport->negotiate.secblob, &state->setup.spnego.in.secblob); |