SUID permission on Bash script

perryh at pluto.rain.com perryh at pluto.rain.com
Sun Aug 30 05:00:51 UTC 2009


RW <rwmaillists at googlemail.com> wrote:
> On Sat, 29 Aug 2009 00:06:29 -0700
> perryh at pluto.rain.com wrote:
> > Actually, absent some careful cooperation between the
> > kernel and the interpreter to prevent a race condition ...
>
> isn't that the same issue that Matthew Seaman was saying
> was fixed years ago ... and is described in the follow-up:
> http://www.mail-archive.com/freebsd-questions@freebsd.org/msg185145.html
>
> That's entirely in the kernel, it doesn't require interpreter
> support.

Er, I'm pretty sure it _does_ require support in the interpreter.

It would do no good for the kernel to hand the interpreter an open
descriptor if the interpreter did not somehow know to read the
script from that open descriptor instead of opening the script file
by name.  This approach is exactly the "careful cooperation between
the kernel and the interpreter" that I was referring to.


More information about the freebsd-questions mailing list