summaryrefslogtreecommitdiff
path: root/source4/torture/libnet/libnet_rpc.c
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2007-05-11 21:48:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:52:19 -0500
commita4e4ff927353e63b0dffb0d45dbd394b1938cadb (patch)
treeb024e2dd6d51866c5fc40b3c6774b0c0b22fe89e /source4/torture/libnet/libnet_rpc.c
parent945cb016a444a2170685e15e427167d8305542d2 (diff)
downloadsamba-a4e4ff927353e63b0dffb0d45dbd394b1938cadb.tar.gz
samba-a4e4ff927353e63b0dffb0d45dbd394b1938cadb.tar.bz2
samba-a4e4ff927353e63b0dffb0d45dbd394b1938cadb.zip
r22810: when a test runs against domain controller use domain name
instead of target host name specified in binding string. metze: this fixes the problem with passing name resolution down the socket wrapper calls. NET tests now run against $SERVER flawlessly. rafal (This used to be commit 44eacd8654a26dbd473050705f28966ce08ccd70)
Diffstat (limited to 'source4/torture/libnet/libnet_rpc.c')
-rw-r--r--source4/torture/libnet/libnet_rpc.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/source4/torture/libnet/libnet_rpc.c b/source4/torture/libnet/libnet_rpc.c
index 19802df72d..8082572e7b 100644
--- a/source4/torture/libnet/libnet_rpc.c
+++ b/source4/torture/libnet/libnet_rpc.c
@@ -156,6 +156,7 @@ BOOL torture_rpc_connect_pdc(struct torture_context *torture)
NTSTATUS status;
struct dcerpc_binding *binding;
const char *bindstr;
+ const char *domain_name;
bindstr = torture_setting_string(torture, "binding", NULL);
status = dcerpc_parse_binding(torture, bindstr, &binding);
@@ -164,7 +165,11 @@ BOOL torture_rpc_connect_pdc(struct torture_context *torture)
return False;
}
- return torture_rpc_connect(torture, level, NULL, binding->host);
+ /* we're accessing domain controller so the domain name should be
+ passed (it's going to be resolved to dc name and address) instead
+ of specific server name. */
+ domain_name = lp_workgroup();
+ return torture_rpc_connect(torture, level, NULL, domain_name);
}
@@ -174,6 +179,7 @@ BOOL torture_rpc_connect_dc(struct torture_context *torture)
NTSTATUS status;
struct dcerpc_binding *binding;
const char *bindstr;
+ const char *domain_name;
bindstr = torture_setting_string(torture, "binding", NULL);
status = dcerpc_parse_binding(torture, bindstr, &binding);
@@ -182,7 +188,11 @@ BOOL torture_rpc_connect_dc(struct torture_context *torture)
return False;
}
- return torture_rpc_connect(torture, level, NULL, binding->host);
+ /* we're accessing domain controller so the domain name should be
+ passed (it's going to be resolved to dc name and address) instead
+ of specific server name. */
+ domain_name = lp_workgroup();
+ return torture_rpc_connect(torture, level, NULL, domain_name);
}
@@ -192,6 +202,7 @@ BOOL torture_rpc_connect_dc_info(struct torture_context *torture)
NTSTATUS status;
struct dcerpc_binding *binding;
const char *bindstr;
+ const char *domain_name;
bindstr = torture_setting_string(torture, "binding", NULL);
status = dcerpc_parse_binding(torture, bindstr, &binding);
@@ -200,7 +211,11 @@ BOOL torture_rpc_connect_dc_info(struct torture_context *torture)
return False;
}
- return torture_rpc_connect(torture, level, NULL, binding->host);
+ /* we're accessing domain controller so the domain name should be
+ passed (it's going to be resolved to dc name and address) instead
+ of specific server name. */
+ domain_name = lp_workgroup();
+ return torture_rpc_connect(torture, level, NULL, domain_name);
}