Peter Lambrechtsen wrote:
It seems around like 734 in pam_radius_auth.c:
if ((hp = gethostbyname(hostname)) == (struct hostent *) NULL) { ipaddr = 0x00000000; /* no client IP address */ } else { ipaddr = ntohl(*(UINT4 *) hp->h_addr); /* use the first one available */ }
That gethostbyname returns an h_addr IP address of "0.0.0.1" on our solaris box when running in 64Bit, but not in 32Bit. The box has IPV6 fully disabled so we are not sure why it's doing that.
Ah... "0.0.0.1" is "::1" in IPv6. OK, the module *should* check the "h_addrtype" field. It's not doing that right now.
Otherwise we many to using gethostbyname_r rather than gethostbyname and get it working that way I'll submit a patch. And use the get_ipaddr function at line 242 only once rather than having two seprate places where gethostbyname is called to return an IP Address
OK, thanks. Alan DeKok.