Add a missing else that negated the truncation of ki_ngroups to

NGROUPS.

Submitted by:	Dmitry Pryanishnikov <lynx dot ripe at gmail dot com>
This commit is contained in:
Brooks Davis 2009-12-10 21:16:16 +00:00
parent b2089673e5
commit 68a5cc39d3

View File

@ -149,7 +149,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
if (ucred.cr_ngroups > KI_NGROUPS) { if (ucred.cr_ngroups > KI_NGROUPS) {
kp->ki_ngroups = KI_NGROUPS; kp->ki_ngroups = KI_NGROUPS;
kp->ki_cr_flags |= KI_CRF_GRP_OVERFLOW; kp->ki_cr_flags |= KI_CRF_GRP_OVERFLOW;
} } else
kp->ki_ngroups = ucred.cr_ngroups; kp->ki_ngroups = ucred.cr_ngroups;
kvm_read(kd, (u_long)ucred.cr_groups, kp->ki_groups, kvm_read(kd, (u_long)ucred.cr_groups, kp->ki_groups,
kp->ki_ngroups * sizeof(gid_t)); kp->ki_ngroups * sizeof(gid_t));