summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-06 23:57:22 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:37 +0100
commitc5bf20c5fe7eaa04cd11a7ce4f365aa6ffd7b124 (patch)
treea8f2d25736e2edb08fc4b03b21f3a2949b1e2117 /source4/torture
parent04304808cabd0f05a5ff5bf23d8fd950eff8d6f3 (diff)
downloadsamba-c5bf20c5fe7eaa04cd11a7ce4f365aa6ffd7b124.tar.gz
samba-c5bf20c5fe7eaa04cd11a7ce4f365aa6ffd7b124.tar.bz2
samba-c5bf20c5fe7eaa04cd11a7ce4f365aa6ffd7b124.zip
r26325: Remove use of global_loadparm in netif.
(This used to be commit e452cb28594f23add7c00247ed39e8323aea78a6)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/nbt/dgram.c6
-rw-r--r--source4/torture/nbt/register.c4
-rw-r--r--source4/torture/nbt/wins.c2
-rw-r--r--source4/torture/nbt/winsbench.c2
-rw-r--r--source4/torture/nbt/winsreplication.c12
-rw-r--r--source4/torture/rpc/spoolss_notify.c2
6 files changed, 14 insertions, 14 deletions
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c
index e56d8c7500..bc3aa5dd57 100644
--- a/source4/torture/nbt/dgram.c
+++ b/source4/torture/nbt/dgram.c
@@ -87,7 +87,7 @@ static bool nbt_test_netlogon(struct torture_context *tctx)
resolve_name(&name, tctx, &address, event_context_find(tctx), lp_name_resolve_order(tctx->lp_ctx)),
talloc_asprintf(tctx, "Failed to resolve %s", name.name));
- myaddress = talloc_strdup(dgmsock, iface_best_ip(address));
+ myaddress = talloc_strdup(dgmsock, iface_best_ip(tctx->lp_ctx, address));
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
@@ -166,7 +166,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
resolve_name(&name, tctx, &address, event_context_find(tctx), lp_name_resolve_order(tctx->lp_ctx)),
talloc_asprintf(tctx, "Failed to resolve %s", name.name));
- myaddress = talloc_strdup(dgmsock, iface_best_ip(address));
+ myaddress = talloc_strdup(dgmsock, iface_best_ip(tctx->lp_ctx, address));
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
myaddress, lp_dgram_port(tctx->lp_ctx));
@@ -275,7 +275,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
resolve_name(&name, tctx, &address, event_context_find(tctx), lp_name_resolve_order(tctx->lp_ctx)),
talloc_asprintf(tctx, "Failed to resolve %s", name.name));
- myaddress = talloc_strdup(dgmsock, iface_best_ip(address));
+ myaddress = talloc_strdup(dgmsock, iface_best_ip(tctx->lp_ctx, address));
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
myaddress, lp_dgram_port(tctx->lp_ctx));
diff --git a/source4/torture/nbt/register.c b/source4/torture/nbt/register.c
index 9ff22c4bb9..cc3a55a787 100644
--- a/source4/torture/nbt/register.c
+++ b/source4/torture/nbt/register.c
@@ -52,7 +52,7 @@ static bool nbt_register_own(struct torture_context *tctx)
if (!torture_nbt_get_name(tctx, &name, &address))
return false;
- myaddress = iface_best_ip(address);
+ myaddress = iface_best_ip(tctx->lp_ctx, address);
socket_address = socket_address_from_strings(tctx, nbtsock->sock->backend_name,
myaddress, 0);
@@ -117,7 +117,7 @@ static bool nbt_refresh_own(struct torture_context *tctx)
if (!torture_nbt_get_name(tctx, &name, &address))
return false;
- myaddress = iface_best_ip(address);
+ myaddress = iface_best_ip(tctx->lp_ctx, address);
socket_address = socket_address_from_strings(tctx, nbtsock->sock->backend_name,
myaddress, 0);
diff --git a/source4/torture/nbt/wins.c b/source4/torture/nbt/wins.c
index fe87d7f971..2ba7f221c9 100644
--- a/source4/torture/nbt/wins.c
+++ b/source4/torture/nbt/wins.c
@@ -54,7 +54,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
struct nbt_name_release release;
NTSTATUS status;
struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, NULL);
- const char *myaddress = talloc_strdup(tctx, iface_best_ip(address));
+ const char *myaddress = talloc_strdup(tctx, iface_best_ip(tctx->lp_ctx, address));
struct socket_address *socket_address;
socket_address = socket_address_from_strings(tctx,
diff --git a/source4/torture/nbt/winsbench.c b/source4/torture/nbt/winsbench.c
index 34d27ab410..1c79b5eb75 100644
--- a/source4/torture/nbt/winsbench.c
+++ b/source4/torture/nbt/winsbench.c
@@ -241,7 +241,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->my_ip = talloc_strdup(tctx, iface_best_ip(address));
+ state->my_ip = talloc_strdup(tctx, iface_best_ip(tctx->lp_ctx, address));
state->ttl = timelimit;
my_ip = socket_address_from_strings(nbtsock, nbtsock->sock->backend_name,
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index 2164ebf8b2..b427843b80 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -612,12 +612,12 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
ctx->nbtsock = nbt_name_socket_init(ctx, NULL);
if (!ctx->nbtsock) return NULL;
- ctx->myaddr = socket_address_from_strings(tctx, ctx->nbtsock->sock->backend_name, iface_best_ip(address), 0);
+ ctx->myaddr = socket_address_from_strings(tctx, ctx->nbtsock->sock->backend_name, iface_best_ip(tctx->lp_ctx, address), 0);
if (!ctx->myaddr) return NULL;
- for (i = 0; i < iface_count(); i++) {
- if (strcmp(ctx->myaddr->addr, iface_n_ip(i)) == 0) continue;
- ctx->myaddr2 = socket_address_from_strings(tctx, ctx->nbtsock->sock->backend_name, iface_n_ip(i), 0);
+ for (i = 0; i < iface_count(tctx->lp_ctx); i++) {
+ if (strcmp(ctx->myaddr->addr, iface_n_ip(tctx->lp_ctx, i)) == 0) continue;
+ ctx->myaddr2 = socket_address_from_strings(tctx, ctx->nbtsock->sock->backend_name, iface_n_ip(tctx->lp_ctx, i), 0);
if (!ctx->myaddr2) return NULL;
break;
}
@@ -674,12 +674,12 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
ctx->addresses_best[0].owner = ctx->b.address;
ctx->addresses_best[0].ip = ctx->myaddr->addr;
- ctx->addresses_all_num = iface_count();
+ ctx->addresses_all_num = iface_count(tctx->lp_ctx);
ctx->addresses_all = talloc_array(ctx, struct wrepl_ip, ctx->addresses_all_num);
if (!ctx->addresses_all) return NULL;
for (i=0; i < ctx->addresses_all_num; i++) {
ctx->addresses_all[i].owner = ctx->b.address;
- ctx->addresses_all[i].ip = talloc_strdup(ctx->addresses_all, iface_n_ip(i));
+ ctx->addresses_all[i].ip = talloc_strdup(ctx->addresses_all, iface_n_ip(tctx->lp_ctx, i));
if (!ctx->addresses_all[i].ip) return NULL;
}
diff --git a/source4/torture/rpc/spoolss_notify.c b/source4/torture/rpc/spoolss_notify.c
index b211e3aa57..5e7a4469e4 100644
--- a/source4/torture/rpc/spoolss_notify.c
+++ b/source4/torture/rpc/spoolss_notify.c
@@ -226,7 +226,7 @@ static bool test_RFFPCNEx(struct torture_context *tctx,
lp_set_cmdline(tctx->lp_ctx, "dcerpc endpoint servers", "spoolss");
- address = iface_n_ip(0);
+ address = iface_n_ip(tctx->lp_ctx, 0);
torture_comment(tctx, "Listening for callbacks on %s\n", address);
status = smbsrv_add_socket(p->conn->event_ctx, tctx->lp_ctx, &single_ops, address);
torture_assert_ntstatus_ok(tctx, status, "starting smb server");