summaryrefslogtreecommitdiff
path: root/source4/winbind
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-24 02:01:16 +0200
committerGünther Deschner <gd@samba.org>2008-10-27 19:33:23 +0100
commit992c03a1926cfbf6fb814583e4e2c1db810dd966 (patch)
tree737848ac0bdc4e93219b0b352a4f1b26e6684e1d /source4/winbind
parent8e622f57e705e92095d0f1079618366fd82f80f8 (diff)
downloadsamba-992c03a1926cfbf6fb814583e4e2c1db810dd966.tar.gz
samba-992c03a1926cfbf6fb814583e4e2c1db810dd966.tar.bz2
samba-992c03a1926cfbf6fb814583e4e2c1db810dd966.zip
s4-lsa: merge lsa_LookupSids/{2,3} from s3 lsa idl.
Guenther
Diffstat (limited to 'source4/winbind')
-rw-r--r--source4/winbind/wb_async_helpers.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/winbind/wb_async_helpers.c b/source4/winbind/wb_async_helpers.c
index 25d52a16b5..b9c37ca588 100644
--- a/source4/winbind/wb_async_helpers.c
+++ b/source4/winbind/wb_async_helpers.c
@@ -41,6 +41,7 @@ struct lsa_lookupsids_state {
struct lsa_LookupSids r;
struct lsa_SidArray sids;
struct lsa_TransNameArray names;
+ struct lsa_RefDomainList *domains;
uint32_t count;
struct wb_sid_object **result;
};
@@ -76,6 +77,9 @@ struct composite_context *wb_lsa_lookupsids_send(TALLOC_CTX *mem_ctx,
if (state->sids.sids[i].sid == NULL) goto failed;
}
+ state->domains = talloc(state, struct lsa_RefDomainList);
+ if (state->domains == NULL) goto failed;
+
state->count = 0;
state->num_sids = num_sids;
state->names.count = 0;
@@ -88,6 +92,7 @@ struct composite_context *wb_lsa_lookupsids_send(TALLOC_CTX *mem_ctx,
state->r.in.count = &state->count;
state->r.out.names = &state->names;
state->r.out.count = &state->count;
+ state->r.out.domains = &state->domains;
req = dcerpc_lsa_LookupSids_send(lsa_pipe, state, &state->r);
if (req == NULL) goto failed;
@@ -125,6 +130,8 @@ static void lsa_lookupsids_recv_names(struct rpc_request *req)
struct lsa_TranslatedName *name =
&state->r.out.names->names[i];
struct lsa_DomainInfo *dom;
+ struct lsa_RefDomainList *domains =
+ state->domains;
state->result[i] = talloc_zero(state->result,
struct wb_sid_object);
@@ -135,13 +142,13 @@ static void lsa_lookupsids_recv_names(struct rpc_request *req)
continue;
}
- if (name->sid_index >= state->r.out.domains->count) {
+ if (name->sid_index >= domains->count) {
composite_error(state->ctx,
NT_STATUS_INVALID_PARAMETER);
return;
}
- dom = &state->r.out.domains->domains[name->sid_index];
+ dom = &domains->domains[name->sid_index];
state->result[i]->domain = talloc_reference(state->result[i],
dom->name.string);
if ((name->sid_type == SID_NAME_DOMAIN) ||