From 2f3551ca7cee59d4d053cceb87abdf1da1b3a1ad Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 1 Oct 2007 18:52:55 +0000 Subject: r25446: Merge some changes I made on the way home from SFO: 2007-09-29 More higher-level passing around of lp_ctx. 2007-09-29 Fix warning. 2007-09-29 Pass loadparm contexts on a higher level. 2007-09-29 Avoid using global loadparm context. (This used to be commit 3468952e771ab31f90b6c374ade01c5550810f42) --- source4/libcli/cliconnect.c | 3 ++- source4/libcli/finddcs.c | 2 +- source4/libcli/smb2/connect.c | 3 ++- source4/libcli/smb_composite/connect.c | 9 ++++++--- source4/libcli/smb_composite/sesssetup.c | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) (limited to 'source4/libcli') diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c index 715eb875fe..96946da7fe 100644 --- a/source4/libcli/cliconnect.c +++ b/source4/libcli/cliconnect.c @@ -57,7 +57,8 @@ BOOL smbcli_transport_establish(struct smbcli_state *cli, /* wrapper around smb_raw_negotiate() */ NTSTATUS smbcli_negprot(struct smbcli_state *cli) { - return smb_raw_negotiate(cli->transport, lp_cli_maxprotocol(global_loadparm)); + return smb_raw_negotiate(cli->transport, + lp_cli_maxprotocol(global_loadparm)); } /* wrapper around smb_raw_sesssetup() */ diff --git a/source4/libcli/finddcs.c b/source4/libcli/finddcs.c index 2ac1358197..e00697fe17 100644 --- a/source4/libcli/finddcs.c +++ b/source4/libcli/finddcs.c @@ -147,7 +147,7 @@ static void finddcs_name_resolved(struct composite_context *ctx) state->r.in.ip_address = state->dcs[0].address; state->r.in.my_computername = lp_netbios_name(global_loadparm); state->r.in.my_accountname = talloc_asprintf(state, "%s$", - lp_netbios_name(global_loadparm)); + lp_netbios_name(global_loadparm)); if (composite_nomem(state->r.in.my_accountname, state->ctx)) return; state->r.in.account_control = ACB_WSTRUST; state->r.in.domain_sid = state->domain_sid; diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c index 6a2e9d09e9..bb70311c56 100644 --- a/source4/libcli/smb2/connect.c +++ b/source4/libcli/smb2/connect.c @@ -187,7 +187,8 @@ struct composite_context *smb2_connect_send(TALLOC_CTX *mem_ctx, ZERO_STRUCT(name); name.name = host; - creq = resolve_name_send(&name, c->event_ctx, lp_name_resolve_order(global_loadparm)); + creq = resolve_name_send(&name, c->event_ctx, + lp_name_resolve_order(global_loadparm)); composite_continue(c, creq, continue_resolve, c); return c; } diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c index 22b2cdb0e2..23974619d6 100644 --- a/source4/libcli/smb_composite/connect.c +++ b/source4/libcli/smb_composite/connect.c @@ -63,7 +63,8 @@ static NTSTATUS connect_send_negprot(struct composite_context *c, { struct connect_state *state = talloc_get_type(c->private_data, struct connect_state); - state->req = smb_raw_negotiate_send(state->transport, lp_cli_maxprotocol(global_loadparm)); + state->req = smb_raw_negotiate_send(state->transport, + lp_cli_maxprotocol(global_loadparm)); NT_STATUS_HAVE_NO_MEMORY(state->req); state->req->async.fn = request_handler; @@ -172,7 +173,8 @@ static NTSTATUS connect_session_setup(struct composite_context *c, state->io_setup->in.credentials = cli_credentials_init(state); NT_STATUS_HAVE_NO_MEMORY(state->io_setup->in.credentials); - cli_credentials_set_conf(state->io_setup->in.credentials, global_loadparm); + cli_credentials_set_conf(state->io_setup->in.credentials, + global_loadparm); cli_credentials_set_anonymous(state->io_setup->in.credentials); /* If the preceding attempt was with extended security, we @@ -459,7 +461,8 @@ struct composite_context *smb_composite_connect_send(struct smb_composite_connec state->stage = CONNECT_RESOLVE; make_nbt_name_server(&name, io->in.dest_host); - state->creq = resolve_name_send(&name, c->event_ctx, lp_name_resolve_order(global_loadparm)); + state->creq = resolve_name_send(&name, c->event_ctx, + lp_name_resolve_order(global_loadparm)); if (state->creq == NULL) goto failed; state->creq->async.private_data = c; diff --git a/source4/libcli/smb_composite/sesssetup.c b/source4/libcli/smb_composite/sesssetup.c index 6f9e6b0de3..622367e746 100644 --- a/source4/libcli/smb_composite/sesssetup.c +++ b/source4/libcli/smb_composite/sesssetup.c @@ -418,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); -- cgit