[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] fqdn validation



Jonathan Larmour <jlarmour@xxxxxxxxxx> writes:

> Well I think one of the other reasons is to ensure better local connection
> persistence when using DHCP and/or dialup connections.

Valid point.

> Although looking at it, it would seem better to put the other entries on
> their own line, i.e.
>
> 127.0.0.1             localhost.localdomain localhost
> 127.0.0.1             foo.bar.org foo

"localhost.localdomain" is still utter crap. Splitting the foo.bar.org
name to a separate line may seem to fix things, but still leaves lots of
network oriented software with invalid domain names, like in Message-ID
or something.

> localhost.localdomain is the FQDN of localhost. And the convention is that
> FQDNs are listed as the canonical names where possible.

"localhost" is nothing but the name for 127.0.0.1. Qualification is
nonsense.

"localdomain" is not valid outside 127.0.0.1, so it's ambiguous by
nature. I fail to see what the "localhost.localdomain" is good for --
"localhost" serves the same purpose and is sufficient. I never needed
localhost.localdomain in some years.

>> > I think the correct answer is simply to delete the strncpy(). Setting fqdn
>> 
>> Is that portable? How about really old libcs, say, SunOS 4.1.3?
>
> Eh? Removing a line non-portable?

I'm wondering if ALL operating systems really copy their host name to
the first alias. I'd tend to think someone messed this up some time ago,
which is why the canonical field is there in the first place (one could
have declared h_aliases[0] canonical otherwise).

> No really, it's not at all clear to me why the validation is done this way
> such that the fqdn is substituted *back* in. The user has given a name and
> that name, if it works, is what appears in the banner and posts etc.
> Certainly the user given name shouldn't be localhost, but the fact the
> address of that name  _happens_ to map to 127.0.0.1 shouldn't be a
> problem.

It is a problem when the name maps to "127.0.0.1" rather than
"some.example.org", but I've never seen this happen in practice.

> Choosing any one of the aliases on the basis of it being the textually
> longest really doesn't seem right though. e.g. our news machine here in the
> office is called "invincible.cambridge.redhat.com" but its alias of
> news.cambridge.redhat.com is what we want to appear in all the banners,
> RFC822 Path, etc.

True.

> It doesn't since the strlen("localhost.localdomain") happens to be longer
> than the machine in question's name. It could have been the other way round
> of course.

OK, if the "canonical" name is localhost.localdomain, we're lost. Does
taking the first alias that contains a dot and that does not start with
"localhost" and dropping the strlen altogether sound more reasonable?

-- 
Matthias Andree

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list