composite_context, because we don't use the creation function.
Andrew Bartlett
struct composite_context *c, *creq;
struct get_schannel_creds_state *state;
- c = talloc_zero(mem_ctx, struct composite_context);
- if (c == NULL) return NULL;
+ c = composite_create(mem_ctx, ev);
+ if (c == NULL) goto failed;
state = talloc(c, struct get_schannel_creds_state);
if (state == NULL) {
goto failed;
}
- c->state = COMPOSITE_STATE_IN_PROGRESS;
c->private_data = state;
- c->event_ctx = ev;
state->wks_creds = wks_creds;
struct lsa_lookupsids_state *state;
int i;
- result = talloc(mem_ctx, struct composite_context);
+ result = composite_create(mem_ctx, lsa_pipe->conn->event_ctx);
if (result == NULL) goto failed;
- result->state = COMPOSITE_STATE_IN_PROGRESS;
- result->async.fn = NULL;
- result->event_ctx = lsa_pipe->conn->event_ctx;
state = talloc(result, struct lsa_lookupsids_state);
if (state == NULL) goto failed;
struct lsa_String *lsa_names;
int i;
- result = talloc(mem_ctx, struct composite_context);
+ result = composite_create(mem_ctx, lsa_pipe->conn->event_ctx);
if (result == NULL) goto failed;
- result->state = COMPOSITE_STATE_IN_PROGRESS;
- result->async.fn = NULL;
- result->event_ctx = lsa_pipe->conn->event_ctx;
state = talloc(result, struct lsa_lookupnames_state);
if (state == NULL) goto failed;
struct cmd_checkmachacc_state *state;
struct wbsrv_service *service = call->wbconn->listen_socket->service;
- result = talloc(call, struct composite_context);
+ result = composite_create(mem_ctx, call->event_ctx;
if (result == NULL) goto failed;
- result->state = COMPOSITE_STATE_IN_PROGRESS;
- result->async.fn = NULL;
- result->event_ctx = call->event_ctx;
state = talloc(result, struct cmd_checkmachacc_state);
if (state == NULL) goto failed;
struct rpc_request *req;
struct samr_getuserdomgroups_state *state;
- result = talloc(mem_ctx, struct composite_context);
+ result = composite_create(mem_ctx, samr_pipe->conn->event_ctx);
if (result == NULL) goto failed;
- result->state = COMPOSITE_STATE_IN_PROGRESS;
- result->async.fn = NULL;
- result->event_ctx = samr_pipe->conn->event_ctx;
state = talloc(result, struct samr_getuserdomgroups_state);
if (state == NULL) goto failed;
struct composite_context *result, *ctx;
struct cmd_getdcname_state *state;
- result = talloc(mem_ctx, struct composite_context);
+ result = composite_create(mem_ctx, service->task->event_ctx);
if (result == NULL) goto failed;
- result->state = COMPOSITE_STATE_IN_PROGRESS;
- result->async.fn = NULL;
- result->event_ctx = service->task->event_ctx;
state = talloc(result, struct cmd_getdcname_state);
if (state == NULL) goto failed;
struct composite_context *result, *ctx;
struct cmd_list_trustdom_state *state;
- result = talloc_zero(mem_ctx, struct composite_context);
+ result = composite_create(mem_ctx, service->task->event_ctx);
if (result == NULL) goto failed;
- result->state = COMPOSITE_STATE_IN_PROGRESS;
- result->async.fn = NULL;
- result->event_ctx = service->task->event_ctx;
state = talloc(result, struct cmd_list_trustdom_state);
if (state == NULL) goto failed;
struct composite_context *result, *ctx;
struct cmd_lookupname_state *state;
- result = talloc(mem_ctx, struct composite_context);
+ result = composite_create(mem_ctx, service->task->event_ctx);
if (result == NULL) goto failed;
- result->state = COMPOSITE_STATE_IN_PROGRESS;
- result->async.fn = NULL;
- result->event_ctx = service->task->event_ctx;
state = talloc(result, struct cmd_lookupname_state);
if (state == NULL) goto failed;
struct composite_context *result, *ctx;
struct cmd_lookupsid_state *state;
- result = talloc(mem_ctx, struct composite_context);
+
+ result = composite_create(mem_ctx, service->task->event_ctx);
if (result == NULL) goto failed;
- result->state = COMPOSITE_STATE_IN_PROGRESS;
- result->async.fn = NULL;
- result->event_ctx = service->task->event_ctx;
state = talloc(result, struct cmd_lookupsid_state);
if (state == NULL) goto failed;
struct composite_context *result, *ctx;
struct cmd_userdomgroups_state *state;
- result = talloc(mem_ctx, struct composite_context);
+ result = composite_create(mem_ctx, service->task->event_ctx);
if (result == NULL) goto failed;
- result->state = COMPOSITE_STATE_IN_PROGRESS;
- result->async.fn = NULL;
- result->event_ctx = service->task->event_ctx;
state = talloc(result, struct cmd_userdomgroups_state);
if (state == NULL) goto failed;
struct composite_context *result, *ctx;
struct cmd_usersids_state *state;
- result = talloc(mem_ctx, struct composite_context);
+
+ result = composite_create(mem_ctx, service->task->event_ctx);
if (result == NULL) goto failed;
- result->state = COMPOSITE_STATE_IN_PROGRESS;
- result->async.fn = NULL;
- result->event_ctx = service->task->event_ctx;
state = talloc(result, struct cmd_usersids_state);
if (state == NULL) goto failed;
struct composite_context *result, *ctx;
struct trusted_dom_info_state *state;
- result = talloc(mem_ctx, struct composite_context);
+ result = composite_create(mem_ctx, service->task->event_ctx);
if (result == NULL) goto failed;
- result->state = COMPOSITE_STATE_IN_PROGRESS;
- result->async.fn = NULL;
- result->event_ctx = service->task->event_ctx;
state = talloc(result, struct trusted_dom_info_state);
if (state == NULL) goto failed;
struct composite_context *result, *ctx;
struct pam_auth_crap_state *state;
- result = talloc(mem_ctx, struct composite_context);
+ result = composite_create(mem_ctx, service->task->event_ctx);
if (result == NULL) goto failed;
- result->state = COMPOSITE_STATE_IN_PROGRESS;
- result->async.fn = NULL;
- result->event_ctx = service->task->event_ctx;
state = talloc(result, struct pam_auth_crap_state);
if (state == NULL) goto failed;
}
/*
- Finish the connection to the DC
+ Having finished making the connection to the DC
Send of a SamLogon request to authenticate a user.
*/
static void wb_sam_logon_recv_domain(struct composite_context *creq)
struct composite_context *result, *ctx;
struct sid2domain_state *state;
- result = talloc_zero(mem_ctx, struct composite_context);
+ result = composite_create(mem_ctx, service->task->event_ctx);
if (result == NULL) goto failed;
- result->state = COMPOSITE_STATE_IN_PROGRESS;
- result->async.fn = NULL;
- result->event_ctx = service->task->event_ctx;
state = talloc(result, struct sid2domain_state);
if (state == NULL) goto failed;