summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-12 07:53:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:09 -0500
commitf1aaa16cbc1747d411aa4b3ec82992f44c64fe7b (patch)
treecb1474be5d70186dff1a5aaed4720296f1244e6e /source4
parente99ea0a1e1d5666a3a63beba968f9ca23bc33227 (diff)
downloadsamba-f1aaa16cbc1747d411aa4b3ec82992f44c64fe7b.tar.gz
samba-f1aaa16cbc1747d411aa4b3ec82992f44c64fe7b.tar.bz2
samba-f1aaa16cbc1747d411aa4b3ec82992f44c64fe7b.zip
r20115: from Julien Kerihuel <j.kerihuel@openchange.org>, thanks!:
Here is a patch that adds a torture:dc_binding parametric option to torture_create_testuser in testjoin.c. This patch is used in OpenChange torture tests when the AD is different from the Exchange Server. This generic option could also be used for later 'member server' tests in Samba4. metze (This used to be commit 9ddabfc60e1a4f5e471991253141ce458c9a683d)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/testjoin.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c
index 261412cf92..80d5eb0580 100644
--- a/source4/torture/rpc/testjoin.c
+++ b/source4/torture/rpc/testjoin.c
@@ -125,6 +125,7 @@ struct test_join *torture_create_testuser(const char *username,
int policy_min_pw_len = 0;
struct test_join *join;
char *random_pw;
+ const char *dc_binding = lp_parm_string(-1, "torture", "dc_binding");
join = talloc(NULL, struct test_join);
if (join == NULL) {
@@ -134,10 +135,19 @@ struct test_join *torture_create_testuser(const char *username,
ZERO_STRUCTP(join);
printf("Connecting to SAMR\n");
-
- status = torture_rpc_connection(join,
- &join->p,
- &dcerpc_table_samr);
+
+ if (dc_binding) {
+ status = dcerpc_pipe_connect(join,
+ &join->p,
+ dc_binding,
+ &dcerpc_table_samr,
+ cmdline_credentials, NULL);
+
+ } else {
+ status = torture_rpc_connection(join,
+ &join->p,
+ &dcerpc_table_samr);
+ }
if (!NT_STATUS_IS_OK(status)) {
return NULL;
}