r6451: Ensure we correctly initialise the credentials structure in the schannel test.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 25 Apr 2005 03:02:30 +0000 (03:02 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:11:37 +0000 (13:11 -0500)
Andrew Bartlett

source/torture/rpc/schannel.c

index 7bc184f42eba8cb0e2078e77c9babf4ac2f652da..de0e1caa64131c3d717648fa5fde6c2366d86808 100644 (file)
@@ -132,8 +132,6 @@ static BOOL test_schannel(TALLOC_CTX *mem_ctx,
        TALLOC_CTX *test_ctx = talloc_named(mem_ctx, 0, "test_schannel context");
        char *test_machine_account = talloc_asprintf(NULL, "%s$", TEST_MACHINE_NAME);
 
-       credentials = cli_credentials_init(mem_ctx);
-
        join_ctx = torture_create_testuser(test_machine_account, lp_workgroup(), 
                                           acct_flags, &machine_password);
        if (!join_ctx) {
@@ -151,6 +149,9 @@ 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);