summaryrefslogtreecommitdiff
path: root/source4/torture/nbt
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-03 00:28:22 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:20 +0100
commitbbdfbf8d9d486aee51117976b8f825759a4c4a37 (patch)
treec0f97e145aae09c3e7e5387471fb3fb0ab839596 /source4/torture/nbt
parent291ddf433685ee5c25e172885045a4b60d7bb1ee (diff)
downloadsamba-bbdfbf8d9d486aee51117976b8f825759a4c4a37.tar.gz
r26238: Add a loadparm context parameter to torture_context, remove more uses of global_loadparm.
(This used to be commit a33a5530545086b81a3b205aa109dff11c546926)
Diffstat (limited to 'source4/torture/nbt')
-rw-r--r--source4/torture/nbt/dgram.c14
-rw-r--r--source4/torture/nbt/winsreplication.c6
2 files changed, 10 insertions, 10 deletions
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c
index e9cfda4b176..e0d7abdc35f 100644
--- a/source4/torture/nbt/dgram.c
+++ b/source4/torture/nbt/dgram.c
@@ -78,7 +78,7 @@ static bool nbt_test_netlogon(struct torture_context *tctx)
const char *address;
struct nbt_name name;
- name.name = lp_workgroup(global_loadparm);
+ name.name = lp_workgroup(tctx->lp_ctx);
name.type = NBT_NAME_LOGON;
name.scope = NULL;
@@ -91,7 +91,7 @@ static bool nbt_test_netlogon(struct torture_context *tctx)
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- myaddress, lp_dgram_port(global_loadparm));
+ myaddress, lp_dgram_port(tctx->lp_ctx));
torture_assert(tctx, socket_address != NULL, "Error getting address");
/* try receiving replies on port 138 first, which will only
@@ -157,7 +157,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
const char *address;
struct nbt_name name;
- name.name = lp_workgroup(global_loadparm);
+ name.name = lp_workgroup(tctx->lp_ctx);
name.type = NBT_NAME_LOGON;
name.scope = NULL;
@@ -169,7 +169,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
myaddress = talloc_strdup(dgmsock, iface_best_ip(address));
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- myaddress, lp_dgram_port(global_loadparm));
+ myaddress, lp_dgram_port(tctx->lp_ctx));
torture_assert(tctx, socket_address != NULL, "Error getting address");
/* try receiving replies on port 138 first, which will only
@@ -266,7 +266,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
const char *address;
struct nbt_name name;
- name.name = lp_workgroup(global_loadparm);
+ name.name = lp_workgroup(tctx->lp_ctx);
name.type = NBT_NAME_LOGON;
name.scope = NULL;
@@ -278,7 +278,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
myaddress = talloc_strdup(dgmsock, iface_best_ip(address));
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- myaddress, lp_dgram_port(global_loadparm));
+ myaddress, lp_dgram_port(tctx->lp_ctx));
torture_assert(tctx, socket_address != NULL, "Error getting address");
/* try receiving replies on port 138 first, which will only
@@ -299,7 +299,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
ACB_WSTRUST, &machine_credentials);
torture_assert(tctx, join_ctx != NULL,
talloc_asprintf(tctx, "Failed to join domain %s as %s\n",
- lp_workgroup(global_loadparm), TEST_NAME));
+ lp_workgroup(tctx->lp_ctx), TEST_NAME));
dom_sid = torture_join_sid(join_ctx);
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index f0b17b97783..2164ebf8b23 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -629,7 +629,7 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
if (!ctx->nbtsock_srv) return NULL;
/* Make a port 137 version of ctx->myaddr */
- nbt_srv_addr = socket_address_from_strings(tctx, ctx->nbtsock_srv->sock->backend_name, ctx->myaddr->addr, lp_nbt_port(global_loadparm));
+ nbt_srv_addr = socket_address_from_strings(tctx, ctx->nbtsock_srv->sock->backend_name, ctx->myaddr->addr, lp_nbt_port(tctx->lp_ctx));
if (!nbt_srv_addr) return NULL;
/* And if possible, bind to it. This won't work unless we are root or in sockewrapper */
@@ -655,7 +655,7 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
nbt_srv_addr = socket_address_from_strings(tctx,
ctx->nbtsock_srv->sock->backend_name,
ctx->myaddr2->addr,
- lp_nbt_port(global_loadparm));
+ lp_nbt_port(tctx->lp_ctx));
if (!nbt_srv_addr) return NULL;
/* And if possible, bind to it. This won't work unless we are root or in sockewrapper */
@@ -9156,7 +9156,7 @@ static bool test_conflict_owned_active_vs_replica(struct torture_context *tctx,
if (!ctx->nbtsock_srv) {
torture_comment(tctx, "SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
- lp_nbt_port(global_loadparm));
+ lp_nbt_port(tctx->lp_ctx));
return true;
}