In message <[EMAIL PROTECTED]>, "John A. Zinky"
writes:
    
    We have not been able to find a configuration of Linux Red Hat 5.0 and
    jdk 1.1.x that works for the following one line test program.
    
John, I tried this code on RH5 myself; same result.

In message <[EMAIL PROTECTED]>, Per Widerlund writes: 

    It works fine for me: RedHat 5.0 and jdk1.1.6-v1 (sbb). Make sure
    you have the latest version of libc installed (can be found at
    www.redhat.com) . . . I believe that is the case. Try with DNS
    configured.

Per,

I do; and this happens for me (v2 built by me). How is your DNS
configured? I'm not running DNS for that interface, BTW.

John A. Zinky continues:
    
    We have traced the problem in to the C routines for native platform
    on Line 298 in .../jdk1.1.5/src/java/net/InetAddress.java

It's in jdksrc/src/genunix/net/socket.c, yes.

    b) We have tried several version of jdk1.1.5 and jdk1.1.6, 
       all of which we had a hard time installing.

What happened to make it difficult?
    
    2) Could this be a configuration error in the linux host?

I'm wondering about that. I did look at /etc/nsswitch.conf; the
obvious tweaks there didn't change anything. Do you forward
hostname lookups to DNS, or are you fiddling with NIS? The
default seems to be to check NIS first. Try adjusting this...
    
    3) Could we hack the C source for impl.getLocalHostName?

Well... I looked at this (briefly) and got lost. Here's what happens,
using "our" to loosely mean the JVM, which is "us" as we're running:

1. We call our own gethostbyname_r(), which calls gethostbyname()
   successfully, doing what you expect.
2. We then call our gethostbyaddr_r(), which calls Linux's gethostbyaddr_r().

At this point I get lost in glibc code, which I've unpacked on my system
and have stuffed into my GDB directory path. I went into it several times,
but didn't come up with an answer. Each time we go in there, we come
back with "localhost" and I didn't see why. I actually think this would
be obvious to someone who understands glibc.
   ^^^^^^^
    4) Could this be a security feature?

No, I don't think so. Solaris would do it the same way then :) Maybe
someone else with access to the code and who's familiar with glibc
could give me a hand?

Thanks,

Steve

Reply via email to