diff options
author | Sumit Bose <sbose@redhat.com> | 2011-01-03 16:42:00 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-01-06 15:15:54 -0500 |
commit | 138aea921316c32d18820c782e923b87d826c849 (patch) | |
tree | dbbc011af3f8ae2c3eaf10959b2e5320bcad1159 | |
parent | 0b586311f6a077deba5f43ca85a8536bfd203c66 (diff) | |
download | sssd-138aea921316c32d18820c782e923b87d826c849.tar.gz sssd-138aea921316c32d18820c782e923b87d826c849.tar.xz sssd-138aea921316c32d18820c782e923b87d826c849.zip |
Return groups and users from all domains during enumeration
-rw-r--r-- | src/responder/nss/nsssrv_cmd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c index 65d9c5801..2decf84bc 100644 --- a/src/responder/nss/nsssrv_cmd.c +++ b/src/responder/nss/nsssrv_cmd.c @@ -1386,7 +1386,8 @@ static int nss_cmd_retpwent(struct cli_ctx *cctx, int num) if (n <= 0 && (cctx->pwent_dom_idx+1 < pctx->num)) { cctx->pwent_dom_idx++; pdom = &pctx->doms[cctx->pwent_dom_idx]; - n = pdom->res->count - cctx->pwent_cur; + n = pdom->res->count; + cctx->pwent_cur = 0; } if (!n) break; @@ -2564,10 +2565,11 @@ static int nss_cmd_retgrent(struct cli_ctx *cctx, int num) gdom = &gctx->doms[cctx->grent_dom_idx]; n = gdom->res->count - cctx->grent_cur; - if (n <= 0 && (cctx->grent_cur+1 < gctx->num)) { + if (n <= 0 && (cctx->grent_dom_idx+1 < gctx->num)) { cctx->grent_dom_idx++; gdom = &gctx->doms[cctx->grent_dom_idx]; - n = gdom->res->count - cctx->grent_cur; + n = gdom->res->count; + cctx->grent_cur = 0; } if (!n) break; |