mirror of
https://github.com/samba-team/samba.git
synced 2025-03-10 12:58:35 +03:00
winbind: Now we explicitly track if we got ids from cache
This now properly makes us use negative cache entries Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Bug: https://bugzilla.samba.org/show_bug.cgi?id=13813 (cherry picked from commit 95d33ca79cc315f1a2e41cd60859ef01d6548c77)
This commit is contained in:
parent
bdeacbabd2
commit
527ecdbe9c
@ -243,6 +243,7 @@ static NTSTATUS wb_xids2sids_init_dom_maps_recv(struct tevent_req *req)
|
||||
struct wb_xids2sids_dom_state {
|
||||
struct tevent_context *ev;
|
||||
struct unixid *all_xids;
|
||||
const bool *cached;
|
||||
size_t num_all_xids;
|
||||
struct dom_sid *all_sids;
|
||||
struct wb_xids2sids_dom_map *dom_map;
|
||||
@ -259,7 +260,10 @@ static void wb_xids2sids_dom_gotdc(struct tevent_req *subreq);
|
||||
static struct tevent_req *wb_xids2sids_dom_send(
|
||||
TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
||||
struct wb_xids2sids_dom_map *dom_map,
|
||||
struct unixid *xids, size_t num_xids, struct dom_sid *sids)
|
||||
struct unixid *xids,
|
||||
const bool *cached,
|
||||
size_t num_xids,
|
||||
struct dom_sid *sids)
|
||||
{
|
||||
struct tevent_req *req, *subreq;
|
||||
struct wb_xids2sids_dom_state *state;
|
||||
@ -273,6 +277,7 @@ static struct tevent_req *wb_xids2sids_dom_send(
|
||||
}
|
||||
state->ev = ev;
|
||||
state->all_xids = xids;
|
||||
state->cached = cached;
|
||||
state->num_all_xids = num_xids;
|
||||
state->all_sids = sids;
|
||||
state->dom_map = dom_map;
|
||||
@ -293,7 +298,7 @@ static struct tevent_req *wb_xids2sids_dom_send(
|
||||
/* out of range */
|
||||
continue;
|
||||
}
|
||||
if (!is_null_sid(&state->all_sids[i])) {
|
||||
if (state->cached[i]) {
|
||||
/* already mapped */
|
||||
continue;
|
||||
}
|
||||
@ -360,7 +365,7 @@ static void wb_xids2sids_dom_done(struct tevent_req *subreq)
|
||||
/* out of range */
|
||||
continue;
|
||||
}
|
||||
if (!is_null_sid(&state->all_sids[i])) {
|
||||
if (state->cached[i]) {
|
||||
/* already mapped */
|
||||
continue;
|
||||
}
|
||||
@ -517,7 +522,7 @@ static void wb_xids2sids_init_dom_maps_done(struct tevent_req *subreq)
|
||||
|
||||
subreq = wb_xids2sids_dom_send(
|
||||
state, state->ev, &dom_maps[state->dom_idx],
|
||||
state->xids, state->num_xids, state->sids);
|
||||
state->xids, state->cached, state->num_xids, state->sids);
|
||||
if (tevent_req_nomem(subreq, req)) {
|
||||
return;
|
||||
}
|
||||
@ -548,6 +553,7 @@ static void wb_xids2sids_done(struct tevent_req *subreq)
|
||||
state->ev,
|
||||
&dom_maps[state->dom_idx],
|
||||
state->xids,
|
||||
state->cached,
|
||||
state->num_xids,
|
||||
state->sids);
|
||||
if (tevent_req_nomem(subreq, req)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user