From 92f1c0d1565f0b3d60c7235d6760926739a55426 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 24 Oct 2008 13:43:21 +0200 Subject: s4-lsa: merge lsa_LookupNames/{2,3,4} from s3 lsa idl. Guenther --- source4/winbind/wb_async_helpers.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source4/winbind/wb_async_helpers.c') diff --git a/source4/winbind/wb_async_helpers.c b/source4/winbind/wb_async_helpers.c index b9c37ca588..48a2a4d882 100644 --- a/source4/winbind/wb_async_helpers.c +++ b/source4/winbind/wb_async_helpers.c @@ -190,6 +190,7 @@ struct lsa_lookupnames_state { uint32_t num_names; struct lsa_LookupNames r; struct lsa_TransSidArray sids; + struct lsa_RefDomainList *domains; uint32_t count; struct wb_sid_object **result; }; @@ -229,6 +230,9 @@ struct composite_context *wb_lsa_lookupnames_send(TALLOC_CTX *mem_ctx, lsa_names[i].string = names[i]; } + state->domains = talloc(state, struct lsa_RefDomainList); + if (state->domains == NULL) goto failed; + state->r.in.handle = handle; state->r.in.num_names = num_names; state->r.in.names = lsa_names; @@ -237,6 +241,7 @@ struct composite_context *wb_lsa_lookupnames_send(TALLOC_CTX *mem_ctx, state->r.in.count = &state->count; state->r.out.count = &state->count; state->r.out.sids = &state->sids; + state->r.out.domains = &state->domains; req = dcerpc_lsa_LookupNames_send(lsa_pipe, state, &state->r); if (req == NULL) goto failed; @@ -272,6 +277,7 @@ static void lsa_lookupnames_recv_sids(struct rpc_request *req) for (i=0; inum_names; i++) { struct lsa_TranslatedSid *sid = &state->r.out.sids->sids[i]; + struct lsa_RefDomainList *domains = state->domains; struct lsa_DomainInfo *dom; state->result[i] = talloc_zero(state->result, @@ -283,13 +289,13 @@ static void lsa_lookupnames_recv_sids(struct rpc_request *req) continue; } - if (sid->sid_index >= state->r.out.domains->count) { + if (sid->sid_index >= domains->count) { composite_error(state->ctx, NT_STATUS_INVALID_PARAMETER); return; } - dom = &state->r.out.domains->domains[sid->sid_index]; + dom = &domains->domains[sid->sid_index]; state->result[i]->sid = dom_sid_add_rid(state->result[i], dom->sid, sid->rid); -- cgit