diff options
Diffstat (limited to 'source3/winbindd/wb_xids2sids.c')
-rw-r--r-- | source3/winbindd/wb_xids2sids.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/winbindd/wb_xids2sids.c b/source3/winbindd/wb_xids2sids.c index d769328a15e..dcbbe8d510d 100644 --- a/source3/winbindd/wb_xids2sids.c +++ b/source3/winbindd/wb_xids2sids.c @@ -429,6 +429,7 @@ struct wb_xids2sids_state { struct unixid *xids; size_t num_xids; struct dom_sid *sids; + bool *cached; size_t dom_idx; }; @@ -463,6 +464,11 @@ struct tevent_req *wb_xids2sids_send(TALLOC_CTX *mem_ctx, return tevent_req_post(req, ev); } + state->cached = talloc_zero_array(state, bool, num_xids); + if (tevent_req_nomem(state->cached, req)) { + return tevent_req_post(req, ev); + } + if (winbindd_use_idmap_cache()) { uint32_t i; @@ -485,6 +491,7 @@ struct tevent_req *wb_xids2sids_send(TALLOC_CTX *mem_ctx, if (ok && !expired) { sid_copy(&state->sids[i], &sid); + state->cached[i] = true; } } } |