Instead of fixing Xenocara or other programs, the proper way to solve
this issue is to elliminate the possibility to have multiple records
of the same host in /etc/hosts file.

I was stunned to see that after installing fresh OpenBSD and
configuring and setting it up, I had several entries for 127.0.0.1 in
my hosts file without modifying it by hand. It is clearly a flaw in
OpenBSD or even standard Unix libraries.

So the patch for Xenocara is a quickhack instead of a fix for the problem.

If there are several entries of the same host in hosts file, then I
would expect misbehaving programs all over the place but unfortunately
only xauth was complaining


here is a very recent install's hosts file:
 cat /etc/hosts
#       $OpenBSD: hosts,v 1.12 2009/03/10 00:42:13 deraadt Exp $
#
# Host Database
#
# RFC 1918 specifies that these networks are "internal".
# 10.0.0.0      10.255.255.255
# 172.16.0.0    172.31.255.255
# 192.168.0.0   192.168.255.255
#
127.0.0.1       localhost
::1             localhost
192.168.80.167  ner0.witworx.com ner0
<end of file>
I see only one line for each address. It is totally autogenerated.

Why do you have more than one line per address? We haven't seen your
hosts file so we are only guessing.

I cannot find any machines around here (including old stuff that isn't
updated because it's only for being a PXE boot-server on the LAN etc.)
that has it otherwise.



Hello.

I had the same problem. I've tested it to see when it happens.

On a 4.5 install duplicate entries of 127.0.0.1 in hosts file do appear if you configure your net address through dhcp. Done it and seen it in a few installs today.

If dhcp is a chosen option then you'll get the last line:

127.0.0.0 somehost.somewhere.local somehost

with previous entries conforming to your example, creating multiple 127.0.0.1 entries.

It does not happen if you enter a static address during install.

Also does not happen if you use a current snaphot, address being specified in either of the ways. So, I guess its fixed in a new install.

Reply via email to