summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/smb2/scan.c9
-rw-r--r--source4/torture/smb2/util.c4
2 files changed, 10 insertions, 3 deletions
diff --git a/source4/torture/smb2/scan.c b/source4/torture/smb2/scan.c
index eda753b1ee..1ec67492bf 100644
--- a/source4/torture/smb2/scan.c
+++ b/source4/torture/smb2/scan.c
@@ -25,6 +25,7 @@
#include "lib/cmdline/popt_common.h"
#include "lib/events/events.h"
#include "torture/torture.h"
+#include "param/param.h"
#include "torture/smb2/proto.h"
@@ -199,7 +200,9 @@ bool torture_smb2_scan(struct torture_context *torture)
int opcode;
struct smb2_request *req;
- status = smb2_connect(mem_ctx, host, share, credentials, &tree,
+ status = smb2_connect(mem_ctx, host, share,
+ lp_name_resolve_order(torture->lp_ctx),
+ credentials, &tree,
event_context_find(mem_ctx));
if (!NT_STATUS_IS_OK(status)) {
printf("Connection failed - %s\n", nt_errstr(status));
@@ -214,7 +217,9 @@ bool torture_smb2_scan(struct torture_context *torture)
smb2_transport_send(req);
if (!smb2_request_receive(req)) {
talloc_free(tree);
- status = smb2_connect(mem_ctx, host, share, credentials, &tree,
+ status = smb2_connect(mem_ctx, host, share,
+ lp_name_resolve_order(torture->lp_ctx),
+ credentials, &tree,
event_context_find(mem_ctx));
if (!NT_STATUS_IS_OK(status)) {
printf("Connection failed - %s\n", nt_errstr(status));
diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c
index ab3d299c5a..3170b0073d 100644
--- a/source4/torture/smb2/util.c
+++ b/source4/torture/smb2/util.c
@@ -309,7 +309,9 @@ bool torture_smb2_connection(struct torture_context *tctx, struct smb2_tree **tr
const char *share = torture_setting_string(tctx, "share", NULL);
struct cli_credentials *credentials = cmdline_credentials;
- status = smb2_connect(tctx, host, share, credentials, tree,
+ status = smb2_connect(tctx, host, share,
+ lp_name_resolve_order(tctx->lp_ctx),
+ credentials, tree,
event_context_find(tctx));
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to connect to SMB2 share \\\\%s\\%s - %s\n",