Re: [PATCH] more SAK stuff

Albert D. Cahalan (acahalan@cs.uml.edu)
Thu, 5 Jul 2001 21:45:04 -0400 (EDT)


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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/