summaryrefslogtreecommitdiff
path: root/source4/torture/nbt
diff options
context:
space:
mode:
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 e9cfda4b17..e0d7abdc35 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 f0b17b9778..2164ebf8b2 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;
}