On 2013-09-08 12:16:21 +0200, Michael Meskes wrote: > On Fri, Sep 06, 2013 at 10:56:26PM +0200, Vincent Lefevre wrote: > > > hostname(1) clearly says: > > > > > > --all-fqdns > > > Displays all FQDNs of the machine. This option enumerates > > > all configured network addresses on all configured network interfaces, > > > and > > > translates them to DNS domain names. Addresses that > > > cannot be translated (i.e. because they do not have an appropriate > > > reverse DNS > > > entry) are skipped. Note that different addresses may > > > resolve to the same name, therefore the output may contain duplicate > > > entries. > > > Do not make any assumptions about the order of the output. > > > > > > So it apparently does what it claims to do. What am I missing? > > > > The bug is in the documentation too, which has contradictions. > > For instance, "Displays all FQDNs of the machine." is plainly > > wrong here, since xvii.vinc17.org is a FQDN of the machine, but > > is not listed. > > But the second sentence in the same paragraph explicitely explains > what is meant by "all".
This is not clear. It should explicitly say that the FQDN (as returned by the -f option) may not be part of this list. It should also explicitly say that the returned FQDNs may be local, thus may not be unique across all machines on the Internet: the usual definition of a FQDN[*] implies that it is unique. [*] https://en.wikipedia.org/wiki/Fully_qualified_domain_name Because of the issues mentioned above, the sentence "See the warnings in section THE FQDN above, and avoid using this option; use hostname --all-fqdns instead." for --fqdn must be removed. For instance, to generate the right-end part of a message-id, it is much better to use the --fqdn option rather the --all-fqdns one. > > Moreover "all configured network addresses" is ambiguous: though > > for lo, 127.0.0.1 is the default address, all 127.* addresses > > correspond to the same interface, and they may have their own > > FQDN too (in particular, 127.0.1.1 in Debian). > > It seems getifaddrs() does not return anything but 127.0.0.1. Because this is a particular case: there are 2^24 IP addresses, and no-one would expect all these addresses by using this function. > > I also wonder what it means by "reverse DNS entry". If I use > > "dig -x <IP_address_of_xvii.local>", I don't get any name. > > dig doesn't use /etc/hosts, does it? hostname uses getnameinfo() > which does take /etc/hosts into account, too. But /etc/hosts isn't part of the DNS (see the hosts(5) man page). This why dig, which is a "DNS lookup utility", doesn't use it. So, if you take /etc/hosts entries into account and say "reverse *DNS* entry", you are lying. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <http://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org