When I try to start honeyd with the internal webserver active using the /etc/init.d/honeyd script it will start although I had defined HONEYD_HTTP variable to 1 in /etc/conf.d/honeyd. I was testing the sample configuration, so I didn't modify the /etc/honeyd.conf file. Furthermore, it ignored any option included in the HONEYD_OPTS variable of the /etc/conf.d/honeyd file. Reproducible: Always Steps to Reproduce: 1.emerge honeyd 2.edit /etc/conf.d/honeyd so value of variable HONEYD_HTTPD is 1. Modify the port number if you wish (I changed it to 8000 to avoid collisions with Apache). Save and quit. 3.start the honeyd daemon with /etc/init.d/honeyd start Actual Results: The honeyd daemon starts, but its internal webserver does not start, as shown by "netstat -tnlp". Expected Results: An internal webserver should have started along with the daemon, listening in the TCP port you specified in the /etc/conf.d/honeyd file Having a look at the command line the daemon had been started with through / proc/<pid>/cmdline showed that the init.d script had appended the "--disable- webserver" option. After some debugging I found a couple of typos (a "2>1" redirection in line 33 that should be "2>&1" and a missing "D" in the HONEYD_HTTPD_PORT and HONEYD_HTTPD_ROOT variables in lines 36 and 37)that prevented the script from properly reading the webserver variables from the / etc/conf.d/honeyd file. I attach the reviewed file in case you may want to have a look at it.
Created attachment 56474 [details] Modified /etc/init.d/honeyd file that starts the webserver and includes options specified in /etc/conf.d/honeyd Modified lines: 33: redirection should be 2>&1 36: variable name is HONEYD_HTTPD_PORT instead of HONEY_HTTPD_PORT 37: variable name is HONEYD_HTTPD_ROOT instead of HONEY_HTTPD_ROOT 43: new line
Fixed. Thanks for the bug.