[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: where is /etc/hosts supposed to come from?



Henrique de Moraes Holschuh <hmh@debian.org> writes:
> On Wed, 30 Dec 2009, Henrique de Moraes Holschuh wrote:

>>> In truth, my laptop *does not have an FQDN*.  The concept has no useful

>> It must have, POSIX provided a way for apps to query it, and apps
>> started doing that.  So you need one.  It will be an arbitrary one, but
>> that's fine.

> Better correct myself here.  POSIX provides a way for apps to query the
> canonical host name, but DOES NOT REQUIRE IT TO BE A FQDN.

Ack, sorry, I should have read ahead.

I think it depends on your definition of canonical (that's going to depend
on what protocol you're using to speak to the box and what the box is
doing), but yes, there is a way to retrieve one name for a system, which
is used for things like shell prompts and syslog messages because those
things need a single name.

> In practice, it has to be a FQDN, but that's due to bad usage by
> applications, not a POSIX (or SuSv3) requirement.

I've not run into many that have this problem.

> And anything that depends on it to be unique in the whole world is
> broken.

Indeed.  Which implies, for instance, that if you're using gethostname to
form the LHS of message IDs, you need to be prepared for it to not be
unique.  That was a much-discussed problem in the USEFOR working group
once upon a time.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: