r4614: Fix RPC-SAMLOGON, to use the workstation context (forgot to globally replace).
authorAndrew Bartlett <abartlet@samba.org>
Sun, 9 Jan 2005 07:39:31 +0000 (07:39 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:08:33 +0000 (13:08 -0500)
Andrew Bartlett
(This used to be commit ddb54d4ea1610b38e011e2f217ded7b6278d5290)

source4/torture/rpc/netlogon.c
source4/torture/rpc/samlogon.c

index dd6a6917f93934ffdcdccdbf05924fbc5f6094b2..774abbdf82de03f412f6f4b69510eab3f926832e 100644 (file)
@@ -130,6 +130,7 @@ BOOL test_SetupCredentials2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                            uint32_t negotiate_flags,
                            const char *machine_name,
                            const char *plain_pass,
+                           int sec_chan_type,
                            struct creds_CredentialState *creds)
 {
        NTSTATUS status;
@@ -157,7 +158,7 @@ BOOL test_SetupCredentials2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
 
        a.in.server_name = NULL;
        a.in.account_name = talloc_asprintf(mem_ctx, "%s$", machine_name);
-       a.in.secure_channel_type = SEC_CHAN_BDC;
+       a.in.secure_channel_type = sec_chan_type;
        a.in.computer_name = machine_name;
        a.in.negotiate_flags = &negotiate_flags;
        a.out.negotiate_flags = &negotiate_flags;
@@ -761,7 +762,8 @@ static BOOL test_DatabaseSync2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
        BOOL ret = True;
 
        if (!test_SetupCredentials2(p, mem_ctx, NETLOGON_NEG_AUTH2_FLAGS, 
-                                   TEST_MACHINE_NAME, machine_password, &creds)) {
+                                   TEST_MACHINE_NAME, machine_password, 
+                                   SEC_CHAN_BDC, &creds)) {
                return False;
        }
 
index d75165ac43926dcbf7983f7448fe1f42fb817c09..56631a4a160892055518ffb07799b86fed1e9695 100644 (file)
@@ -1232,7 +1232,7 @@ BOOL torture_rpc_samlogon(void)
        join_ctx = torture_join_domain(TEST_MACHINE_NAME, lp_workgroup(), ACB_WSTRUST, 
                                       &machine_password);
        if (!join_ctx) {
-               printf("Failed to join as BDC\n");
+               printf("Failed to join as Workstation\n");
                return False;
        }
 
@@ -1247,7 +1247,7 @@ BOOL torture_rpc_samlogon(void)
         * with INTERNAL_ERROR */
 
        b.flags &= ~DCERPC_AUTH_OPTIONS;
-       b.flags |= DCERPC_SCHANNEL_BDC | DCERPC_SIGN | DCERPC_SCHANNEL_128;
+       b.flags |= DCERPC_SCHANNEL_WORKSTATION | DCERPC_SIGN | DCERPC_SCHANNEL_128;
 
        status = dcerpc_pipe_connect_b(&p, &b, 
                                       DCERPC_NETLOGON_UUID,
@@ -1278,7 +1278,8 @@ BOOL torture_rpc_samlogon(void)
        for (i=0; i < ARRAY_SIZE(credential_flags); i++) {
                
                if (!test_SetupCredentials2(p, mem_ctx, credential_flags[i],
-                                           TEST_MACHINE_NAME, machine_password, creds)) {
+                                           TEST_MACHINE_NAME, machine_password, 
+                                           SEC_CHAN_WKSTA, creds)) {
                        return False;
                }