summaryrefslogtreecommitdiff
path: root/source4/winbind/wb_cmd_userdomgroups.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-07-23 02:56:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:01:16 -0500
commitdc25ec5ce736b21cdcccddff12e6c9d9c0706df8 (patch)
tree4d2cad905540139f8575c7cfb3de34a54dc076e5 /source4/winbind/wb_cmd_userdomgroups.c
parentae0115d8dbf05c52c631ea915f036a2129cd033e (diff)
downloadsamba-dc25ec5ce736b21cdcccddff12e6c9d9c0706df8.tar.gz
samba-dc25ec5ce736b21cdcccddff12e6c9d9c0706df8.tar.bz2
samba-dc25ec5ce736b21cdcccddff12e6c9d9c0706df8.zip
r23995: Work to allow mimir's libnet code to be called from winbind.
We now setup a libnet_ctx for each domain. We should then be able to replace/merge some more of the winbind code with libnet calls, referencing domain->libnet_ctx. Andrew Bartlett (This used to be commit bad2dc14d704be59300f619c84694c11620559e0)
Diffstat (limited to 'source4/winbind/wb_cmd_userdomgroups.c')
-rw-r--r--source4/winbind/wb_cmd_userdomgroups.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source4/winbind/wb_cmd_userdomgroups.c b/source4/winbind/wb_cmd_userdomgroups.c
index d6091b745e..649fe489cc 100644
--- a/source4/winbind/wb_cmd_userdomgroups.c
+++ b/source4/winbind/wb_cmd_userdomgroups.c
@@ -59,11 +59,12 @@ struct composite_context *wb_cmd_userdomgroups_send(TALLOC_CTX *mem_ctx,
state->user_rid = sid->sub_auths[sid->num_auths-1];
ctx = wb_sid2domain_send(state, service, sid);
- if (ctx == NULL) goto failed;
- ctx->async.fn = userdomgroups_recv_domain;
- ctx->async.private_data = state;
- return result;
+ composite_continue(state->ctx, ctx, userdomgroups_recv_domain, state);
+
+ if (ctx) {
+ return result;
+ }
failed:
talloc_free(result);
@@ -80,8 +81,8 @@ static void userdomgroups_recv_domain(struct composite_context *ctx)
state->ctx->status = wb_sid2domain_recv(ctx, &domain);
if (!composite_is_ok(state->ctx)) return;
- ctx = wb_samr_userdomgroups_send(state, domain->samr_pipe,
- domain->domain_handle,
+ ctx = wb_samr_userdomgroups_send(state, domain->libnet_ctx->samr.pipe,
+ &domain->libnet_ctx->samr.handle,
state->user_rid);
composite_continue(state->ctx, ctx, userdomgroups_recv_rids, state);