[3361] in linux-net channel archive

home help back first fref pref prev next nref lref last post

utsname.h

daemon@ATHENA.MIT.EDU (Leonardo Valcamonici)
Thu Jun 20 08:06:48 1996

Date: 	Thu, 20 Jun 1996 10:59:01 +0200 (METDST)
From: Leonardo Valcamonici <leo@caprera.caspur.it>
To: linux-net@vger.rutgers.edu

Dear all,
I have this funny question:

on a DEC Unix box you can use getdomainname  library call to get the 
domainname (not NIS) extracted from the FQDN stored in utsname.nodename, 
and this seems to work on Suns and AIX machines as well.
On a Slackware 3.0 linux one getdomainname returns '(none)' because it 
reads utsname.domainname which is not set by domainname which is a link 
to domainname-yp.
Note that uname does not read utsname.domainname at all and returns 
utsname.nodename which is not the FQDN in contrast to the behaviour of 
other Unix flavours.
 This misconfiguration could be fixed in two ways:

1) deleting domainname from the utsname kernel structure and setting 
utsname.nodename to the FQDN similar to what other Unix implementations 
do and fixing getdomainname accordingly to it;

2) separating domainname and domainname-yp functions.

Take care,
Leonardo 


 +============================================================================+
 | Leonardo Valcamonici                                                       |
 | CASPUR                                       e-mail: valcamonici@caspur.it |
 | Italian Consortium for                       voice : +39-6-49913857        |
 | Supercomputing Applications                  fax   : +39-6-4957083         |
 +============================================================================+
 |               What for a caterpillar is the end of the world,              |
 |                         for a man is a butterfly.                          |
 |                                                                            |
 |                                        --- Lao Tze                         |
 +============================================================================+



home help back first fref pref prev next nref lref last post