reopen 197602 thanks On Tue, May 22, 2007 at 11:09:13AM +0000, Debian Bug Tracking System wrote: > IP addresses are resolved regardless of their nature, domain > names are even stripped off of them before they are written > to the log file. The code below what Matt quoted explains > this. If you don't like the libc function for resolving, please > propose another approach.
I have no reason to dislike the libc function for resolving, but you're using it without much purpose. You are rewriting gethostname() with what gethostbyname() returns. Why is the resolved name of the host better than the one returned originally? Yes, hostent.h_name has a comment saying "official name of host", but that's if you need resolving in the first place. The whole point of using gethostbyname there is to find out if the machine has a FQDN in DNS, and then extract the domain in there, and then if some other networked machine delivers its own syslog to this syslogd, strip that domain name from the output. In my case, and undoubtedly the case of the majority of non-server users out there, no such thing will ever happen. We have something set as our host name and it doesn't mean anything with the resolver. All that extra resolving stuff should be left for people who are using syslogd with the -r switch. -- 2. That which causes joy or happiness. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]