diff options
Diffstat (limited to 'lib/libc/gen/getgrent.c')
-rw-r--r-- | lib/libc/gen/getgrent.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c index 3a4a067b..0d393be 100644 --- a/lib/libc/gen/getgrent.c +++ b/lib/libc/gen/getgrent.c @@ -69,8 +69,10 @@ getgrent() #ifdef YP if (_gr_stepping_yp) { - return (_nextypgroup(&_gr_group) ? &_gr_group : 0); + if (_nextypgroup(&_gr_group)) + return(&_gr_group); } +tryagain: #endif if (!grscan(0, 0, NULL)) @@ -80,7 +82,10 @@ getgrent() _getypgroup(&_gr_group, &_gr_group.gr_name[1], "group.byname"); } else if(_gr_group.gr_name[0] == '+') { - return (_nextypgroup(&_gr_group) ? &_gr_group : 0); + if (!_nextypgroup(&_gr_group)) + goto tryagain; + else + return(&_gr_group); } #endif return(&_gr_group); |