summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1999-10-16 12:31:49 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1999-10-16 12:31:49 +0000
commit0200080b60444d5785e02341f2fa94fd36e096cc (patch)
tree6cdbc5a2c4a4091f9db948b3099a65bdd5a31f2b /lib/libc
parentea00c9343b7ccb7862a5d121ca0641eff1a3698e (diff)
Notes
Diffstat (limited to 'lib/libc')
-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 9f9534488539..90dbb4a24cf5 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);
}