diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-03-10 10:04:20 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-03-12 15:25:48 +0100 |
commit | e9cae3b5bc9a59a45973c1671e2d7372d1c32b12 (patch) | |
tree | fef090e28429c1e7994b17f102abeeda4c56c9a5 | |
parent | 399cbb647995d3caee4aba21a7333102a28324ba (diff) | |
download | samba-e9cae3b5bc9a59a45973c1671e2d7372d1c32b12.tar.gz samba-e9cae3b5bc9a59a45973c1671e2d7372d1c32b12.tar.bz2 samba-e9cae3b5bc9a59a45973c1671e2d7372d1c32b12.zip |
s4:winbind/wb_sam_logon.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
-rw-r--r-- | source4/winbind/wb_sam_logon.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/source4/winbind/wb_sam_logon.c b/source4/winbind/wb_sam_logon.c index ec449b8f5b..d12a7f1b1f 100644 --- a/source4/winbind/wb_sam_logon.c +++ b/source4/winbind/wb_sam_logon.c @@ -42,7 +42,7 @@ struct wb_sam_logon_state { }; static void wb_sam_logon_recv_domain(struct composite_context *ctx); -static void wb_sam_logon_recv_samlogon(struct rpc_request *req); +static void wb_sam_logon_recv_samlogon(struct tevent_req *subreq); /* Find the connection to the DC (or find an existing connection) @@ -77,8 +77,8 @@ static void wb_sam_logon_recv_domain(struct composite_context *creq) { struct wb_sam_logon_state *s = talloc_get_type(creq->async.private_data, struct wb_sam_logon_state); - struct rpc_request *req; struct wbsrv_domain *domain; + struct tevent_req *subreq; s->ctx->status = wb_sid2domain_recv(creq, &domain); if (!composite_is_ok(s->ctx)) return; @@ -112,8 +112,12 @@ static void wb_sam_logon_recv_domain(struct composite_context *creq) s->r_mem_ctx = talloc_new(s); if (composite_nomem(s->r_mem_ctx, s->ctx)) return; - req = dcerpc_netr_LogonSamLogon_send(domain->netlogon_pipe, s->r_mem_ctx, &s->r); - composite_continue_rpc(s->ctx, req, wb_sam_logon_recv_samlogon, s); + subreq = dcerpc_netr_LogonSamLogon_r_send(s, + s->ctx->event_ctx, + domain->netlogon_pipe->binding_handle, + &s->r); + if (composite_nomem(subreq, s->ctx)) return; + tevent_req_set_callback(subreq, wb_sam_logon_recv_samlogon, s); } /* @@ -121,12 +125,13 @@ static void wb_sam_logon_recv_domain(struct composite_context *creq) Check the SamLogon reply and decrypt the session keys */ -static void wb_sam_logon_recv_samlogon(struct rpc_request *req) +static void wb_sam_logon_recv_samlogon(struct tevent_req *subreq) { - struct wb_sam_logon_state *s = talloc_get_type(req->async.private_data, + struct wb_sam_logon_state *s = tevent_req_callback_data(subreq, struct wb_sam_logon_state); - s->ctx->status = dcerpc_netr_LogonSamLogon_recv(req); + s->ctx->status = dcerpc_netr_LogonSamLogon_r_recv(subreq, s->r_mem_ctx); + TALLOC_FREE(subreq); if (!composite_is_ok(s->ctx)) return; s->ctx->status = s->r.out.result; |