diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-10 18:41:19 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:49:12 +0100 |
commit | 5f4842cf65ce64bfdf577cd549565da20ca818cf (patch) | |
tree | 65f9cb14c5910e70bc0fb64f45c7ffa5e382692f /source4/torture | |
parent | eba25f5d1897fbe61e8d7c623fcacb647629bf07 (diff) | |
download | samba-5f4842cf65ce64bfdf577cd549565da20ca818cf.tar.gz samba-5f4842cf65ce64bfdf577cd549565da20ca818cf.tar.bz2 samba-5f4842cf65ce64bfdf577cd549565da20ca818cf.zip |
r26376: Add context for libcli_resolve.
(This used to be commit 459e1466a411d6f83b7372e248566e6e71c745fc)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/basic/base.c | 2 | ||||
-rw-r--r-- | source4/torture/ldap/cldapbench.c | 2 | ||||
-rw-r--r-- | source4/torture/libnet/libnet_lookup.c | 4 | ||||
-rw-r--r-- | source4/torture/nbt/dgram.c | 6 | ||||
-rw-r--r-- | source4/torture/nbt/nbt.c | 2 | ||||
-rw-r--r-- | source4/torture/smb2/scan.c | 5 | ||||
-rw-r--r-- | source4/torture/smb2/util.c | 3 |
7 files changed, 13 insertions, 11 deletions
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c index 24c0d292ac..6f02fc4fe5 100644 --- a/source4/torture/basic/base.c +++ b/source4/torture/basic/base.c @@ -51,7 +51,7 @@ static struct smbcli_state *open_nbt_connection(struct torture_context *tctx) goto failed; } - if (!smbcli_socket_connect(cli, host, lp_name_resolve_order(tctx->lp_ctx), lp_max_xmit(tctx->lp_ctx), lp_maxmux(tctx->lp_ctx))) { + if (!smbcli_socket_connect(cli, host, lp_resolve_context(tctx->lp_ctx), lp_max_xmit(tctx->lp_ctx), lp_maxmux(tctx->lp_ctx))) { torture_comment(tctx, "Failed to connect with %s\n", host); goto failed; } diff --git a/source4/torture/ldap/cldapbench.c b/source4/torture/ldap/cldapbench.c index 47b1348ef6..c57ed6d48a 100644 --- a/source4/torture/ldap/cldapbench.c +++ b/source4/torture/ldap/cldapbench.c @@ -116,7 +116,7 @@ bool torture_bench_cldap(struct torture_context *torture) make_nbt_name_server(&name, torture_setting_string(torture, "host", NULL)); /* do an initial name resolution to find its IP */ - status = resolve_name(&name, torture, &address, event_context_find(torture), lp_name_resolve_order(torture->lp_ctx)); + status = resolve_name(lp_resolve_context(torture->lp_ctx), &name, torture, &address, event_context_find(torture)); if (!NT_STATUS_IS_OK(status)) { printf("Failed to resolve %s - %s\n", name.name, nt_errstr(status)); diff --git a/source4/torture/libnet/libnet_lookup.c b/source4/torture/libnet/libnet_lookup.c index e4473b0fdd..bf3c77fb44 100644 --- a/source4/torture/libnet/libnet_lookup.c +++ b/source4/torture/libnet/libnet_lookup.c @@ -52,7 +52,7 @@ bool torture_lookup(struct torture_context *torture) } lookup.in.type = NBT_NAME_CLIENT; - lookup.in.methods = NULL; + lookup.in.resolve_ctx = NULL; lookup.out.address = NULL; status = libnet_Lookup(ctx, mem_ctx, &lookup); @@ -95,7 +95,7 @@ bool torture_lookup_host(struct torture_context *torture) } } - lookup.in.methods = NULL; + lookup.in.resolve_ctx = NULL; lookup.out.address = NULL; status = libnet_LookupHost(ctx, mem_ctx, &lookup); diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c index bc3aa5dd57..37d445cac4 100644 --- a/source4/torture/nbt/dgram.c +++ b/source4/torture/nbt/dgram.c @@ -84,7 +84,7 @@ static bool nbt_test_netlogon(struct torture_context *tctx) /* do an initial name resolution to find its IP */ torture_assert_ntstatus_ok(tctx, - resolve_name(&name, tctx, &address, event_context_find(tctx), lp_name_resolve_order(tctx->lp_ctx)), + resolve_name(lp_resolve_context(tctx->lp_ctx), &name, tctx, &address, event_context_find(tctx)), talloc_asprintf(tctx, "Failed to resolve %s", name.name)); myaddress = talloc_strdup(dgmsock, iface_best_ip(tctx->lp_ctx, address)); @@ -163,7 +163,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx) /* do an initial name resolution to find its IP */ torture_assert_ntstatus_ok(tctx, - resolve_name(&name, tctx, &address, event_context_find(tctx), lp_name_resolve_order(tctx->lp_ctx)), + resolve_name(lp_resolve_context(tctx->lp_ctx), &name, tctx, &address, event_context_find(tctx)), talloc_asprintf(tctx, "Failed to resolve %s", name.name)); myaddress = talloc_strdup(dgmsock, iface_best_ip(tctx->lp_ctx, address)); @@ -272,7 +272,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx) /* do an initial name resolution to find its IP */ torture_assert_ntstatus_ok(tctx, - resolve_name(&name, tctx, &address, event_context_find(tctx), lp_name_resolve_order(tctx->lp_ctx)), + resolve_name(lp_resolve_context(tctx->lp_ctx), &name, tctx, &address, event_context_find(tctx)), talloc_asprintf(tctx, "Failed to resolve %s", name.name)); myaddress = talloc_strdup(dgmsock, iface_best_ip(tctx->lp_ctx, address)); diff --git a/source4/torture/nbt/nbt.c b/source4/torture/nbt/nbt.c index 7cf2a48c4e..6cb9507398 100644 --- a/source4/torture/nbt/nbt.c +++ b/source4/torture/nbt/nbt.c @@ -34,7 +34,7 @@ bool torture_nbt_get_name(struct torture_context *tctx, /* do an initial name resolution to find its IP */ torture_assert_ntstatus_ok(tctx, - resolve_name(name, tctx, address, NULL, lp_name_resolve_order(tctx->lp_ctx)), + resolve_name(lp_resolve_context(tctx->lp_ctx), name, tctx, address, NULL), talloc_asprintf(tctx, "Failed to resolve %s", name->name)); diff --git a/source4/torture/smb2/scan.c b/source4/torture/smb2/scan.c index 1ec67492bf..84be11c047 100644 --- a/source4/torture/smb2/scan.c +++ b/source4/torture/smb2/scan.c @@ -26,6 +26,7 @@ #include "lib/events/events.h" #include "torture/torture.h" #include "param/param.h" +#include "libcli/resolve/resolve.h" #include "torture/smb2/proto.h" @@ -201,7 +202,7 @@ bool torture_smb2_scan(struct torture_context *torture) struct smb2_request *req; status = smb2_connect(mem_ctx, host, share, - lp_name_resolve_order(torture->lp_ctx), + lp_resolve_context(torture->lp_ctx), credentials, &tree, event_context_find(mem_ctx)); if (!NT_STATUS_IS_OK(status)) { @@ -218,7 +219,7 @@ bool torture_smb2_scan(struct torture_context *torture) if (!smb2_request_receive(req)) { talloc_free(tree); status = smb2_connect(mem_ctx, host, share, - lp_name_resolve_order(torture->lp_ctx), + lp_resolve_context(torture->lp_ctx), credentials, &tree, event_context_find(mem_ctx)); if (!NT_STATUS_IS_OK(status)) { diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c index 3170b0073d..fe88296a32 100644 --- a/source4/torture/smb2/util.c +++ b/source4/torture/smb2/util.c @@ -27,6 +27,7 @@ #include "system/time.h" #include "librpc/gen_ndr/ndr_security.h" #include "param/param.h" +#include "libcli/resolve/resolve.h" #include "torture/torture.h" #include "torture/smb2/proto.h" @@ -310,7 +311,7 @@ bool torture_smb2_connection(struct torture_context *tctx, struct smb2_tree **tr struct cli_credentials *credentials = cmdline_credentials; status = smb2_connect(tctx, host, share, - lp_name_resolve_order(tctx->lp_ctx), + lp_resolve_context(tctx->lp_ctx), credentials, tree, event_context_find(tctx)); if (!NT_STATUS_IS_OK(status)) { |