I have a computer that has a different idea of its name from the DNS
server. When I run ELOG and someone clicks "Search" I get a page not found.
I tried starting with "-n <hostname>", but elog still uses gethostname.
The example is that DNS says my machine is "abc.company.com" and netstat -
a says elog is listening on 8080 abc.personaldomain.com
Here is the code from elogd.c:
/* get host name for mail notification */
gethostname(host_name, sizeof(host_name));
phe = gethostbyname(host_name);
if (phe != NULL)
phe = gethostbyaddr(phe->h_addr, sizeof(int), AF_INET);
/* if domain name is not in host name, hope to get it from phe */
if (strchr(host_name, '.') == NULL && phe != NULL)
strcpy(host_name, phe->h_name);
I think you should be using tcp_hostname instead of gethostname if it is
specified. |