After adding entries to the cache we can mark them
as filled from the cache by setting its domain_index
to UINT32_MAX.
This will allow further changes to fill the results
into state->all_ids in steps.
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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14556
(cherry picked from commit
3f4626ea6d235470195918b77af35ac2cfeb227c)
if (src->ids[si].xid.type != ID_TYPE_NOT_SPECIFIED) {
dst->ids[di].xid = src->ids[si].xid;
}
+ dst->ids[di].domain_index = UINT32_MAX; /* mark as valid */
+ idmap_cache_set_sid2unixid(&state->sids[di], &dst->ids[di].xid);
}
state->map_ids_in.num_ids = 0;
for (i=0; i<state->num_sids; i++) {
xids[i] = state->all_ids.ids[i].xid;
- if (state->all_ids.ids[i].domain_index != UINT32_MAX) {
- idmap_cache_set_sid2unixid(&state->sids[i], &xids[i]);
- }
}
return NT_STATUS_OK;