mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
idmap: Prime gencache after xids2sids calls
This fixes a performance regression for "hide unreadable". With an empty gencache, we only do xid2sid calls when reading a large number of acls. We lost caching the xid2sid calls while implmenting the multiple-id calls, probably because at that time the bug with ID_TYPE_BOTH backends was still pending. This patch restores the xid2sid caching hopefully correctly. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12484 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
This commit is contained in:
parent
9079dc4f45
commit
f7f49a2354
@ -262,7 +262,20 @@ static void wb_xids2sids_dom_done(struct tevent_req *subreq)
|
||||
continue;
|
||||
}
|
||||
|
||||
sid_copy(&state->all_sids[i], &state->dom_sids[dom_sid_idx++]);
|
||||
sid_copy(&state->all_sids[i], &state->dom_sids[dom_sid_idx]);
|
||||
|
||||
/*
|
||||
* Prime the cache after an xid2sid call. It's
|
||||
* important that we use state->dom_xids for the xid
|
||||
* value, not state->all_xids: state->all_xids carries
|
||||
* what we asked for, e.g. a
|
||||
* ID_TYPE_UID. state->dom_xids holds something the
|
||||
* idmap child possibly changed to ID_TYPE_BOTH.
|
||||
*/
|
||||
idmap_cache_set_sid2unixid(
|
||||
&state->all_sids[i], &state->dom_xids[dom_sid_idx]);
|
||||
|
||||
dom_sid_idx += 1;
|
||||
}
|
||||
|
||||
tevent_req_done(req);
|
||||
|
Loading…
Reference in New Issue
Block a user