diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index 937841c..b184832 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -48,7 +48,8 @@ static struct named_mutex *mutex; * **/ -static NTSTATUS connect_to_domain_password_server(struct cli_state **cli_ret, +static NTSTATUS connect_to_domain_password_server(TALLOC_CTX *mem_ctx, + struct cli_state **cli_ret, const char *domain, const char *dc_name, const struct sockaddr_storage *dc_ss, @@ -138,7 +139,7 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli_ret, account_name, sec_chan_type, msg_ctx, - talloc_tos(), + mem_ctx, &netlogon_creds); if (!NT_STATUS_IS_OK(result)) { cli_shutdown(cli); @@ -250,7 +251,8 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx, /* rety loop for robustness */ for (i = 0; !NT_STATUS_IS_OK(nt_status) && (i < 3); i++) { - nt_status = connect_to_domain_password_server(&cli, + nt_status = connect_to_domain_password_server(mem_ctx, + &cli, domain, dc_name, dc_ss,