[lkml]   [1996]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectbinfmt_java problems
[I would have sent this to the author, but I couldn't find his email

Dear friends,

Im my opinion there is a very serious problems with binfmt_java as
implemented in the pre2.0 series kernels. This is particularly
disturbing given the timings, although the problem is technically
fairly trivial.

The problem is that it assumes *way* too much about the user space
environment. All of the following are assumed:

1. A /usr partition exists, is writable and/or the version of java
installed there is appropriate;
2. /bin/bash (not even /bin/sh) exists and is appropriate for running
shell scripts;
3. /usr/bin/java and /usr/bin/appletviewer are shell scripts.
4. It appears to me that it will not properly handle executing it from
anywhere but the current directory, since it strips the path from
the front.

I would suggest one of the following approaches:

1. Easiest: define /sbin/kjavad as a wrapper program which knows about
the appropriate paths (/sbin/kjavad can of course be a symlink off
the root partition if need be, but the key is that the kernel
should not know of paths on the /usr partition which may not exist
and/or be writable.)

Require /sbin/kjavad to be a compiled binary.

2. Somewhat harder: use /(s)bin/{java,appletviewer}, make #! work in
those programs.

3. Hardest/most flexible: set the appropriate paths through /proc/sys;
disable Java binaries unless the paths are set.

I'll try to hack up #3.

PGP public key available - finger
"The earth is but one country, and mankind its citizens." -- Bahá'u'lláh
I don't work for Yggdrasil, but they sponsor the linux.* hierarchy.

 \ /
  Last update: 2005-03-22 13:37    [W:0.037 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site