Re: Kerneld and java, applets, GIF, PostScript and whatever...

H. Peter Anvin (hpa@freya.yggdrasil.com)
24 May 1996 05:51:54 GMT


Followup to: <Pine.LNX.3.91.960518144625.20597O-100000@linux.cs.Helsin=
ki.FI>
By author: Linus Torvalds <torvalds@cs.helsinki.fi>
In newsgroup: linux.dev.kernel
>=20
> As to "binfmt_java" - it doesn't hurt in its current form. The whinin=
g=20
> about the hard-coded paths does not make sense either - if you don't=20
> have the required permissions to make /usr/bin/java a symlink to=20
> /usr/local/bin or wherever, then you don't have the required permissi=
ons=20
> to insert the java module either.=20
>=20

For as much as I hate to say this...

Linus, I didn't expect this of you. /usr can be a readonly
filesystem, possibly shared with other systems. I posted the original
complaint because of invalid assumptions in the hard-coded paths, not
so much because of the hardcoded paths themselves.

If there have to be hardcoded paths, they should point to the root
filesystem and not into /usr (and certainly not /usr/local!) There
you can safely assume it is possible to symlink whereever. /bin/java
or /sbin/java - fine. /usr/bin/java is not.

The second assumption (which the /proc/sys patches posted haven't
fixed) is that binfmt_java.c assumes the Java interpreters are
/bin/bash shell scripts, a very poor assumption to hard-code into the
kernel. If these have to be shell scripts, then make sure #! works as
usual rather than hard-coding the stuff into the kernel.

-hpa

--=20
PGP public key available - finger hpa@zytor.com
"The earth is but one country, and mankind its citizens." -- Bah=E1'u=
'll=E1h
I don't work for Yggdrasil, but they sponsor the linux.* hierarchy.