summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/join.c3
-rw-r--r--source4/torture/rpc/samba3rpc.c19
2 files changed, 18 insertions, 4 deletions
diff --git a/source4/torture/rpc/join.c b/source4/torture/rpc/join.c
index 8ab6ae03ea..dd2912380d 100644
--- a/source4/torture/rpc/join.c
+++ b/source4/torture/rpc/join.c
@@ -5,6 +5,7 @@
#include "auth/credentials/credentials.h"
#include "torture/rpc/rpc.h"
+#include "libcli/resolve/resolve.h"
#include "param/param.h"
#define TORTURE_NETBIOS_NAME "smbtorturejoin"
@@ -34,6 +35,7 @@ bool torture_rpc_join(struct torture_context *torture)
lp_smb_ports(torture->lp_ctx),
"IPC$", NULL,
machine_account,
+ lp_resolve_context(torture->lp_ctx),
NULL);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n",
@@ -59,6 +61,7 @@ bool torture_rpc_join(struct torture_context *torture)
lp_smb_ports(torture->lp_ctx),
"IPC$", NULL,
machine_account,
+ lp_resolve_context(torture->lp_ctx),
NULL);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n",
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index 36461ad629..fd8236544e 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -50,6 +50,7 @@
#include "libcli/security/proto.h"
#include "param/param.h"
#include "lib/registry/registry.h"
+#include "libcli/resolve/resolve.h"
/*
* This tests a RPC call using an invalid vuid
@@ -82,6 +83,7 @@ bool torture_bind_authcontext(struct torture_context *torture)
torture_setting_string(torture, "host", NULL),
lp_smb_ports(torture->lp_ctx),
"IPC$", NULL, cmdline_credentials,
+ lp_resolve_context(torture->lp_ctx),
NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("smbcli_full_connection failed: %s\n",
@@ -292,6 +294,7 @@ bool torture_bind_samba3(struct torture_context *torture)
torture_setting_string(torture, "host", NULL),
lp_smb_ports(torture->lp_ctx),
"IPC$", NULL, cmdline_credentials,
+ lp_resolve_context(torture->lp_ctx),
NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("smbcli_full_connection failed: %s\n",
@@ -1152,7 +1155,9 @@ bool torture_netlogon_samba3(struct torture_context *torture)
status = smbcli_full_connection(mem_ctx, &cli,
torture_setting_string(torture, "host", NULL),
lp_smb_ports(torture->lp_ctx),
- "IPC$", NULL, anon_creds, NULL);
+ "IPC$", NULL, anon_creds,
+ lp_resolve_context(torture->lp_ctx),
+ NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("smbcli_full_connection failed: %s\n",
nt_errstr(status));
@@ -1234,7 +1239,9 @@ static bool test_join3(struct torture_context *tctx,
status = smbcli_full_connection(tctx, &cli,
torture_setting_string(tctx, "host", NULL),
lp_smb_ports(tctx->lp_ctx),
- "IPC$", NULL, smb_creds, NULL);
+ "IPC$", NULL, smb_creds,
+ lp_resolve_context(tctx->lp_ctx),
+ NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("smbcli_full_connection failed: %s\n",
nt_errstr(status));
@@ -1599,7 +1606,9 @@ bool torture_samba3_rpc_getusername(struct torture_context *torture)
status = smbcli_full_connection(
mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
lp_smb_ports(torture->lp_ctx),
- "IPC$", NULL, cmdline_credentials, NULL);
+ "IPC$", NULL, cmdline_credentials,
+ lp_resolve_context(torture->lp_ctx),
+ NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) smbcli_full_connection failed: %s\n",
__location__, nt_errstr(status));
@@ -1624,7 +1633,9 @@ bool torture_samba3_rpc_getusername(struct torture_context *torture)
status = smbcli_full_connection(
mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
lp_smb_ports(torture->lp_ctx),
- "IPC$", NULL, anon_creds, NULL);
+ "IPC$", NULL, anon_creds,
+ lp_resolve_context(torture->lp_ctx),
+ NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) anon smbcli_full_connection failed: %s\n",
__location__, nt_errstr(status));