diff options
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/cldap/cldap.c | 2 | ||||
-rw-r--r-- | source4/libcli/cliconnect.c | 4 | ||||
-rw-r--r-- | source4/libcli/dgram/browse.c | 2 | ||||
-rw-r--r-- | source4/libcli/dgram/mailslot.c | 2 | ||||
-rw-r--r-- | source4/libcli/dgram/netlogon.c | 2 | ||||
-rw-r--r-- | source4/libcli/dgram/ntlogon.c | 2 | ||||
-rw-r--r-- | source4/libcli/finddcs.c | 4 | ||||
-rw-r--r-- | source4/libcli/nbt/namequery.c | 4 | ||||
-rw-r--r-- | source4/libcli/nbt/namerefresh.c | 2 | ||||
-rw-r--r-- | source4/libcli/nbt/nameregister.c | 2 | ||||
-rw-r--r-- | source4/libcli/nbt/namerelease.c | 2 | ||||
-rw-r--r-- | source4/libcli/raw/clisocket.c | 4 | ||||
-rw-r--r-- | source4/libcli/raw/clitransport.c | 7 | ||||
-rw-r--r-- | source4/libcli/raw/clitree.c | 2 | ||||
-rw-r--r-- | source4/libcli/raw/rawnegotiate.c | 6 | ||||
-rw-r--r-- | source4/libcli/raw/smb_signing.c | 2 | ||||
-rw-r--r-- | source4/libcli/resolve/resolve.c | 2 | ||||
-rw-r--r-- | source4/libcli/resolve/wins.c | 2 | ||||
-rw-r--r-- | source4/libcli/smb2/connect.c | 2 | ||||
-rw-r--r-- | source4/libcli/smb_composite/connect.c | 6 | ||||
-rw-r--r-- | source4/libcli/smb_composite/sesssetup.c | 16 | ||||
-rw-r--r-- | source4/libcli/util/errormap.c | 2 |
22 files changed, 40 insertions, 39 deletions
diff --git a/source4/libcli/cldap/cldap.c b/source4/libcli/cldap/cldap.c index 9381e80934..8ef511ed79 100644 --- a/source4/libcli/cldap/cldap.c +++ b/source4/libcli/cldap/cldap.c @@ -317,7 +317,7 @@ struct cldap_request *cldap_search_send(struct cldap_socket *cldap, req->dest = socket_address_from_strings(req, cldap->sock->backend_name, io->in.dest_address, - lp_cldap_port()); + lp_cldap_port(global_loadparm)); if (!req->dest) goto failed; req->message_id = idr_get_new_random(cldap->idr, req, UINT16_MAX); diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c index a91157cf5d..715eb875fe 100644 --- a/source4/libcli/cliconnect.c +++ b/source4/libcli/cliconnect.c @@ -57,7 +57,7 @@ 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()); + return smb_raw_negotiate(cli->transport, lp_cli_maxprotocol(global_loadparm)); } /* wrapper around smb_raw_sesssetup() */ @@ -73,7 +73,7 @@ NTSTATUS smbcli_session_setup(struct smbcli_state *cli, setup.in.sesskey = cli->transport->negotiate.sesskey; setup.in.capabilities = cli->transport->negotiate.capabilities; setup.in.credentials = credentials; - setup.in.workgroup = lp_workgroup(); + setup.in.workgroup = lp_workgroup(global_loadparm); status = smb_composite_sesssetup(cli->session, &setup); diff --git a/source4/libcli/dgram/browse.c b/source4/libcli/dgram/browse.c index 78bd4319ee..fc1162e644 100644 --- a/source4/libcli/dgram/browse.c +++ b/source4/libcli/dgram/browse.c @@ -70,7 +70,7 @@ NTSTATUS dgram_mailslot_browse_reply(struct nbt_dgram_socket *dgmsock, return status; } - make_nbt_name_client(&myname, lp_netbios_name()); + make_nbt_name_client(&myname, lp_netbios_name(global_loadparm)); dest = socket_address_from_strings(tmp_ctx, dgmsock->sock->backend_name, request->src_addr, request->src_port); diff --git a/source4/libcli/dgram/mailslot.c b/source4/libcli/dgram/mailslot.c index 7a325ebe38..4e94e5ee5b 100644 --- a/source4/libcli/dgram/mailslot.c +++ b/source4/libcli/dgram/mailslot.c @@ -165,7 +165,7 @@ NTSTATUS dgram_mailslot_send(struct nbt_dgram_socket *dgmsock, if (_dest->port == 0) { dest = socket_address_from_strings(tmp_ctx, _dest->family, - _dest->addr, lp_dgram_port()); + _dest->addr, lp_dgram_port(global_loadparm)); } else { dest = _dest; } diff --git a/source4/libcli/dgram/netlogon.c b/source4/libcli/dgram/netlogon.c index 79acf609f6..46f6e50e7b 100644 --- a/source4/libcli/dgram/netlogon.c +++ b/source4/libcli/dgram/netlogon.c @@ -77,7 +77,7 @@ NTSTATUS dgram_mailslot_netlogon_reply(struct nbt_dgram_socket *dgmsock, return status; } - make_nbt_name_client(&myname, lp_netbios_name()); + make_nbt_name_client(&myname, lp_netbios_name(global_loadparm)); dest = socket_address_from_strings(tmp_ctx, dgmsock->sock->backend_name, request->src_addr, request->src_port); diff --git a/source4/libcli/dgram/ntlogon.c b/source4/libcli/dgram/ntlogon.c index 6b9b17485d..25f767688a 100644 --- a/source4/libcli/dgram/ntlogon.c +++ b/source4/libcli/dgram/ntlogon.c @@ -78,7 +78,7 @@ NTSTATUS dgram_mailslot_ntlogon_reply(struct nbt_dgram_socket *dgmsock, return status; } - make_nbt_name_client(&myname, lp_netbios_name()); + make_nbt_name_client(&myname, lp_netbios_name(global_loadparm)); dest = socket_address_from_strings(tmp_ctx, dgmsock->sock->backend_name, diff --git a/source4/libcli/finddcs.c b/source4/libcli/finddcs.c index edd9a92693..2ac1358197 100644 --- a/source4/libcli/finddcs.c +++ b/source4/libcli/finddcs.c @@ -145,9 +145,9 @@ static void finddcs_name_resolved(struct composite_context *ctx) state->r.in.domainname = state->domain_name; state->r.in.ip_address = state->dcs[0].address; - state->r.in.my_computername = lp_netbios_name(); + state->r.in.my_computername = lp_netbios_name(global_loadparm); state->r.in.my_accountname = talloc_asprintf(state, "%s$", - lp_netbios_name()); + 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/nbt/namequery.c b/source4/libcli/nbt/namequery.c index ab26a7b2d2..a55d743efb 100644 --- a/source4/libcli/nbt/namequery.c +++ b/source4/libcli/nbt/namequery.c @@ -54,7 +54,7 @@ _PUBLIC_ struct nbt_name_request *nbt_name_query_send(struct nbt_name_socket *nb packet->questions[0].question_class = NBT_QCLASS_IP; dest = socket_address_from_strings(packet, nbtsock->sock->backend_name, - io->in.dest_addr, lp_nbt_port()); + io->in.dest_addr, lp_nbt_port(global_loadparm)); if (dest == NULL) goto failed; req = nbt_name_request_send(nbtsock, dest, packet, io->in.timeout, io->in.retries, False); @@ -158,7 +158,7 @@ _PUBLIC_ struct nbt_name_request *nbt_name_status_send(struct nbt_name_socket *n packet->questions[0].question_class = NBT_QCLASS_IP; dest = socket_address_from_strings(packet, nbtsock->sock->backend_name, - io->in.dest_addr, lp_nbt_port()); + io->in.dest_addr, lp_nbt_port(global_loadparm)); if (dest == NULL) goto failed; req = nbt_name_request_send(nbtsock, dest, packet, io->in.timeout, io->in.retries, False); diff --git a/source4/libcli/nbt/namerefresh.c b/source4/libcli/nbt/namerefresh.c index d68cdb5365..3114cb2b10 100644 --- a/source4/libcli/nbt/namerefresh.c +++ b/source4/libcli/nbt/namerefresh.c @@ -69,7 +69,7 @@ struct nbt_name_request *nbt_name_refresh_send(struct nbt_name_socket *nbtsock, dest = socket_address_from_strings(nbtsock, nbtsock->sock->backend_name, - io->in.dest_addr, lp_nbt_port()); + io->in.dest_addr, lp_nbt_port(global_loadparm)); if (dest == NULL) goto failed; req = nbt_name_request_send(nbtsock, dest, packet, io->in.timeout, io->in.retries, False); diff --git a/source4/libcli/nbt/nameregister.c b/source4/libcli/nbt/nameregister.c index 62c4a19b29..b8fe362694 100644 --- a/source4/libcli/nbt/nameregister.c +++ b/source4/libcli/nbt/nameregister.c @@ -77,7 +77,7 @@ struct nbt_name_request *nbt_name_register_send(struct nbt_name_socket *nbtsock, if (packet->additional[0].rdata.netbios.addresses[0].ipaddr == NULL) goto failed; dest = socket_address_from_strings(packet, nbtsock->sock->backend_name, - io->in.dest_addr, lp_nbt_port()); + io->in.dest_addr, lp_nbt_port(global_loadparm)); if (dest == NULL) goto failed; req = nbt_name_request_send(nbtsock, dest, packet, io->in.timeout, io->in.retries, False); diff --git a/source4/libcli/nbt/namerelease.c b/source4/libcli/nbt/namerelease.c index efc31b1501..a72a5c706f 100644 --- a/source4/libcli/nbt/namerelease.c +++ b/source4/libcli/nbt/namerelease.c @@ -67,7 +67,7 @@ struct nbt_name_request *nbt_name_release_send(struct nbt_name_socket *nbtsock, talloc_strdup(packet->additional, io->in.address); dest = socket_address_from_strings(packet, nbtsock->sock->backend_name, - io->in.dest_addr, lp_nbt_port()); + io->in.dest_addr, lp_nbt_port(global_loadparm)); if (dest == NULL) goto failed; req = nbt_name_request_send(nbtsock, dest, packet, io->in.timeout, io->in.retries, False); diff --git a/source4/libcli/raw/clisocket.c b/source4/libcli/raw/clisocket.c index 51f631eb67..a748b40a32 100644 --- a/source4/libcli/raw/clisocket.c +++ b/source4/libcli/raw/clisocket.c @@ -73,7 +73,7 @@ struct composite_context *smbcli_sock_connect_send(TALLOC_CTX *mem_ctx, if (state->host_name == NULL) goto failed; if (port == 0) { - const char **ports = lp_smb_ports(); + const char **ports = lp_smb_ports(global_loadparm); int i; for (i=0;ports[i];i++) /* noop */ ; @@ -120,7 +120,7 @@ static void smbcli_sock_connect_recv_conn(struct composite_context *ctx) if (!composite_is_ok(state->ctx)) return; state->ctx->status = - socket_set_option(sock, lp_socket_options(), NULL); + socket_set_option(sock, lp_socket_options(global_loadparm), NULL); if (!composite_is_ok(state->ctx)) return; diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c index 90f51b2969..6b2c4c37fe 100644 --- a/source4/libcli/raw/clitransport.c +++ b/source4/libcli/raw/clitransport.c @@ -85,9 +85,10 @@ struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock, transport->socket = talloc_reference(transport, sock); } transport->negotiate.protocol = PROTOCOL_NT1; - transport->options.use_spnego = lp_use_spnego() && lp_nt_status_support(); - transport->options.max_xmit = lp_max_xmit(); - transport->options.max_mux = lp_maxmux(); + transport->options.use_spnego = lp_use_spnego(global_loadparm) && + lp_nt_status_support(global_loadparm); + transport->options.max_xmit = lp_max_xmit(global_loadparm); + transport->options.max_mux = lp_maxmux(global_loadparm); transport->options.request_timeout = SMB_REQUEST_TIMEOUT; transport->negotiate.max_xmit = transport->options.max_xmit; diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c index 6a15c25eb9..4ff11f3a69 100644 --- a/source4/libcli/raw/clitree.c +++ b/source4/libcli/raw/clitree.c @@ -190,7 +190,7 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx, io.in.service_type = service_type; io.in.credentials = credentials; io.in.fallback_to_anonymous = False; - io.in.workgroup = lp_workgroup(); + io.in.workgroup = lp_workgroup(global_loadparm); status = smb_composite_connect(&io, parent_ctx, ev); if (NT_STATUS_IS_OK(status)) { diff --git a/source4/libcli/raw/rawnegotiate.c b/source4/libcli/raw/rawnegotiate.c index eff22ee8bc..c58ac1f0df 100644 --- a/source4/libcli/raw/rawnegotiate.c +++ b/source4/libcli/raw/rawnegotiate.c @@ -58,7 +58,7 @@ struct smbcli_request *smb_raw_negotiate_send(struct smbcli_transport *transport } flags2 |= FLAGS2_32_BIT_ERROR_CODES; - if (lp_unicode()) { + if (lp_unicode(global_loadparm)) { flags2 |= FLAGS2_UNICODE_STRINGS; } flags2 |= FLAGS2_EXTENDED_ATTRIBUTES; @@ -174,11 +174,11 @@ NTSTATUS smb_raw_negotiate_recv(struct smbcli_request *req) } /* a way to force ascii SMB */ - if (!lp_unicode()) { + if (!lp_unicode(global_loadparm)) { transport->negotiate.capabilities &= ~CAP_UNICODE; } - if (!lp_nt_status_support()) { + if (!lp_nt_status_support(global_loadparm)) { transport->negotiate.capabilities &= ~CAP_STATUS32; } diff --git a/source4/libcli/raw/smb_signing.c b/source4/libcli/raw/smb_signing.c index 1a82ea0536..59c13bbeb6 100644 --- a/source4/libcli/raw/smb_signing.c +++ b/source4/libcli/raw/smb_signing.c @@ -383,7 +383,7 @@ bool smbcli_init_signing(struct smbcli_transport *transport) return False; } - switch (lp_client_signing()) { + switch (lp_client_signing(global_loadparm)) { case SMB_SIGNING_OFF: transport->negotiate.sign_info.allow_smb_signing = False; break; diff --git a/source4/libcli/resolve/resolve.c b/source4/libcli/resolve/resolve.c index 9315c0f354..02e1fbdc04 100644 --- a/source4/libcli/resolve/resolve.c +++ b/source4/libcli/resolve/resolve.c @@ -190,7 +190,7 @@ NTSTATUS resolve_name(struct nbt_name *name, TALLOC_CTX *mem_ctx, const char **r struct event_context *ev) { struct composite_context *c = resolve_name_send(name, ev, - lp_name_resolve_order()); + lp_name_resolve_order(global_loadparm)); return resolve_name_recv(c, mem_ctx, reply_addr); } diff --git a/source4/libcli/resolve/wins.c b/source4/libcli/resolve/wins.c index 8c88950f53..05a2d4da31 100644 --- a/source4/libcli/resolve/wins.c +++ b/source4/libcli/resolve/wins.c @@ -32,7 +32,7 @@ struct composite_context *resolve_name_wins_send( struct event_context *event_ctx, struct nbt_name *name) { - const char **address_list = lp_wins_server_list(); + const char **address_list = lp_wins_server_list(global_loadparm); if (address_list == NULL) return NULL; return resolve_name_nbtlist_send(mem_ctx, event_ctx, name, address_list, False, True); } diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c index 0edf64c5df..6a2e9d09e9 100644 --- a/source4/libcli/smb2/connect.c +++ b/source4/libcli/smb2/connect.c @@ -187,7 +187,7 @@ 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()); + 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 27b16ecc41..22b2cdb0e2 100644 --- a/source4/libcli/smb_composite/connect.c +++ b/source4/libcli/smb_composite/connect.c @@ -63,7 +63,7 @@ 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()); + 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 +172,7 @@ 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); + 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 +459,7 @@ 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()); + 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 6a14e57ad0..6f9e6b0de3 100644 --- a/source4/libcli/smb_composite/sesssetup.c +++ b/source4/libcli/smb_composite/sesssetup.c @@ -223,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; } @@ -263,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 { @@ -290,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; } @@ -324,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 */ diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c index 347d513e9c..49384817b6 100644 --- a/source4/libcli/util/errormap.c +++ b/source4/libcli/util/errormap.c @@ -1168,7 +1168,7 @@ BOOL ntstatus_dos_equal(NTSTATUS status1, NTSTATUS status2) the mapping of dos codes, as we want to catch the cases where a forced dos code is needed */ - if (lp_nt_status_support()) { + if (lp_nt_status_support(global_loadparm)) { return NT_STATUS_V(status1) == NT_STATUS_V(status2); } |