summaryrefslogtreecommitdiff
path: root/source3/winbindd/wb_next_grent.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/winbindd/wb_next_grent.c')
-rw-r--r--source3/winbindd/wb_next_grent.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/winbindd/wb_next_grent.c b/source3/winbindd/wb_next_grent.c
index 5f81bca718..0e9dbd56d4 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);
@@ -109,6 +114,12 @@ static void wb_next_grent_fetch_done(struct tevent_req *subreq)
if (state->gstate->num_groups == 0) {
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;