summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/dsdb/samdb/ldb_modules/proxy.c2
-rw-r--r--source4/lib/registry/tools/common.c3
-rw-r--r--source4/lib/registry/tools/regpatch.c2
-rw-r--r--source4/lib/registry/tools/regshell.c2
-rw-r--r--source4/lib/registry/tools/regtree.c2
-rw-r--r--source4/librpc/rpc/dcerpc_schannel.c8
-rw-r--r--source4/torture/locktest.c15
-rw-r--r--source4/torture/nbt/winsbench.c4
8 files changed, 22 insertions, 16 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/proxy.c b/source4/dsdb/samdb/ldb_modules/proxy.c
index 5f22982b8d..37ee7f9fce 100644
--- a/source4/dsdb/samdb/ldb_modules/proxy.c
+++ b/source4/dsdb/samdb/ldb_modules/proxy.c
@@ -129,7 +129,7 @@ static int load_proxy_info(struct ldb_module *module)
ldb_oom(module->ldb);
goto failed;
}
- cli_credentials_guess(creds, global_loadparm);
+ cli_credentials_guess(creds, ldb_get_opaque(module->ldb, "loadparm"));
cli_credentials_set_username(creds, username, CRED_SPECIFIED);
cli_credentials_set_password(creds, password, CRED_SPECIFIED);
diff --git a/source4/lib/registry/tools/common.c b/source4/lib/registry/tools/common.c
index 6d766fd25c..c9293cd310 100644
--- a/source4/lib/registry/tools/common.c
+++ b/source4/lib/registry/tools/common.c
@@ -24,12 +24,13 @@
#include "lib/registry/tools/common.h"
struct registry_context *reg_common_open_remote(const char *remote,
+ struct loadparm_context *lp_ctx,
struct cli_credentials *creds)
{
struct registry_context *h;
WERROR error;
- error = reg_open_remote(&h, NULL, creds, remote, NULL);
+ error = reg_open_remote(&h, NULL, creds, lp_ctx, remote, NULL);
if (!W_ERROR_IS_OK(error)) {
fprintf(stderr, "Unable to open remote registry at %s:%s \n",
diff --git a/source4/lib/registry/tools/regpatch.c b/source4/lib/registry/tools/regpatch.c
index 2f2cf789a9..441138832e 100644
--- a/source4/lib/registry/tools/regpatch.c
+++ b/source4/lib/registry/tools/regpatch.c
@@ -49,7 +49,7 @@ int main(int argc, char **argv)
}
if (remote) {
- h = reg_common_open_remote (remote, cmdline_credentials);
+ h = reg_common_open_remote (remote, global_loadparm, cmdline_credentials);
} else {
h = reg_common_open_local (cmdline_credentials, global_loadparm);
}
diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c
index 9b582c3c02..7169d7c9f8 100644
--- a/source4/lib/registry/tools/regshell.c
+++ b/source4/lib/registry/tools/regshell.c
@@ -497,7 +497,7 @@ int main(int argc, char **argv)
ctx = talloc_zero(NULL, struct regshell_context);
if (remote != NULL) {
- ctx->registry = reg_common_open_remote(remote,
+ ctx->registry = reg_common_open_remote(remote, global_loadparm,
cmdline_credentials);
} else if (file != NULL) {
ctx->current = reg_common_open_file(file, cmdline_credentials);
diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c
index f95fc1968d..6c21f2cbad 100644
--- a/source4/lib/registry/tools/regtree.c
+++ b/source4/lib/registry/tools/regtree.c
@@ -129,7 +129,7 @@ int main(int argc, char **argv)
}
if (remote != NULL) {
- h = reg_common_open_remote(remote, cmdline_credentials);
+ h = reg_common_open_remote(remote, global_loadparm, cmdline_credentials);
} else if (file != NULL) {
start_key = reg_common_open_file(file, cmdline_credentials);
} else {
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
index fadf0add8c..68e211afae 100644
--- a/source4/librpc/rpc/dcerpc_schannel.c
+++ b/source4/librpc/rpc/dcerpc_schannel.c
@@ -224,7 +224,8 @@ static void continue_srv_auth2(struct rpc_request *req)
*/
struct composite_context *dcerpc_schannel_key_send(TALLOC_CTX *mem_ctx,
struct dcerpc_pipe *p,
- struct cli_credentials *credentials)
+ struct cli_credentials *credentials,
+ struct loadparm_context *lp_ctx)
{
struct composite_context *c;
struct schannel_key_state *s;
@@ -262,7 +263,8 @@ struct composite_context *dcerpc_schannel_key_send(TALLOC_CTX *mem_ctx,
/* request the netlogon endpoint mapping */
epm_map_req = dcerpc_epm_map_binding_send(c, s->binding,
&ndr_table_netlogon,
- s->pipe->conn->event_ctx);
+ s->pipe->conn->event_ctx,
+ lp_ctx);
if (composite_nomem(epm_map_req, c)) return c;
composite_continue(c, epm_map_req, continue_epm_map_binding, c);
@@ -371,7 +373,7 @@ struct composite_context *dcerpc_bind_auth_schannel_send(TALLOC_CTX *tmp_ctx,
s->lp_ctx = lp_ctx;
/* start getting schannel key first */
- schan_key_req = dcerpc_schannel_key_send(c, p, credentials);
+ schan_key_req = dcerpc_schannel_key_send(c, p, credentials, lp_ctx);
if (composite_nomem(schan_key_req, c)) return c;
composite_continue(c, schan_key_req, continue_schannel_key, c);
diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c
index 2aa074c6c3..08050fc40a 100644
--- a/source4/torture/locktest.c
+++ b/source4/torture/locktest.c
@@ -168,7 +168,8 @@ static struct smbcli_state *connect_one(struct loadparm_context *lp_ctx,
}
-static void reconnect(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], int fnum[NSERVERS][NCONNECTIONS][NFILES],
+static void reconnect(struct loadparm_context *lp_ctx,
+ struct smbcli_state *cli[NSERVERS][NCONNECTIONS], int fnum[NSERVERS][NCONNECTIONS][NFILES],
char *share[NSERVERS])
{
int server, conn, f;
@@ -184,7 +185,7 @@ static void reconnect(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], int fnum
}
talloc_free(cli[server][conn]);
}
- cli[server][conn] = connect_one(global_loadparm, share[server],
+ cli[server][conn] = connect_one(lp_ctx, share[server],
server, conn);
if (!cli[server][conn]) {
DEBUG(0,("Failed to connect to %s\n", share[server]));
@@ -387,7 +388,7 @@ static int retest(struct smbcli_state *cli[NSERVERS][NCONNECTIONS],
we then do random locking ops in tamdem on the 4 fnums from each
server and ensure that the results match
*/
-static void test_locks(char *share[NSERVERS])
+static void test_locks(struct loadparm_context *lp_ctx, char *share[NSERVERS])
{
struct smbcli_state *cli[NSERVERS][NCONNECTIONS];
int fnum[NSERVERS][NCONNECTIONS][NFILES];
@@ -438,7 +439,7 @@ static void test_locks(char *share[NSERVERS])
#endif
}
- reconnect(cli, fnum, share);
+ reconnect(lp_ctx, cli, fnum, share);
open_files(cli, fnum);
n = retest(cli, fnum, numops);
@@ -451,7 +452,7 @@ static void test_locks(char *share[NSERVERS])
n1 = n;
close_files(cli, fnum);
- reconnect(cli, fnum, share);
+ reconnect(lp_ctx, cli, fnum, share);
open_files(cli, fnum);
for (i=0;i<n-skip;i+=skip) {
@@ -489,7 +490,7 @@ static void test_locks(char *share[NSERVERS])
}
close_files(cli, fnum);
- reconnect(cli, fnum, share);
+ reconnect(lp_ctx, cli, fnum, share);
open_files(cli, fnum);
showall = true;
n1 = retest(cli, fnum, n);
@@ -649,7 +650,7 @@ static void usage(void)
seed, lock_base, lock_range, min_length));
srandom(seed);
- test_locks(share);
+ test_locks(lp_ctx, share);
return(0);
}
diff --git a/source4/torture/nbt/winsbench.c b/source4/torture/nbt/winsbench.c
index 1c79b5eb75..82223d9dd7 100644
--- a/source4/torture/nbt/winsbench.c
+++ b/source4/torture/nbt/winsbench.c
@@ -35,6 +35,7 @@ struct wins_state {
int pass_count;
int fail_count;
const char *wins_server;
+ uint16_t wins_port;
const char *my_ip;
uint32_t ttl;
};
@@ -185,7 +186,7 @@ static void generate_query(struct nbt_name_socket *nbtsock, struct wins_state *s
io.in.name = generate_name(tmp_ctx, idx);
io.in.dest_addr = state->wins_server;
- io.in.dest_port = lp_nbt_port(global_loadparm);
+ io.in.dest_port = state->wins_port;
io.in.broadcast = false;
io.in.wins_lookup = true;
io.in.timeout = 2;
@@ -241,6 +242,7 @@ static bool bench_wins(struct torture_context *tctx)
state->num_names = torture_entries;
state->registered = talloc_zero_array(state, bool, state->num_names);
state->wins_server = address;
+ state->wins_port = lp_nbt_port(tctx->lp_ctx);
state->my_ip = talloc_strdup(tctx, iface_best_ip(tctx->lp_ctx, address));
state->ttl = timelimit;