Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 Dec 2009 02:32:35 +0200
From:      Dmitry Pryanishnikov <lynx.ripe@gmail.com>
To:        Brooks Davis <brooks@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r195843 - in head: lib/libkvm sys/kern sys/sys
Message-ID:  <4B146423.2090703@gmail.com>

next in thread | raw e-mail | index | archive | help

Hello!

> Author: brooks
> Date: Fri Jul 24 15:03:10 2009
> New Revision: 195843
> URL: http://svn.freebsd.org/changeset/base/195843
> 
> Log:
>   Revert the changes to struct kinfo_proc in r194498.  Instead, fill
>   in up to 16 (KI_NGROUPS) values and steal a bit from ki_cr_flags
>   (all bits currently unused) to indicate overflow with the new flag
>   KI_CRF_GRP_OVERFLOW.
>   
>   This fixes procstat -s.
>   
>   Approved by: re (kib)
> 
> Modified:
>   head/lib/libkvm/kvm_proc.c
>   head/sys/kern/kern_proc.c
>   head/sys/sys/user.h
> 
> Modified: head/lib/libkvm/kvm_proc.c
> ==============================================================================
> --- head/lib/libkvm/kvm_proc.c	Fri Jul 24 14:57:02 2009	(r195842)
> +++ head/lib/libkvm/kvm_proc.c	Fri Jul 24 15:03:10 2009	(r195843)
> @@ -145,8 +145,14 @@ kvm_proclist(kd, what, arg, p, bp, maxcn
>  			kp->ki_svuid = ucred.cr_svuid;
>  			kp->ki_rgid = ucred.cr_rgid;
>  			kp->ki_svgid = ucred.cr_svgid;
> -			kp->ki_ngroups = ucred.cr_ngroups;
> -			kp->ki_groups = ucred.cr_groups;
> +			kp->ki_cr_flags = ucred.cr_flags;
> +			if (ucred.cr_ngroups > KI_NGROUPS) {
> +				kp->ki_ngroups = KI_NGROUPS;
> +				kp->ki_cr_flags |= KI_CRF_GRP_OVERFLOW;
> +			}
> +				kp->ki_ngroups = ucred.cr_ngroups;

   It seems that 'else' is missing after closing brace of this 'if'? With the
code as is, 'kp->ki_ngroups = KI_NGROUPS;' is effectively NO-OP...


Sincerely, Dmitry
-- 
nic-hdl: LYNX-RIPE




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B146423.2090703>