summaryrefslogtreecommitdiff
path: root/source4/winbind/wb_async_helpers.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-04-30 16:52:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:51:52 -0500
commitf5a94f978b9221bbf79e3d0d3fe8ad5d735509a1 (patch)
tree15aec7052e1f244d0030519e77f1d9c5250ba291 /source4/winbind/wb_async_helpers.c
parent2c65bbc984f7084680798c321338d98ad9d336c2 (diff)
downloadsamba-f5a94f978b9221bbf79e3d0d3fe8ad5d735509a1.tar.gz
samba-f5a94f978b9221bbf79e3d0d3fe8ad5d735509a1.tar.bz2
samba-f5a94f978b9221bbf79e3d0d3fe8ad5d735509a1.zip
r22612: Fix more cases where we have uninitialised values in the
composite_context, because we don't use the creation function. Andrew Bartlett (This used to be commit e37064e356c17d0c87bb7fa7adf0c0d04d8daba2)
Diffstat (limited to 'source4/winbind/wb_async_helpers.c')
-rw-r--r--source4/winbind/wb_async_helpers.c26
1 files changed, 6 insertions, 20 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;