summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getpwent.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/getpwent.c')
-rw-r--r--lib/libc/gen/getpwent.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c
index 9f95344..90dbb4a 100644
--- a/lib/libc/gen/getpwent.c
+++ b/lib/libc/gen/getpwent.c
@@ -231,6 +231,8 @@ setpassent(stayopen)
_pw_keynum = 0;
#ifdef YP
_pw_stepping_yp = 0;
+ if (stayopen)
+ setgroupent(1);
#endif
_pw_stayopen = stayopen;
return(1);
@@ -429,7 +431,6 @@ grpagain:
gr->gr_mem++;
return(rv);
} else {
- endgrent();
latch = 0;
_pw_stepping_yp = 0;
gr = NULL;
@@ -496,14 +497,11 @@ ingr(grp, name)
return(0);
while(*gr->gr_mem) {
- if (!strcmp(*gr->gr_mem, name)) {
- endgrent();
+ if (!strcmp(*gr->gr_mem, name))
return(1);
- }
gr->gr_mem++;
}
- endgrent();
return(0);
}
OpenPOWER on IntegriCloud