summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/schannel.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-10-03 23:46:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:20 -0500
commit099c3d532736d5836d0d5d3236cd1e502897076c (patch)
tree794c93933c694ffc92386cdea8fc0c56ba78b97e /source4/torture/rpc/schannel.c
parentb7a47635caeb326cc8a5c2bd2307334a4a2ff416 (diff)
downloadsamba-099c3d532736d5836d0d5d3236cd1e502897076c.tar.gz
samba-099c3d532736d5836d0d5d3236cd1e502897076c.tar.bz2
samba-099c3d532736d5836d0d5d3236cd1e502897076c.zip
r10697: Change the torture join code to return a credentials structure, as
that is what most of the callers want anyway. Remove and re-add the account for the torture case, rather than just modify it. Test with a user account (needs work to change the password). Andrew Bartlett (This used to be commit 38bebef02454164cbe882347d80e03abee656205)
Diffstat (limited to 'source4/torture/rpc/schannel.c')
-rw-r--r--source4/torture/rpc/schannel.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c
index 90f5fb0361..d73dae08b4 100644
--- a/source4/torture/rpc/schannel.c
+++ b/source4/torture/rpc/schannel.c
@@ -147,7 +147,6 @@ static BOOL test_schannel(TALLOC_CTX *mem_ctx,
uint32_t schannel_type)
{
void *join_ctx;
- const char *machine_password;
NTSTATUS status;
const char *binding = lp_parm_string(-1, "torture", "binding");
struct dcerpc_binding *b;
@@ -157,10 +156,9 @@ static BOOL test_schannel(TALLOC_CTX *mem_ctx,
struct cli_credentials *credentials;
TALLOC_CTX *test_ctx = talloc_named(mem_ctx, 0, "test_schannel context");
- char *test_machine_account = talloc_asprintf(NULL, "%s$", TEST_MACHINE_NAME);
join_ctx = torture_join_domain(TEST_MACHINE_NAME,
- acct_flags, &machine_password);
+ acct_flags, &credentials);
if (!join_ctx) {
printf("Failed to join domain with acct_flags=0x%x\n", acct_flags);
talloc_free(test_ctx);
@@ -176,24 +174,6 @@ static BOOL test_schannel(TALLOC_CTX *mem_ctx,
b->flags &= ~DCERPC_AUTH_OPTIONS;
b->flags |= dcerpc_flags;
- credentials = cli_credentials_init(mem_ctx);
- cli_credentials_set_conf(credentials);
-
- cli_credentials_set_domain(credentials, lp_workgroup(), CRED_SPECIFIED);
- cli_credentials_set_workstation(credentials, TEST_MACHINE_NAME, CRED_SPECIFIED);
- cli_credentials_set_username(credentials, test_machine_account, CRED_SPECIFIED);
- cli_credentials_set_password(credentials, machine_password, CRED_SPECIFIED);
-
- if (acct_flags == ACB_WSTRUST) {
- cli_credentials_set_secure_channel_type(credentials,
- SEC_CHAN_WKSTA);
- } else if (acct_flags == ACB_SVRTRUST) {
- cli_credentials_set_secure_channel_type(credentials,
- SEC_CHAN_BDC);
- } else {
- goto failed;
- }
-
status = dcerpc_pipe_connect_b(test_ctx,
&p, b,
DCERPC_SAMR_UUID,