pwconv and grpconv: don't skip entries

closes #60

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
makefile
Serge Hallyn 5 years ago
parent 44c63795a7
commit eea9b68bd9
  1. 4
      src/grpconv.c
  2. 4
      src/pwconv.c

@ -184,8 +184,10 @@ int main (int argc, char **argv)
* Remove /etc/gshadow entries for groups not in /etc/group.
*/
(void) sgr_rewind ();
while ((sg = sgr_next ()) != NULL) {
sg = sgr_next ();
while (sg != NULL) {
if (gr_locate (sg->sg_name) != NULL) {
sg = sgr_next ();
continue;
}

@ -223,8 +223,10 @@ int main (int argc, char **argv)
* Remove /etc/shadow entries for users not in /etc/passwd.
*/
(void) spw_rewind ();
while ((sp = spw_next ()) != NULL) {
sp = spw_next ();
while (sp != NULL) {
if (pw_locate (sp->sp_namp) != NULL) {
sp = spw_next ();
continue;
}

Loading…
Cancel
Save