Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   Redirect to wrong hostname, posted by Neil Swartz on Sun Dec 12 17:46:39 2004 
    icon2.gif   Re: Redirect to wrong hostname, posted by Stefan Ritt on Fri Dec 17 23:20:02 2004 
       icon5.gif   Re: Redirect to wrong hostname, posted by Ulrich Trüssel on Sun Dec 19 19:00:06 2004 
          icon2.gif   Re: Redirect to wrong hostname, posted by Stefan Ritt on Mon Dec 20 17:18:16 2004 
Message ID: 845     Entry time: Sun Dec 12 17:46:39 2004     Reply to this: 852
Icon: Question  Author: Neil Swartz  Author Email: junkswartz@optonline.net 
Category: Bug report  OS: Windows  ELOG Version: 2.5.5-2 
Subject: Redirect to wrong hostname 
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.
ELOG V3.1.5-fe60aaf