Torbj�rn Kristoffersen wrote:
> I guess this is C programming related, so that's because I ask here :-P.
>
> Is there a way to restrict output of the program 'ps', so that it'll only
> show the users own processes, not other users?
>
> I believe this has something to do with the kernal. Does anyone know
> of how to do this? Which files to be cluttered with and so on?
Look in the file fs/proc/base.c, for:
struct proc_dir_entry proc_pid = {
PROC_PID_INO, 5, "<pid>",
S_IFDIR | S_IRUGO | S_IXUGO, 2, 0, 0,
0, &proc_base_inode_operations,
NULL, proc_pid_fill_inode,
NULL, &proc_root, NULL
};
Change the permissions to `S_IFDIR | S_IRU | S_IXU' to restrict access
to the owner.
--
Glynn Clements <[EMAIL PROTECTED]>