Package: netbase
Version: 4.41
Severity: normal
When netbase is upgraded it will add IPv6 lines to /etc/hosts, without
going through the usual process of asking the administrator for
confirmation.
This was apparently changed in 4.11, the relevant changelog entry is:
"IPv6 entries will be always added to /etc/hosts from now on".
This is an example of a change made by netbase.postinst:
diff --git a/hosts b/hosts
index 704eb6b..2e6b55b 100644
--- a/hosts
+++ b/hosts
@@ -1,2 +1,8 @@
127.0.0.1 localhost
109.74.193.250 v.nix.is v
+
+::1 localhost ip6-localhost ip6-loopback
+fe00::0 ip6-localnet
+ff00::0 ip6-mcastprefix
+ff02::1 ip6-allnodes
+ff02::2 ip6-allrouters
And the relevant netbase.postinst rule:
update_hosts_file() {
if [ -f /etc/hosts ] && ! grep -qE "^::1[[:space:]]" /etc/hosts; then
cat >>/etc/hosts <<-EOF
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
EOF
fi
}
Instead of silently altering the file it should present a menu like
this during upgrade:
Configuration file `/etc/hosts'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : background this process to examine the situation
The default action is to keep your current version.
*** hosts (Y/I/N/O/D/Z) [default=N] ?
A similar bug (#97201) has been filed against this package before, but
that was a report of the clobbering of /etc/hosts, not a the
documented appending that's going on.
The reason I removed IPv6 support from my system in the first place is
because of bug #570914. Removing the lines from /etc/hosts likely did
nothing to help my system, and I'm not aware of any harm caused by
having them there.
I think this is a bug purely because packages should always ask before
they modify user-edited config files in /etc.
Maybe there should be a /etc/default/hosts that would have a config
option for IPv6="NO/YES". It would default to YES and
update_hosts_file() would only run if it was "YES".
Furthermore, /etc/hosts is not listed in the netbase.list or
netbase.conffiles. This made it hard to find what package was
responsible for it. dpkg -S didn't work, I had to grep
/var/lib/dpkg/info/.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (900, 'testing'), (800, 'unstable'), (700, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-x86_64-linode11 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages netbase depends on:
ii initscripts 2.87dsf-10 scripts for initializing and shutt
ii lsb-base 3.2-23.1 Linux Standard Base 3.2 init scrip
Versions of packages netbase recommends:
ii ifupdown 0.6.10 high level tools to configure netw
netbase suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]