Re: [PATCH] more SAK stuff

From: Albert D. Cahalan (
Date: Thu Jul 05 2001 - 20:45:04 EST

Rob Landley writes:

> Off the top of my head, fun things you can't do suid root:
> ps (What the...? Worked in Red Hat 7, but not in suse 7.1.
> Huh? "suid-to apache ps ax" works fine, though...)

The ps command used to require setuid root. People would set the
bit by habit.

> I keep bumping into more of these all the time. Often it's fun
> little warnings "you shouldn't have the suid bit on this
> executable", which is frustrating 'cause I haven't GOT the suid bit
> on that executable, it inherited it from its parent process, which
> DOES explicitly set the $PATH and blank most of the environment
> variables and other fun stuff...)

Oh, cry me a river. You can set the RUID, EUID, SUID, and FUID
in that same parent process or after you fork().

Since you didn't set all the UID values, I have to wonder what
else you forgot to do. Maybe you shouldn't be messing with
setuid programming.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jul 07 2001 - 21:00:17 EST