summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/winbind/wb_async_helpers.c26
-rw-r--r--source4/winbind/wb_cmd_getdcname.c5
-rw-r--r--source4/winbind/wb_cmd_list_trustdom.c5
-rw-r--r--source4/winbind/wb_cmd_lookupname.c5
-rw-r--r--source4/winbind/wb_cmd_lookupsid.c6
-rw-r--r--source4/winbind/wb_cmd_userdomgroups.c5
-rw-r--r--source4/winbind/wb_cmd_usersids.c6
-rw-r--r--source4/winbind/wb_dom_info_trusted.c5
-rw-r--r--source4/winbind/wb_pam_auth.c5
-rw-r--r--source4/winbind/wb_sam_logon.c2
-rw-r--r--source4/winbind/wb_sid2domain.c5
11 files changed, 18 insertions, 57 deletions
diff --git a/source4/winbind/wb_async_helpers.c b/source4/winbind/wb_async_helpers.c
index 11d675d2e9..91e80e8cc5 100644
--- a/source4/winbind/wb_async_helpers.c
+++ b/source4/winbind/wb_async_helpers.c
@@ -60,8 +60,8 @@ struct composite_context *wb_get_schannel_creds_send(TALLOC_CTX *mem_ctx,
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) {
@@ -69,9 +69,7 @@ struct composite_context *wb_get_schannel_creds_send(TALLOC_CTX *mem_ctx,
goto failed;
}
- c->state = COMPOSITE_STATE_IN_PROGRESS;
c->private_data = state;
- c->event_ctx = ev;
state->wks_creds = wks_creds;
@@ -268,11 +266,8 @@ struct composite_context *wb_lsa_lookupsids_send(TALLOC_CTX *mem_ctx,
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;
@@ -428,11 +423,8 @@ struct composite_context *wb_lsa_lookupnames_send(TALLOC_CTX *mem_ctx,
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;
@@ -563,11 +555,8 @@ static void cmd_checkmachacc_recv_init(struct composite_context *ctx);
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;
@@ -641,11 +630,8 @@ struct composite_context *wb_samr_userdomgroups_send(TALLOC_CTX *mem_ctx,
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;
diff --git a/source4/winbind/wb_cmd_getdcname.c b/source4/winbind/wb_cmd_getdcname.c
index a9ae609879..0696ff5572 100644
--- a/source4/winbind/wb_cmd_getdcname.c
+++ b/source4/winbind/wb_cmd_getdcname.c
@@ -44,11 +44,8 @@ struct composite_context *wb_cmd_getdcname_send(TALLOC_CTX *mem_ctx,
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;
diff --git a/source4/winbind/wb_cmd_list_trustdom.c b/source4/winbind/wb_cmd_list_trustdom.c
index 0090879a83..4635f23312 100644
--- a/source4/winbind/wb_cmd_list_trustdom.c
+++ b/source4/winbind/wb_cmd_list_trustdom.c
@@ -52,11 +52,8 @@ struct composite_context *wb_cmd_list_trustdoms_send(TALLOC_CTX *mem_ctx,
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;
diff --git a/source4/winbind/wb_cmd_lookupname.c b/source4/winbind/wb_cmd_lookupname.c
index 51d5c5a8d8..9b9b3d7574 100644
--- a/source4/winbind/wb_cmd_lookupname.c
+++ b/source4/winbind/wb_cmd_lookupname.c
@@ -44,11 +44,8 @@ struct composite_context *wb_cmd_lookupname_send(TALLOC_CTX *mem_ctx,
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;
diff --git a/source4/winbind/wb_cmd_lookupsid.c b/source4/winbind/wb_cmd_lookupsid.c
index f5549a9a7f..5e17c265e3 100644
--- a/source4/winbind/wb_cmd_lookupsid.c
+++ b/source4/winbind/wb_cmd_lookupsid.c
@@ -43,11 +43,9 @@ struct composite_context *wb_cmd_lookupsid_send(TALLOC_CTX *mem_ctx,
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;
diff --git a/source4/winbind/wb_cmd_userdomgroups.c b/source4/winbind/wb_cmd_userdomgroups.c
index 2f994e8ea1..67e3131a51 100644
--- a/source4/winbind/wb_cmd_userdomgroups.c
+++ b/source4/winbind/wb_cmd_userdomgroups.c
@@ -45,11 +45,8 @@ struct composite_context *wb_cmd_userdomgroups_send(TALLOC_CTX *mem_ctx,
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;
diff --git a/source4/winbind/wb_cmd_usersids.c b/source4/winbind/wb_cmd_usersids.c
index 1aebeae913..aa8a9ea9c0 100644
--- a/source4/winbind/wb_cmd_usersids.c
+++ b/source4/winbind/wb_cmd_usersids.c
@@ -57,11 +57,9 @@ struct composite_context *wb_cmd_usersids_send(TALLOC_CTX *mem_ctx,
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;
diff --git a/source4/winbind/wb_dom_info_trusted.c b/source4/winbind/wb_dom_info_trusted.c
index 8288c7921b..e0d074270c 100644
--- a/source4/winbind/wb_dom_info_trusted.c
+++ b/source4/winbind/wb_dom_info_trusted.c
@@ -52,11 +52,8 @@ struct composite_context *wb_trusted_dom_info_send(TALLOC_CTX *mem_ctx,
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;
diff --git a/source4/winbind/wb_pam_auth.c b/source4/winbind/wb_pam_auth.c
index b8c1cacbf0..c89870c3a2 100644
--- a/source4/winbind/wb_pam_auth.c
+++ b/source4/winbind/wb_pam_auth.c
@@ -71,11 +71,8 @@ struct composite_context *wb_cmd_pam_auth_crap_send(TALLOC_CTX *mem_ctx,
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;
diff --git a/source4/winbind/wb_sam_logon.c b/source4/winbind/wb_sam_logon.c
index 842e144c16..683773c76e 100644
--- a/source4/winbind/wb_sam_logon.c
+++ b/source4/winbind/wb_sam_logon.c
@@ -73,7 +73,7 @@ struct composite_context *wb_sam_logon_send(TALLOC_CTX *mem_ctx,
}
/*
- 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)
diff --git a/source4/winbind/wb_sid2domain.c b/source4/winbind/wb_sid2domain.c
index 516f8a115e..cf7aef3fca 100644
--- a/source4/winbind/wb_sid2domain.c
+++ b/source4/winbind/wb_sid2domain.c
@@ -64,11 +64,8 @@ struct composite_context *wb_sid2domain_send(TALLOC_CTX *mem_ctx,
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;