Subject: Re: ps ax availability for non-root
To: Bill Studenmund <wrstuden@zembu.com>
From: None <wojtek@3miasto.net>
List: tech-kern
Date: 04/17/2001 13:09:19
> > change:
> > 
> > 	/* only root or same user change look at the environment */
> > 	if (type == KERN_PROC_ENV || type == KERN_PROC_NENV) {
> >    		if (up->p_ucred->cr_uid != 0) {
> > 			if (up->p_cred->p_ruid != p->p_cred->p_ruid ||
> > 			    up->p_cred->p_ruid != p->p_cred->p_svuid)
> > 				return (EPERM);
> > 		}
> 
> I realize this is the existing code. But is it me, or is the above logic
yes. 
> the desire to be.... I think the test should be 
> 
> >                       if (up->p_cred->p_ruid != p->p_cred->p_ruid &&
> >                           up->p_cred->p_ruid != p->p_cred->p_svuid)
> 
> :-)
hmm.. yes :)