svn commit: r195843 - in head: lib/libkvm sys/kern sys/sys

Brooks Davis brooks at FreeBSD.org
Thu Dec 10 21:21:25 UTC 2009


On Tue, Dec 01, 2009 at 02:32:35AM +0200, Dmitry Pryanishnikov wrote:
> 
> 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...

Yikes, you're right.  Sorry I took so long to fix this.  I'll MFC in
about a week.

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20091210/8b8f867a/attachment.pgp


More information about the svn-src-all mailing list