"Mr. Demeanour" <[email protected]> writes:
> Harry Putnam wrote:
>>
>> Further... I'm not sure where cmds like gethostbyname (and similar
>> ones) get the info either... for all I know they may just grep
>> /etc/hosts.
>
> man resolv.conf (i.e. it's configurable).
I'm not sure how that would return the miss-typed name in /etc/hosts
There is not mention of the hosts file in man resolve.conf what so ever.
If I set a miss-typed name in /etc/hosts
It appears in rsyslog logs But /etc/resolv.conf only point to
these nameservers
nameserver 68.87.72.130 <=A comcast nameserver
nameserver 192.168.0.20 <= My local router which uses the
nameserver above
Neither of these nameservers will be able to resolve my localhosts
name. It's not a real domain just a home lan.
So something is searching /etc/hosts and giving the info to rsyslog.
However the command `hostname' will return the correct
hostname... not the miss-typed host in /etc/hosts.
Apparently the command `hostname' uses a different mechanism.
I.E scanning /etc/conf.d/hostname... it seems like rsyslog should do
the same to discover the localhosts name.
I see from Gerhards response:
> I need to re-read this more careful, but for now let me say that
> rsyslog does not touch /etc/hosts at all. It exlusively relies on
> what is returned by the OS. But the "source" property is not locally
> generated, it contains whatever the sender placed into the relevant
> field.
That apparently the `sender' (my localhost) is telling rsyslog to use
the miss-typed host name in /etc/hosts.
He says rsyslog exclusively relies on what is returned by the os. Yes
but by what mechanism?
For example: rsyslog could rely on the output of the `hostname' cmd.
But apparently calls something else.
If it calls resolv.conf... those nameservers will not return
anything useful.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com