s3-netlogon: Start fixing rpccli_netlogon_setup_creds after auth merge.
[ira/wip.git] / source3 / rpc_client / cli_netlogon.c
index 32485ead9f54347f0cd48269ef0d4f2442c07159..cfaf9f3649542f19abfe02b2b47b23b7ac843ebe 100644 (file)
@@ -72,8 +72,8 @@ NTSTATUS rpccli_netlogon_setup_creds(struct rpc_pipe_client *cli,
        /* Calculate the session key and client credentials */
        
        cli->dc = netlogon_creds_client_init(cli,
+                                   mach_acct,
                                    clnt_name,
-                                   machine_account, 
                                    &clnt_chal_send,
                                    &srv_chal_recv,
                                    &password,
@@ -101,6 +101,7 @@ NTSTATUS rpccli_netlogon_setup_creds(struct rpc_pipe_client *cli,
         * with the returned neg_flags - gd */
 
        if (NT_STATUS_EQUAL(result, NT_STATUS_ACCESS_DENIED) && !retried) {
+               retried = true;
                TALLOC_FREE(cli->dc);
                goto again;
        }