From: Serge Hallyn Date: Sun, 25 Mar 2018 14:18:22 +0000 (-0500) Subject: pwconv and grpconv: rewind after deleting an entry X-Git-Tag: 4.6~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45b41875968042a41fcebf575762c3b493a146b4;p=shadow pwconv and grpconv: rewind after deleting an entry Otherwise our spw_next() will cause us to skip an entry. Ideally we'd be able to do an swp_rewind(1), but I don't see a helper for this. Closes #60 Signed-off-by: Serge Hallyn --- diff --git a/src/grpconv.c b/src/grpconv.c index f681f07f..f95f4960 100644 --- a/src/grpconv.c +++ b/src/grpconv.c @@ -198,6 +198,7 @@ int main (int argc, char **argv) Prog, sg->sg_name, sgr_dbname ()); fail_exit (3); } + (void) sgr_rewind (); } /* diff --git a/src/pwconv.c b/src/pwconv.c index e2d61f87..d6ee31a8 100644 --- a/src/pwconv.c +++ b/src/pwconv.c @@ -237,6 +237,7 @@ int main (int argc, char **argv) Prog, sp->sp_namp, spw_dbname ()); fail_exit (E_FAILURE); } + (void) spw_rewind(); } /*