static void wb_sids2xids_lookupsids_done(struct tevent_req *subreq);
static void wb_sids2xids_done(struct tevent_req *subreq);
static void wb_sids2xids_gotdc(struct tevent_req *subreq);
+static void wb_sids2xids_next_sids2unix(struct tevent_req *req);
struct tevent_req *wb_sids2xids_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
req, struct wb_sids2xids_state);
struct lsa_RefDomainList *domains = NULL;
struct lsa_TransNameArray *names = NULL;
- struct dcerpc_binding_handle *child_binding_handle = NULL;
NTSTATUS status;
uint32_t i;
TALLOC_FREE(names);
TALLOC_FREE(domains);
+ wb_sids2xids_next_sids2unix(req);
+}
+
+static void wb_sids2xids_next_sids2unix(struct tevent_req *req)
+{
+ struct wb_sids2xids_state *state = tevent_req_data(
+ req, struct wb_sids2xids_state);
+ struct tevent_req *subreq = NULL;
+ struct dcerpc_binding_handle *child_binding_handle = NULL;
+
state->dom_ids = wb_sids2xids_extract_for_domain_index(
state, &state->ids, state->dom_index);
if (tevent_req_nomem(state->dom_ids, req)) {
struct wb_sids2xids_state *state = tevent_req_data(
req, struct wb_sids2xids_state);
NTSTATUS status, result;
- struct dcerpc_binding_handle *child_binding_handle = NULL;
struct wbint_TransIDArray *src, *dst;
uint32_t i, src_idx;
return;
}
- state->dom_ids = wb_sids2xids_extract_for_domain_index(
- state, &state->ids, state->dom_index);
- if (tevent_req_nomem(state->dom_ids, req)) {
- return;
- }
-
- state->idmap_dom = (struct lsa_RefDomainList) {
- .count = 1,
- .domains = &state->idmap_doms.domains[state->dom_index],
- .max_size = 1
- };
-
- child_binding_handle = idmap_child_handle();
- subreq = dcerpc_wbint_Sids2UnixIDs_send(
- state, state->ev, child_binding_handle, &state->idmap_dom,
- state->dom_ids);
- if (tevent_req_nomem(subreq, req)) {
- return;
- }
- tevent_req_set_callback(subreq, wb_sids2xids_done, req);
+ wb_sids2xids_next_sids2unix(req);
}
static void wb_sids2xids_gotdc(struct tevent_req *subreq)