Re: Java in OS?

Larry 'Daffy' Daffner (vizzie@airmail.net)
Thu, 09 May 1996 03:11:36 -0500


Matthias Urlichs writes:

-> /tmp/foo:
-> #!/bin/sh
-> echo "Did it"
->
-> /tmp/bar:
-> #!/tmp/foo
-> # nothing interesting
->
-> % chmod +x /tmp/foo /tmp/bar
-> % /tmp/bar
-> bash: ./bar: Permission denied
-> %
->

...and throw the kernel into a nasty denial of service attack.
Consider:

/tmp/foo:
#!/tmp/bar
# Nothing interesting

/tmp/bar:
#!/tmp/foo
# Just a placeholder

... and the kernel runs /tmp/bar to interpret /tmp/foo which calls
/tmp/bar...

To prevent loops like this you need yet more and more code, to be able
to safely recurse these interpretors, and what yuo gain is basically
zilch. In short, there's probably good reason for that. :)

-Larry