Subject: Re: java from Solaris 2.5 under compat_svr4
To: Chris Jones <chris@cjones.org>
From: David Brownlee <abs@netbsd.org>
List: port-sparc
Date: 10/27/2001 22:40:24
Just a quick thought, but as your non root user can you access
/emul/svr4/usr/local/jdk/bin/../jre/lib/sparc/green_threads/libhpi.so
--
David/absolute -- www.netbsd.org: No hype required --
On Sat, 27 Oct 2001, Chris Jones wrote:
> I'm mystified, and I was hoping somebody could help me out.
>
> This is all on NetBSD 1.5.2/sparc:
>
> I've gotten my compat_svr4 environment set up, and I copied down
> jdk1.2.2 as well. When I run java as root, it works. But when I run
> it as me, it dies. Running the .java_wrapper script with -x shows the
> same processing whether I'm root or chris, and the environments are
> the same (except for the SU_FROM variable). Ktrace shows some
> differences, though. As root, it looks like this:
>
> 1360 java EMUL "svr4"
> 1360 java RET execve JUSTRETURN
> 1360 java CALL getuid
> 1360 java RET getuid 0
> 1360 java CALL open(0x100173a1,0,0x13)
> 1360 java NAMI "/emul/svr4/dev/zero"
> 1360 java NAMI "/dev/zero"
> 1360 java RET open 3
> 1360 java CALL mmap(0,0x1000,0x7,0x80000002,0x3,0)
> 1360 java RET mmap 268607488/0x1002a000
> 1360 java CALL open(0x100298bc,0,0xeffff63c)
> 1360 java NAMI "/emul/svr4/usr/local/jdk/bin/../jre/lib/sparc/green_threads/libhpi.so"
> 1360 java NAMI "/usr/local/jdk/bin/../jre/lib/sparc/green_threads/libhpi.so"
> 1360 java RET open 4
> ...
>
>
> As chris, though, it's just a bit different:
>
> 1327 java EMUL "svr4"
> 1327 java RET execve JUSTRETURN
> 1327 java CALL getuid
> 1327 java RET getuid 1000/0x3e8
> 1327 java CALL getuid
> 1327 java RET getuid 1000/0x3e8
> 1327 java CALL open(0x100173a1,0,0x13)
> 1327 java NAMI "/emul/svr4/dev/zero"
> 1327 java NAMI "/dev/zero"
> 1327 java RET open 3
> 1327 java CALL mmap(0,0x1000,0x7,0x80000002,0x3,0)
> 1327 java RET mmap 268607488/0x1002a000
> 1327 java CALL open(0x100298bc,0,0xeffff644)
> 1327 java NAMI "/emul/svr4/usr/lib/libhpi.so"
> 1327 java NAMI "/usr/lib/libhpi.so"
> 1327 java RET open -1 errno 2 No such file or directory
> ...and then ld.so.1 prints an error kills the process.
>
> This looks like some weirdness where the SunOS ld.so is checking the
> UID, and it's changing its library path based on what it finds. Is
> this true? If so, how can I get it to behave?
>
> TIA.
>
> Chris
>
>