summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getgrouplist.c
diff options
context:
space:
mode:
authorse <se@FreeBSD.org>1995-02-17 19:45:21 +0000
committerse <se@FreeBSD.org>1995-02-17 19:45:21 +0000
commitc8edfbda7785be8137d8d60135bc798c223327fa (patch)
treeb8b7a480914bddbc9a710f63259e05d15ee14c25 /lib/libc/gen/getgrouplist.c
parent8ea5243ca1093c8b4228fbcf903a6e17ef8afe34 (diff)
downloadFreeBSD-src-c8edfbda7785be8137d8d60135bc798c223327fa.zip
FreeBSD-src-c8edfbda7785be8137d8d60135bc798c223327fa.tar.gz
Bruce pointed out, that a misleading warning would be issued
in an (unlikely) border case (maxgroups==1 and the user is on an /etc/group line for the same group and that group only ...). Now this case is dealt with as before ...
Diffstat (limited to 'lib/libc/gen/getgrouplist.c')
-rw-r--r--lib/libc/gen/getgrouplist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c
index 41eaf5e..10c4df7 100644
--- a/lib/libc/gen/getgrouplist.c
+++ b/lib/libc/gen/getgrouplist.c
@@ -70,7 +70,7 @@ getgrouplist(uname, agroup, groups, grpcnt)
*/
setgrent();
while (grp = getgrent()) {
- for (i = 1; i < ngroups; i++) {
+ for (i = 0; i < ngroups; i++) {
if (grp->gr_gid == groups[i])
goto skip;
}
OpenPOWER on IntegriCloud