source3/winbindd/wb_next_grent.c | 5 +++++ source3/winbindd/wb_next_pwent.c | 5 +++++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/source3/winbindd/wb_next_grent.c b/source3/winbindd/wb_next_grent.c index 5f81bca..97e4f6b 100644 --- a/source3/winbindd/wb_next_grent.c +++ b/source3/winbindd/wb_next_grent.c @@ -59,6 +59,11 @@ struct tevent_req *wb_next_grent_send(TALLOC_CTX *mem_ctx, state->gstate->domain = state->gstate->domain->next; } + if ((state->gstate->domain != NULL) + && sid_check_is_domain(&state->gstate->domain->sid)) { + state->gstate->domain = state->gstate->domain->next; + } + if (state->gstate->domain == NULL) { tevent_req_nterror(req, NT_STATUS_NO_MORE_ENTRIES); return tevent_req_post(req, ev); diff --git a/source3/winbindd/wb_next_pwent.c b/source3/winbindd/wb_next_pwent.c index 25ab7b3..d2f810c 100644 --- a/source3/winbindd/wb_next_pwent.c +++ b/source3/winbindd/wb_next_pwent.c @@ -55,6 +55,11 @@ struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx, state->gstate->domain = state->gstate->domain->next; } + if ((state->gstate->domain != NULL) + && sid_check_is_domain(&state->gstate->domain->sid)) { + state->gstate->domain = state->gstate->domain->next; + } + if (state->gstate->domain == NULL) { tevent_req_nterror(req, NT_STATUS_NO_MORE_ENTRIES); return tevent_req_post(req, ev);