summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-08-16 23:43:24 +0000
committerpeter <peter@FreeBSD.org>2001-08-16 23:43:24 +0000
commit3e8f4794cbe6575dfb40966ade8dca21ab08d644 (patch)
tree165d48eeb5964077ad3e1963b1d147188b7a0cd0 /sys
parent8ca63ecdeda2ae14460e8c22fe94ac7bc76ddc91 (diff)
downloadFreeBSD-src-3e8f4794cbe6575dfb40966ade8dca21ab08d644.zip
FreeBSD-src-3e8f4794cbe6575dfb40966ade8dca21ab08d644.tar.gz
Fix part of another problem that bde pointed out. This is different
to what bde suggested though.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_proc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index f67d413..f25193a 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -428,9 +428,10 @@ fill_kinfo_proc(p, kp)
kp->ki_uid = p->p_ucred->cr_uid;
kp->ki_ruid = p->p_ucred->cr_ruid;
kp->ki_svuid = p->p_ucred->cr_svuid;
- kp->ki_ngroups = p->p_ucred->cr_ngroups;
+ /* XXX bde doesn't like KI_NGROUPS */
+ kp->ki_ngroups = min(p->p_ucred->cr_ngroups, KI_NGROUPS);
bcopy(p->p_ucred->cr_groups, kp->ki_groups,
- KI_NGROUPS * sizeof(gid_t));
+ kp->ki_ngroups * sizeof(gid_t));
kp->ki_rgid = p->p_ucred->cr_rgid;
kp->ki_svgid = p->p_ucred->cr_svgid;
}
OpenPOWER on IntegriCloud