According to the documentation (and how aide / tripwire
has worked in the past), @@ifhost checks whether the
hostname, without the domain name, marches.
The ifhost logic in do_ifxhost() in commandconf.c fails
to strip off any .domain from the buffer used by
gethostname(). Note that in many systems, the hostname
is set to a fully qualified domain name, so this strip
is needed prior to the token compare.
Also, the malloc for the buffer used by gethostame is
not checked for a return of NULL.
This patch fixes this problem