closes #60
Signed-off-by: Serge Hallyn <shallyn@cisco.com>
* 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;
}
* 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;
}