Java had an issue named "Signal Chaining" which was solved in 1.4
with a library named libjsig.so . The solution is to LD_PRELOAD
this library.
My colleague Seth and I have been talking to a customer who is running
into this problem and we had them use this solution. eg:
LD_PRELOAD=/export/opt/ctsiapp/5.1.10/java/jre/lib/sparc/libjsig.so
However, they get the error "illegal insecure pathname" when they run
the java application. We next had them use crle to allow the java dir
to be read
crle -l /usr/lib -s /usr/lib/secure
-s /export/opt/ctsiapp/5.1.10/java/jre/lib/sparc
but they get the same error.
I am able to reproduce the problem with a script that starts
an internal java app.
% setenv LD_PRELOAD /usr/j2se/jre/lib/sparc/server/libjsig.so
% sunphone
ld.so.1: uptime: warning: /usr/j2se/jre/lib/sparc/server/libjsig.so: open
failed: illegal insecure pathname
Starting SunPhone...2.3.1.05
squam% ld.so.1: uptime: warning: /usr/j2se/jre/lib/sparc/server/libjsig.so:
open failed: illegal insecure pathname
Yet, a pldd shows that the library *was* opened and loaded.
% unsetenv LD_PRELOAD
% pldd 11877
11877: /usr/dist/share/java,v1.3.1_02/5.x-sun4/bin/../bin/sparc/native_thread
/usr/jdk1.5.0_05/jre/lib/sparc/libjsig.so <----**
/usr/lib/libthread.so.1
/usr/lib/libdl.so.1
/usr/lib/libc.so.1
/usr/platform/sun4u/lib/libc_psr.so.1
/usr/dist/share/java,v1.3.1_02/5.x-sun4/jre/lib/sparc/client/libjvm.so
.
.
.
Not only that, when we had them use LD_DEBUG for files and then bindings,
it showed that it was indeed binding symbols from that library.
40823: 1: calling .init (from sorted order):
/export/opt/ctsiapp/5.1.10/java/jre/lib/sparc/libjsig.so
40823: 1: calling .init (done):
/export/opt/ctsiapp/5.1.10/java/jre/lib/sparc/libjsig.so
40823: 1: binding
file=/export/opt/ctsiapp/5.1.10/java/jre/lib/sparc/server/libjvm.so to
file=/export/opt/ctsiapp/5.1.10/java/jre/lib/sparc/lib
jsig.so: symbol `sigaction'
40823: 1: calling .init (from sorted order):
/export/opt/ctsiapp/5.1.10/java/jre/lib/sparc/libjsig.so
40823: 1: calling .init (done):
/export/opt/ctsiapp/5.1.10/java/jre/lib/sparc/libjsig.so
40823: 1: binding
file=/export/opt/ctsiapp/5.1.10/java/jre/lib/sparc/server/libjvm.so to
file=/export/opt/ctsiapp/5.1.10/java/jre/lib/sparc/lib
jsig.so: symbol `sigaction'
So the question is why is this error coming out when
the preload is actually working?
Thanks - Rich
I should mention that the customer's error is slightly different,
referring to "ps" instead of "uptime" in my case.
ld.so.1: ps: warning:
/export/opt/ctsiapp/5.1.10/java/jre/lib/sparc/libjsig.so: open failed:
illegal insecure pathname
ps:
This is reference to the signal chaining issue
http://java.sun.com/j2se/1.4.2/docs/guide/vm/signal-chaining.html
--
Rich Barker, SunONE Development Support Group
Sun Microsystems Technical Assistance Center, Burlington, MA. USA
781-442-1341
rich.barker at sun.com