Date: Mon, 13 May 2002 15:06:45 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: "Philip J. Koenig" <pjklist@ekahuna.com> Cc: stable@FreeBSD.ORG Subject: Re: hosts file question Message-ID: <20020513150645.A10211@Odin.AC.HMC.Edu> In-Reply-To: <20020513214315231.AAA1067@empty1.ekahuna.com@pc02.ekahuna.com>; from pjklist@ekahuna.com on Mon, May 13, 2002 at 02:43:14PM -0700 References: <bulk.53008.20020513122347@hub.freebsd.org> <20020513214315231.AAA1067@empty1.ekahuna.com@pc02.ekahuna.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 13, 2002 at 02:43:14PM -0700, Philip J. Koenig wrote: >=20 > I'd like to clarify this. In upgrading a 4.3-Stable box yesterday, I=20 > noted that there seems to be conflicting info in the hosts file about=20 > how to format the localhost entry. >=20 > Stranger yet, the syntax for regular entries seems to be reversed=20 > from the localhost syntax. (ie the 'friendly name for localhost comes=20 > first in the template, last for regular hostnames?) >=20 >=20 > This is the template from 4.5/4.6-PR: >=20 > # ::1 localhost localhost.my.domain > # 127.0.0.1 localhost localhost.my.domain > # > # Imaginary network. > #10.0.0.2 myname.my.domain myname > #10.0.0.3 myfriend.my.domain myfriend =46rom personal experince I'd say this is the most likely to work. The issue is a large number of applications only look at the name field they get hack from gethost*() and ignore the aliases when doing host based auth of various sorts. As a result, the first entry should be your fqdn since that should be your hostname and thus be what gets passed around. The localhost entries are an exception because you don't really refer to localhost.domain very often and instead call it localhost which means you want that first. Failure to scan the hostent's h_aliases array is certaintly a bug, but that doesn't prevent it from being fairly common. :( -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --UugvWAfsgieZRqgk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE84DjyXY6L6fI4GtQRAl3oAKCo6tyFZOQP9jDzHZjLRjEBloPoZQCeOYF+ zcfnIOM/ZrHh/Hpt4/naoL8= =01KL -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020513150645.A10211>