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

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



On 2009-12-31 14:10:46 +0100, Mike Hommey wrote:
> On Thu, Dec 31, 2009 at 02:02:36PM +0100, Vincent Lefevre wrote:
> > POSIX says:
> > 
> >   If the AI_CANONNAME flag is specified and the nodename argument is
> >   not null, the function shall attempt to determine the canonical name
> >   corresponding to nodename (for example, if nodename is an alias or
> >   shorthand notation for a complete name).
> >   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > 
> > So, it isn't intended to be a short name. As this is mostly
> > implementation defined, it may be difficult to be very accurate.
> 
> Where does the above say it must be a FQDN ? It says that *for example*,
> *if* nodename is blah blah. So, what if the nodename is *not* that ?
> (which it is not on a lot of hosts)

If it is not that, it is the complete name. But since it is
implementation-defined, which Debian's document defines the
canonical name?

Do you suggest that getnameinfo() be used to get the FQDN?

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


Reply to: