Re: [RFC][PATCH] scripts with stdin replaced

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Mon, 5 Jul 1999 16:51:47 +0200


Richard Guenther wrote:
> Replacing stdin deals with the race conditions that prevent
> scripts from being suid in the first place. Of course it
> prevents the script from reading stdin, too.

Preventing the script from reading stdin is pretty severe don't you
think? Alternatives:

- Open fd 3, pass /proc/self/fd/3 as the script name.

- Pass /proc/self/script as the script name and add code to proc
to support this -- this provides the interpreter with fds 0,1 & 2
as the only open ones which it may be expecting.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/