1.2.11 and 1.3.2+ breaks ps

Marek Michalkiewicz (marekm@i17linuxb.ists.pwr.wroc.pl)
Tue, 11 Jul 1995 19:19:17 +0200 (MET DST)


It is good that 1.2.11 fixes /proc security problems. But many people
don't like another change made in this version as well as in 1.3.2.
In previous versions (up to 1.2.10 and 1.3.1) ps always displayed the
effective uid of the process. Now it displays the real uid.

This trivial change causes ps to show ftpd running as root (since it
has real uid 0). I'm not sure if everyone will like it. I think in
1.2.xx we should keep things working the way they always did, and only
make changes which are necessary to fix bugs.

Just change two lines in linux/fs/proc/inode.c (around line 200 or so)
and all will be well. This is not a real patch, but trivial enough
to apply by hand...

- inode->i_uid = p->uid;
- inode->i_gid = p->gid;
+ inode->i_uid = p->euid;
+ inode->i_gid = p->egid;

Of course, if the change reversed above was necessary for some reason,
I'd like to know about that.

I was running 1.1.x kernels for a few months, and I will upgrade to 1.3.xx
as soon as it stabilizes a bit, and I know 1.3.xx is more fun, especially
on the Alpha :-). But security fixes are important.

Thanks for including /proc and FIOSETOWN/SIGURG fixes in 1.3.7. I am still
hoping that 1.2.11 is not the last 1.2.xx kernel version.

Regards,
Marek