Bug 97328 - [maintainer-update] net-mgmt/nagios: Update to Nagios 2.3.1
Summary: [maintainer-update] net-mgmt/nagios: Update to Nagios 2.3.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sam Lawrance
Depends on:
Reported: 2006-05-16 02:00 UTC by Jarrod Sayers
Modified: 2006-05-27 03:29 UTC (History)
0 users

See Also:

net-mgmt-nagios-2.3.1.diff (822 bytes, patch)
2006-05-16 02:00 UTC, Jarrod Sayers
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jarrod Sayers 2006-05-16 02:00:38 UTC
Update to Nagios 2.3.1:
- Bug fix for HTTP content_length header integer overflow in CGIs

Fix: Downloadable diff from:
Comment 1 Sam Lawrance freebsd_committer 2006-05-16 11:12:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->lawrance

Comment 2 Sam Lawrance freebsd_committer 2006-05-18 09:15:58 UTC
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
Comment 3 Jarrod Sayers 2006-05-22 10:18:12 UTC
** 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:

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.

Comment 4 Sam Lawrance freebsd_committer 2006-05-27 03:28:55 UTC
State Changed
From-To: feedback->closed

Fix received, and updated committed. 

Thanks for your contribution!