summaryrefslogtreecommitdiff
path: root/source3/winbindd/wb_sids2xids.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2015-12-29 11:59:54 +0100
committerRalph Boehme <slow@samba.org>2016-02-22 20:29:14 +0100
commit9743be68d7ffe255f207fa897ce22b839b6d4d81 (patch)
tree2770ffbf8182b48b5ba5291991f75091a8f71f62 /source3/winbindd/wb_sids2xids.c
parent6018a7756f9610ffd392371a3d5e5a433d7528a5 (diff)
downloadsamba-9743be68d7ffe255f207fa897ce22b839b6d4d81.tar.gz
winbind: Remove a level of indirection
idmap_doms does not need a talloc of its own Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3/winbindd/wb_sids2xids.c')
-rw-r--r--source3/winbindd/wb_sids2xids.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source3/winbindd/wb_sids2xids.c b/source3/winbindd/wb_sids2xids.c
index 940a06bd1c0..a78187e0fe7 100644
--- a/source3/winbindd/wb_sids2xids.c
+++ b/source3/winbindd/wb_sids2xids.c
@@ -47,7 +47,7 @@ struct wb_sids2xids_state {
* new domain, but this approach avoids id mappings for
* invalid SIDs.
*/
- struct lsa_RefDomainList *idmap_doms;
+ struct lsa_RefDomainList idmap_doms;
struct wbint_TransIDArray ids;
};
@@ -174,11 +174,6 @@ static void wb_sids2xids_lookupsids_done(struct tevent_req *subreq)
return;
}
- state->idmap_doms = talloc_zero(state, struct lsa_RefDomainList);
- if (tevent_req_nomem(state->idmap_doms, req)) {
- return;
- }
-
for (i=0; i<state->num_non_cached; i++) {
struct dom_sid dom_sid;
struct lsa_DomainInfo *info;
@@ -193,7 +188,7 @@ static void wb_sids2xids_lookupsids_done(struct tevent_req *subreq)
t->type = lsa_SidType_to_id_type(n->sid_type);
domain_index = init_lsa_ref_domain_list(
- state, state->idmap_doms, info->name.string, &dom_sid);
+ state, &state->idmap_doms, info->name.string, &dom_sid);
if (domain_index == -1) {
tevent_req_oom(req);
return;
@@ -210,7 +205,7 @@ static void wb_sids2xids_lookupsids_done(struct tevent_req *subreq)
child = idmap_child();
subreq = dcerpc_wbint_Sids2UnixIDs_send(
- state, state->ev, child->binding_handle, state->idmap_doms,
+ state, state->ev, child->binding_handle, &state->idmap_doms,
&state->ids);
if (tevent_req_nomem(subreq, req)) {
return;