From 45b41875968042a41fcebf575762c3b493a146b4 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Sun, 25 Mar 2018 09:18:22 -0500 Subject: [PATCH] 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 --- src/grpconv.c | 1 + src/pwconv.c | 1 + 2 files changed, 2 insertions(+) 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(); } /*