struct wb_gettoken_state {
struct tevent_context *ev;
struct dom_sid usersid;
+ bool expand_local_aliases;
int num_sids;
struct dom_sid *sids;
};
struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- const struct dom_sid *sid)
+ const struct dom_sid *sid,
+ bool expand_local_aliases)
{
struct tevent_req *req, *subreq;
struct wb_gettoken_state *state;
}
sid_copy(&state->usersid, sid);
state->ev = ev;
+ state->expand_local_aliases = expand_local_aliases;
subreq = wb_queryuser_send(state, ev, &state->usersid);
if (tevent_req_nomem(subreq, req)) {
num_groups * sizeof(struct dom_sid));
state->num_sids += num_groups;
+ if (!state->expand_local_aliases) {
+ tevent_req_done(req);
+ return;
+ }
+
/*
* Expand our domain's aliases
*/
return;
}
- subreq = wb_gettoken_send(state, state->ev, &state->sid);
+ subreq = wb_gettoken_send(state, state->ev, &state->sid, true);
if (tevent_req_nomem(subreq, req)) {
return;
}
return tevent_req_post(req, ev);
}
- subreq = wb_gettoken_send(state, ev, &state->sid);
+ subreq = wb_gettoken_send(state, ev, &state->sid, true);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
struct winbindd_response *response);
struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- const struct dom_sid *sid);
+ const struct dom_sid *sid,
+ bool expand_local_aliases);
NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
int *num_sids, struct dom_sid **sids);
struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx,