From f1aaa16cbc1747d411aa4b3ec82992f44c64fe7b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 12 Dec 2006 07:53:12 +0000 Subject: r20115: from Julien Kerihuel , 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) --- source4/torture/rpc/testjoin.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'source4/torture/rpc') 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; } -- cgit