Hello! I know about sysctl "kern.ps_showallprocs", but it is not very convenient because in this case only root will be able to see all processes, and I want to wheel group to see them all as well. I modified kern_proc.c a bit, could you please comment on it, and say will it work or not, and how should I (if I should) possibly rewrite it?
Thank you a lot! --- /sys/kern/kern_proc.c Tue May 1 20:39:06 2001 +++ kern_proc.c Fri Dec 28 21:00:11 2001 @@ -476,10 +476,14 @@ p = LIST_FIRST(&zombproc); for (; p != 0; p = LIST_NEXT(p, p_list)) { /* - * Show a user only their processes. + * Show a user only their processes + * unless he/she is in wheel group (gid = 0). */ - if ((!ps_showallprocs) && p_trespass(curproc, p)) - continue; + if (((!ps_showallprocs) || + (curproc->p_ucred == NULL || + curproc->p_ucred->cr_gid != (gid_t)0)) + && p_trespass(curproc, p) + continue; /* * Skip embryonic processes. */ ____________________________________________________________ Скоро Новый Год? Сделайте себе подарок - http://ngs.ru/tovar To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message