Bugtraq mailing list archives

shells refusing to run set[ug]id


From: mouse () collatz mcrcim mcgill edu (der Mouse)
Date: Mon, 28 Mar 1994 08:31:55 -0500


# this program will be executed when mail is sent to the fake alias.
# since solaris sh and csh and tcsh refuse to run when euid != realuid,
# we instead run the program we compiled above.
Does anyone know quite what the logic behind these shell checks are?

I can't speak for their authors, but I always thought they were
designed to keep people from using set[ug]id shell scripts (which as I
hope everyone here knows, are usually a big security hole).  Of course,
it's fairly easy to use a wrapper (like setid0) to make setuid shell
scripts work even with such a shell, but someone prepared to do that is
probably sensible enough to make sure that the script is "safe" - and
even if not, there's no way to make it utterly impossible to use a
setuid script.

                                        der Mouse

                            mouse () collatz mcrcim mcgill edu



Current thread: