On Mon, Mar 12, 2012 at 8:45 PM, Ted Unangst <t...@tedunangst.com> wrote:
> run fstat -u root.  observe non root files.
>
> I don't know why you would pass -1 here to get all files when there's
> better ways to do that, but just the same, I won't change that.
>
> Index: kern_sysctl.c
> ===================================================================
> RCS file: /home/tedu/cvs/src/sys/kern/kern_sysctl.c,v
> retrieving revision 1.214
> diff -u -p -r1.214 kern_sysctl.c
> --- kern_sysctl.c       20 Feb 2012 22:23:39 -0000      1.214
> +++ kern_sysctl.c       13 Mar 2012 03:43:23 -0000
> @@ -1316,7 +1316,7 @@ sysctl_file2(int *name, u_int namelen, c
>                        if ((pp->p_flag & P_SYSTEM) || (pp->p_flag &
P_WEXIT)
>                            || pp->p_stat == SIDL || pp->p_stat == SZOMB)
>                                continue;
> -                       if (arg > 0 && pp->p_ucred->cr_uid != (uid_t)arg) {
> +                       if (arg >= 0 && pp->p_ucred->cr_uid != (uid_t)arg)
{

Please make the same change to lib/libkvm/kvm_file2.c

ok guenther@

Reply via email to