wb_sids2xids: inline wb_sids2xids_extract_for_domain_index() into wb_sids2xids_next_s...
authorStefan Metzmacher <metze@samba.org>
Tue, 15 Sep 2020 11:36:43 +0000 (13:36 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 23 Oct 2020 03:25:36 +0000 (03:25 +0000)
commitf6bb0ed21f82f2cf1f238f9f00cd049ecf8673af
tree48e2f194725318e6fe96e1880409c3c17076ef86
parent231c8d04b19a1c17937f988d142ca5c0f889d4e0
wb_sids2xids: inline wb_sids2xids_extract_for_domain_index() into wb_sids2xids_next_sids2unix()

Instead of re-creating the dom_ids element,
we just use a pre-allocated map_ids_in array.

This is a bit tricky as we need to use map_ids_out as a copy of
map_ids_in, because the _ids argument of dcerpc_wbint_Sids2UnixIDs_send()
in [in,out], which means that _ids->ids is changed between
dcerpc_wbint_Sids2UnixIDs_send() and dcerpc_wbint_Sids2UnixIDs_recv()!

If the domain doesn't need any mappings, we'll move to the next domain
early, for now this can't happend but it will in future.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14539

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
source3/winbindd/wb_sids2xids.c