diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-05-01 19:29:00 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:16:26 -0500 |
commit | 85e9412c4786ede6f94d879185d493756d37eebe (patch) | |
tree | bb1f38e33db38af59f427228402cec1095bf4793 /source4/torture | |
parent | 7fca1d46cea38229faf9a7092d86a452658f2ca0 (diff) | |
download | samba-85e9412c4786ede6f94d879185d493756d37eebe.tar.gz samba-85e9412c4786ede6f94d879185d493756d37eebe.tar.bz2 samba-85e9412c4786ede6f94d879185d493756d37eebe.zip |
r6565: Cludge, cludge, cludge...
We need to pass the 'secure channel type' to the NETLOGON layer, which
must match the account type.
(Yes, jelmer objects to this inclusion of the kitchen sink ;-)
Andrew Bartlett
(This used to be commit 8ee208a926d2b15fdc42753b1f9ee586564c6248)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/samlogon.c | 4 | ||||
-rw-r--r-- | source4/torture/rpc/samsync.c | 8 | ||||
-rw-r--r-- | source4/torture/rpc/schannel.c | 26 |
3 files changed, 27 insertions, 11 deletions
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c index 86bfe48a75..9a9c3039d2 100644 --- a/source4/torture/rpc/samlogon.c +++ b/source4/torture/rpc/samlogon.c @@ -1345,12 +1345,14 @@ BOOL torture_rpc_samlogon(void) * with INTERNAL_ERROR */ b->flags &= ~DCERPC_AUTH_OPTIONS; - b->flags |= DCERPC_SCHANNEL_WORKSTATION | DCERPC_SIGN | DCERPC_SCHANNEL_128; + b->flags |= DCERPC_SCHANNEL | DCERPC_SIGN | DCERPC_SCHANNEL_128; cli_credentials_set_workstation(credentials, TEST_MACHINE_NAME, CRED_SPECIFIED); cli_credentials_set_domain(credentials, lp_workgroup(), CRED_SPECIFIED); cli_credentials_set_username(credentials, test_machine_account, CRED_SPECIFIED); cli_credentials_set_password(credentials, machine_password, CRED_SPECIFIED); + cli_credentials_set_secure_channel_type(credentials, + SEC_CHAN_WKSTA); status = dcerpc_pipe_connect_b(mem_ctx, &p, b, DCERPC_NETLOGON_UUID, diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c index 412b27c8ec..0a17b2646b 100644 --- a/source4/torture/rpc/samsync.c +++ b/source4/torture/rpc/samsync.c @@ -1499,7 +1499,7 @@ BOOL torture_rpc_samsync(void) } b->flags &= ~DCERPC_AUTH_OPTIONS; - b->flags |= DCERPC_SCHANNEL_BDC | DCERPC_SIGN; + b->flags |= DCERPC_SCHANNEL | DCERPC_SIGN; credentials = cli_credentials_init(mem_ctx); @@ -1507,6 +1507,8 @@ BOOL torture_rpc_samsync(void) cli_credentials_set_domain(credentials, lp_workgroup(), CRED_SPECIFIED); cli_credentials_set_username(credentials, test_machine_account, CRED_SPECIFIED); cli_credentials_set_password(credentials, machine_password, CRED_SPECIFIED); + cli_credentials_set_secure_channel_type(credentials, + SEC_CHAN_BDC); status = dcerpc_pipe_connect_b(samsync_state, &samsync_state->p, b, @@ -1536,7 +1538,7 @@ BOOL torture_rpc_samsync(void) } b_netlogon_wksta->flags &= ~DCERPC_AUTH_OPTIONS; - b_netlogon_wksta->flags |= DCERPC_SCHANNEL_WORKSTATION | DCERPC_SIGN; + b_netlogon_wksta->flags |= DCERPC_SCHANNEL | DCERPC_SIGN; credentials_wksta = cli_credentials_init(mem_ctx); @@ -1544,6 +1546,8 @@ BOOL torture_rpc_samsync(void) cli_credentials_set_domain(credentials_wksta, lp_workgroup(), CRED_SPECIFIED); cli_credentials_set_username(credentials_wksta, test_wksta_machine_account, CRED_SPECIFIED); cli_credentials_set_password(credentials_wksta, wksta_machine_password, CRED_SPECIFIED); + cli_credentials_set_secure_channel_type(credentials_wksta, + SEC_CHAN_WKSTA); status = dcerpc_pipe_connect_b(samsync_state, &samsync_state->p_netlogon_wksta, diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c index de0e1caa64..75f9198106 100644 --- a/source4/torture/rpc/schannel.c +++ b/source4/torture/rpc/schannel.c @@ -157,6 +157,16 @@ static BOOL test_schannel(TALLOC_CTX *mem_ctx, 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, @@ -238,14 +248,14 @@ BOOL torture_rpc_schannel(void) uint32_t dcerpc_flags; uint32_t schannel_type; } tests[] = { - { ACB_WSTRUST, DCERPC_SCHANNEL_WORKSTATION | DCERPC_SIGN, 3 }, - { ACB_WSTRUST, DCERPC_SCHANNEL_WORKSTATION | DCERPC_SEAL, 3 }, - { ACB_WSTRUST, DCERPC_SCHANNEL_WORKSTATION | DCERPC_SIGN | DCERPC_SCHANNEL_128, 3 }, - { ACB_WSTRUST, DCERPC_SCHANNEL_WORKSTATION | DCERPC_SEAL | DCERPC_SCHANNEL_128, 3 }, - { ACB_SVRTRUST, DCERPC_SCHANNEL_BDC | DCERPC_SIGN, 3 }, - { ACB_SVRTRUST, DCERPC_SCHANNEL_BDC | DCERPC_SEAL, 3 }, - { ACB_SVRTRUST, DCERPC_SCHANNEL_BDC | DCERPC_SIGN | DCERPC_SCHANNEL_128, 3 }, - { ACB_SVRTRUST, DCERPC_SCHANNEL_BDC | DCERPC_SEAL | DCERPC_SCHANNEL_128, 3 } + { ACB_WSTRUST, DCERPC_SCHANNEL | DCERPC_SIGN, 3 }, + { ACB_WSTRUST, DCERPC_SCHANNEL | DCERPC_SEAL, 3 }, + { ACB_WSTRUST, DCERPC_SCHANNEL | DCERPC_SIGN | DCERPC_SCHANNEL_128, 3 }, + { ACB_WSTRUST, DCERPC_SCHANNEL | DCERPC_SEAL | DCERPC_SCHANNEL_128, 3 }, + { ACB_SVRTRUST, DCERPC_SCHANNEL | DCERPC_SIGN, 3 }, + { ACB_SVRTRUST, DCERPC_SCHANNEL | DCERPC_SEAL, 3 }, + { ACB_SVRTRUST, DCERPC_SCHANNEL | DCERPC_SIGN | DCERPC_SCHANNEL_128, 3 }, + { ACB_SVRTRUST, DCERPC_SCHANNEL | DCERPC_SEAL | DCERPC_SCHANNEL_128, 3 } }; int i; |