summaryrefslogtreecommitdiff
path: root/source4/winbind
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-24 13:43:21 +0200
committerGünther Deschner <gd@samba.org>2008-10-27 19:33:23 +0100
commit92f1c0d1565f0b3d60c7235d6760926739a55426 (patch)
treee13eb49afdef9cba04e7c9237f514dfdaeb02cef /source4/winbind
parent992c03a1926cfbf6fb814583e4e2c1db810dd966 (diff)
downloadsamba-92f1c0d1565f0b3d60c7235d6760926739a55426.tar.gz
samba-92f1c0d1565f0b3d60c7235d6760926739a55426.tar.bz2
samba-92f1c0d1565f0b3d60c7235d6760926739a55426.zip
s4-lsa: merge lsa_LookupNames/{2,3,4} from s3 lsa idl.
Guenther
Diffstat (limited to 'source4/winbind')
-rw-r--r--source4/winbind/wb_async_helpers.c10
1 files changed, 8 insertions, 2 deletions
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; i<state->num_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);