On Mon, May 13, 2002 at 02:43:14PM -0700, Philip J. Koenig wrote: > > I'd like to clarify this. In upgrading a 4.3-Stable box yesterday, I > noted that there seems to be conflicting info in the hosts file about > how to format the localhost entry. > > Stranger yet, the syntax for regular entries seems to be reversed > from the localhost syntax. (ie the 'friendly name for localhost comes > first in the template, last for regular hostnames?) > > > This is the template from 4.5/4.6-PR: > > # ::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
From 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 -- 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
msg45194/pgp00000.pgp
Description: PGP signature