gethostbyname(3N) doesn't retrieve aliases in Solaris 2.3

gethostbyname(3N) doesn't retrieve aliases in Solaris 2.3

Post by Suresh Srinivas » Sun, 04 Sep 1994 03:53:18



Hi all,

I'm trying to run NCSA's httpd under Solaris 2.3 on a Sparc 2
with the BSD compatability stuff installed.  The program was
compiled with gcc -lsocket -lnsl.

The gethostbyname call does not produce the necessary alias
containing the FQDN.  Here's a perl script that illustrates the
problem:

  #!/usr/local/bin/perl

  print "Name: $name", "\n";
  print "Aliases: $aliases", "\n";
  exit(0);

On a SUNOS machine this produces both the host's "official" name and
a list of aliases (one of which is the FQDN).  Under Solaris, the
h_aliases list in the hostent structure is NULL and the only output
is the host name.

What gives?

--Suresh

 
 
 

gethostbyname(3N) doesn't retrieve aliases in Solaris 2.3

Post by Willard Daws » Mon, 05 Sep 1994 05:46:52



>I'm trying to run NCSA's httpd under Solaris 2.3 on a Sparc 2...
>The gethostbyname call does not produce the necessary alias
>containing the FQDN...
>On a SUNOS machine this produces both the host's "official" name and
>a list of aliases (one of which is the FQDN).  Under Solaris, the
>h_aliases list in the hostent structure is NULL and the only output
>is the host name.

There are several bugid's associated with gethostbyname on SunSolve, but
there seems to be no mention of fixes.  Perhaps Sun doesn't think it's
really a problem?
--
Willard Dawson, BellSouth Advanced Networks, 1000 Holcomb Woods Pkwy Ste 412
Atlanta, GA  30076, Voice: +1 404 594 6737, UUCP: gatech!kd4nc!vdbsan!wdawson



 
 
 

gethostbyname(3N) doesn't retrieve aliases in Solaris 2.3

Post by Casper H.S. D » Mon, 05 Sep 1994 20:38:38



>There are several bugid's associated with gethostbyname on SunSolve, but
>there seems to be no mention of fixes.  Perhaps Sun doesn't think it's
>really a problem?

There will be a number of fixes in Solaris 2.4  (they assure me).
This bug is fixed in 2.4 (or so they assure me, can some try this.
Some people must be running 2.4FCS already: 2.4 patches have started to
appear in the Sun patch database.)

Casper

 
 
 

1. gethostbyname(3N) bug in Solaris 2.3?

I have just found out that gethostbyname(3N) always return the same
name that you pass to it, not the official name of the host in the
host table. Also, the host aliases list is always empty even if there
are aliases defined in the host table.
Is this a bug in Solaris 2.3, any patch ? Is there a work around to
this problem?

Thanks for any help.
--
                 ******** At any given moment, an arrow must be either where it
                          it is or where it is not.  But obviously it cannot be
                          be where it is not.  And if it is where it is, that
                 \\\|///  is equivalent to saying that it is at rest.

2. ??? config linux

3. NCSA httpd 1.3/gethostbyname(3N) problems on Solaris 2.3

4. Is there any free project to do distributed computing?

5. gethostbyname() on alias doesn't give other entries with same alias?

6. NTP

7. HELP!: Solaris 2.3/OW 3.3: Mailtool doesn't work!

8. Q: Release 2.2.5, XF86-3.3.1, & Netscape 3.04

9. Solaris 2.3 openwin csh doesn't read /etc/.login

10. gettext doesn't work in Solaris 2.3 ???

11. Solaris 2.3 - standard C library doesn't have bcopy, bzero, etc.

12. Solaris 2.3: XTerm*VT100.Translations doesn't work

13. Solaris 2.3 doesn't like tcsh for ftp sessions