Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 89348 - honeyd refuses to start the internal webserver when running from the /etc/init.d script, even though it was told in /etc/conf.d/honeyd to do so.
Summary: honeyd refuses to start the internal webserver when running from the /etc/ini...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-16 13:45 UTC by Frosty CarFrost
Modified: 2005-06-30 07:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Modified /etc/init.d/honeyd file that starts the webserver and includes options specified in /etc/conf.d/honeyd (honeyd,1.41 KB, text/plain)
2005-04-16 13:48 UTC, Frosty CarFrost
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frosty CarFrost 2005-04-16 13:45:31 UTC
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.
Comment 1 Frosty CarFrost 2005-04-16 13:48:36 UTC
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
Comment 2 Aaron Walker (RETIRED) gentoo-dev 2005-06-30 07:45:57 UTC
Fixed.  Thanks for the bug.