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 <shallyn@cisco.com>
This commit is contained in:
Serge Hallyn 2018-03-25 09:18:22 -05:00
parent 44c63795a7
commit 45b4187596
2 changed files with 2 additions and 0 deletions

View File

@ -198,6 +198,7 @@ int main (int argc, char **argv)
Prog, sg->sg_name, sgr_dbname ());
fail_exit (3);
}
(void) sgr_rewind ();
}
/*

View File

@ -237,6 +237,7 @@ int main (int argc, char **argv)
Prog, sp->sp_namp, spw_dbname ());
fail_exit (E_FAILURE);
}
(void) spw_rewind();
}
/*