From 138aea921316c32d18820c782e923b87d826c849 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Mon, 3 Jan 2011 16:42:00 +0100 Subject: Return groups and users from all domains during enumeration --- src/responder/nss/nsssrv_cmd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/responder/nss') diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c index 65d9c580..2decf84b 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; -- cgit