Ticket #94 (closed defect: wontfix)

Opened 6 years ago

Last modified 6 years ago

don't accept "localhost" as local host name

Reported by: lennart Owned by: lennart
Milestone: Component: avahi-client
Keywords: Cc:

Description

if gethostname() returns "localhost" fall back to uname, i.e. "linux".

#ifdef linux

Possibly use /etc/lsb-release for determining the distribution name instead of the kernel name.

#endif

$ cat /etc/lsb-release
DISTRIB_ID=Debian
DISTRIB_RELEASE=3.1
DISTRIB_CODENAME=sarge
DISTRIB_DESCRIPTION=”Debian GNU/Linux”

Change History

Changed 6 years ago by tedp

On my system the /etc/lsb-release file does not exist. /usr/bin/lsb_release could be used instead:

$ /usr/bin/lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux unstable (sid)
Release:        unstable
Codename:       sid

In this case a host name of "debian-sid" would seem reasonable.

lsb_release spec:  http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/lsbrelease.html

Changed 6 years ago by lathiat

yes actually I have been told in the past the lsb-release file is actually not correct to read and using the 'lsb_release' util is the 'correct' way

Changed 6 years ago by lennart

(In [1379]) re #94: don't accept "localhost" as hostname; read distribution id from /etc/lsb_release.

This is not a complete fix for this issue, since it doesn't work in a chroot, and it doesn't support /usr/bin/lsb_release.

Oh, and did I mention how much the idea of having /usr/bin/lsb_release sucks? On Debian that is a Python script. i.e. on every Avahi startup we'd have to load an entire python interpreter into memory! That takes ages! I am not quite sure if we really should pursue this bug any further because of this problem. First, Debian should replace lsb_release by a saner implementation. In effect, I will now mark this bug as WONTFIX.

Changed 6 years ago by lennart

  • status changed from new to closed
  • resolution set to wontfix
Note: See TracTickets for help on using tickets.