Update to Nagios 2.3.1: - Bug fix for HTTP content_length header integer overflow in CGIs Fix: Downloadable diff from: http://www.netleader.com.au/~jarrod/FreeBSD/net-mgmt-nagios-2.3.1.diff
Responsible Changed From-To: freebsd-ports-bugs->lawrance Take
State Changed From-To: open->feedback Does not build on -current: cc -O2 -fno-strict-aliasing -pipe -I/usr/local/include -fPIC -DHAVE_CONFIG_H -DNSCORE -o nagios nagios.c broker.o nebmods.o checks.o config.o commands.o events.o flapping.o logging.o notifications.o sehandlers.o utils.o retention-base.o xretention-base.o comments-base.o xcomments-base.o objects-base.o xobjects-base.o statusdata-base.o xstatusdata-base.o perfdata-base.o xperfdata-base.o downtime-base.o xdowntime-base.o -Wl,-export-dynamic -lm -lpthread -L/usr/local/lib cc -O2 -fno-strict-aliasing -pipe -I/usr/local/include -fPIC -DHAVE_CONFIG_H -DNSCORE -o nagiostats nagiostats.c -lm -L/usr/local/lib cd ./cgi && make cc -O2 -fno-strict-aliasing -pipe -I/usr/local/include -fPIC -DHAVE_CONFIG_H -DNSCGI -c getcgi.c getcgi.c: In function `getcgivars': getcgi.c:174: error: `INT_MAX' undeclared (first use in this function) getcgi.c:174: error: (Each undeclared identifier is reported only once getcgi.c:174: error: for each function it appears in.) *** Error code 1 Stop in /work/a/ports/net-mgmt/nagios/work/nagios-2.3.1/cgi. *** Error code 1
** Resent, just in case. Also with correction to filename of new file added ** Sam (or anyone), I believe I have located the problem. The declaration of INT_MAX appears in limits.h which is not directly included anywhere in the distribution, though is tested by the configure script. From what I can see, limits.h has worked its way in from the inclusion of pthread.h inside ${WRKSRC}/include/config.h.in on earlier FreeBSD releases (this build of Nagios is the first to use INT_MAX). The pthread.h found on -CURRENT installations does not include this, but includes machine/_limits.h instead which, following those #includes, doesn't end up with a declaration for INT_MAX. I have updated the diff (use URL below) to include a patch to add a manual (and hopefully temporary) #include <limits.h> where needed to replicate previous behavior: http://www.netleader.com.au/~jarrod/FreeBSD/net-mgmt-nagios-2.3.1- pthread.diff Files Modified: - ports/net-mgmt/nagios/Makefile - ports/net-mgmt/nagios/distinfo Files Added: - ports/net-mgmt/nagios/files/patch-cgi-getcgi.c Thanks for spotting that, I have since added a -CURRENT machine into our build pool. Jarrod.
State Changed From-To: feedback->closed Fix received, and updated committed. Thanks for your contribution!