Hi, attached is an update of Nagios to 3.2.0. Please test and comment.
cheers, Nikolay -- "It's all part of my Can't-Do approach to life." Wally
Index: Makefile =================================================================== RCS file: /a/devel/cvs/ports/net/nagios/nagios/Makefile,v retrieving revision 1.36 diff -p -u -r1.36 Makefile --- Makefile 7 Aug 2009 17:18:34 -0000 1.36 +++ Makefile 10 Sep 2009 08:25:59 -0000 @@ -3,10 +3,10 @@ COMMENT-main= host and service monitor COMMENT-web= cgis and webpages for nagios -V= 3.0.6 +V= 3.2.0 DISTNAME= nagios-${V} -PKGNAME-main= nagios-${V}p1 -PKGNAME-web= nagios-web-${V}p0 +PKGNAME-main= nagios-${V} +PKGNAME-web= nagios-web-${V} CATEGORIES= net HOMEPAGE= http://www.nagios.org/ @@ -23,12 +23,10 @@ MULTI_PACKAGES= -main -web MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nagios/} -MODULES= devel/gettext - BUILD_DEPENDS= :gd-*:graphics/gd -LIB_DEPENDS= glib-2.0::devel/glib2 \ - ltdl.>=4::devel/libtool,-ltdl -RUN_DEPENDS= :nagios-plugins-*:net/nagios/plugins +LIB_DEPENDS= ltdl.>=4::devel/libtool,-ltdl +RUN_DEPENDS= :nagios-plugins-*:net/nagios/plugins \ + ::www/php5/core CONFIGURE_STYLE=gnu CONFIGURE_ARGS+=--datadir=/var/www/nagios \ @@ -67,11 +65,8 @@ WANTLIB-web= LIB_DEPENDS-web= RUN_DEPENDS-web=:nagios-${V}-chroot:net/nagios/nagios,chroot .else -WANTLIB-web= ${WANTLIB} fontconfig freetype jpeg z -LIB_DEPENDS-web=${MODGETTEXT_LIB_DEPENDS} \ - glib-2.0::devel/glib2 \ - gd::graphics/gd \ - png::graphics/png +WANTLIB-web= ${WANTLIB} fontconfig freetype jpeg png z +LIB_DEPENDS-web=gd::graphics/gd RUN_DEPENDS-web=:nagios-${V}-!chroot:net/nagios/nagios .endif @@ -81,7 +76,7 @@ NO_REGRESS= Yes CFLAGS+= -D_DIRENT_HAVE_D_TYPE -CONFIG_FILES0= cgi.cfg httpd.conf nagios.cfg resource.cfg +CONFIG_FILES0= cgi.cfg httpd.conf mrtg.cfg nagios.cfg resource.cfg CONFIG_FILES1= commands.cfg contacts.cfg localhost.cfg printer.cfg switch.cfg \ templates.cfg timeperiods.cfg windows.cfg EXDIR= ${PREFIX}/share/examples/nagios Index: distinfo =================================================================== RCS file: /a/devel/cvs/ports/net/nagios/nagios/distinfo,v retrieving revision 1.21 diff -p -u -r1.21 distinfo --- distinfo 24 Dec 2008 20:03:42 -0000 1.21 +++ distinfo 10 Sep 2009 05:10:21 -0000 @@ -1,5 +1,5 @@ -MD5 (nagios-3.0.6.tar.gz) = kA4/QWT0sqGEhUIO6u/oEg== -RMD160 (nagios-3.0.6.tar.gz) = HCsCa03FCV8kGdI5BCt1IA2xuV8= -SHA1 (nagios-3.0.6.tar.gz) = 1r0gzcItK5Mfmtf5yzP/cdLLfXE= -SHA256 (nagios-3.0.6.tar.gz) = vt6ywf+/dSXsGayEpmutYKGdKwVEy/BQpTv8NjwJuyI= -SIZE (nagios-3.0.6.tar.gz) = 2735504 +MD5 (nagios-3.2.0.tar.gz) = NWYWfMYN3qrTTn0uJu1KWA== +RMD160 (nagios-3.2.0.tar.gz) = IXfl68fKXM7nukBHKOiW0QBjsng= +SHA1 (nagios-3.2.0.tar.gz) = Bwqjz6lmUZAEjThvRxzU03dID5k= +SHA256 (nagios-3.2.0.tar.gz) = fL81ugMZ8k+ghZgsA4Q3xFFQA7J4Y8SJfchrGXpQpec= +SIZE (nagios-3.2.0.tar.gz) = 3170967 cvs diff: Diffing patches Index: patches/chroot-cgi_Makefile_in =================================================================== RCS file: /a/devel/cvs/ports/net/nagios/nagios/patches/chroot-cgi_Makefile_in,v retrieving revision 1.2 diff -p -u -r1.2 chroot-cgi_Makefile_in --- patches/chroot-cgi_Makefile_in 18 Mar 2008 20:25:11 -0000 1.2 +++ patches/chroot-cgi_Makefile_in 10 Sep 2009 05:24:37 -0000 @@ -1,12 +1,11 @@ -$OpenBSD: chroot-cgi_Makefile_in,v 1.2 2008/03/18 20:25:11 sturm Exp $ ---- cgi/Makefile.in.orig Mon Jan 24 12:31:08 2005 -+++ cgi/Makefile.in Mon Jan 24 12:31:39 2005 -@@ -36,7 +36,7 @@ cfla...@cflags@ @DEFS@ -DNSCGI +--- cgi/Makefile.in.orig Thu Sep 10 07:17:08 2009 ++++ cgi/Makefile.in Thu Sep 10 07:17:33 2009 +@@ -36,7 +36,7 @@ #CFLAGS_DEBUG=-ggdb3 -g3 #CFLAGS+=$(CFLAGS_WARN) $(CFLAGS_DEBUG) -ldfla...@ldflags@ +LDFLAGS=-static @LDFLAGS@ - li...@libs@ @GLIB_LIBS@ + li...@libs@ CGIS=avail.cgi cmd.cgi config.cgi extinfo.cgi history.cgi notifications.cgi outages.cgi showlog.cgi status.cgi statuswml.cgi summary.cgi tac.cgi $(CGIEXTRAS) Index: patches/patch-base_utils_c =================================================================== RCS file: patches/patch-base_utils_c diff -N patches/patch-base_utils_c --- patches/patch-base_utils_c 10 Jan 2009 16:16:21 -0000 1.6 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,21 +0,0 @@ -$OpenBSD: patch-base_utils_c,v 1.6 2009/01/10 16:16:21 henning Exp $ ---- base/utils.c.orig Sun Nov 30 18:22:58 2008 -+++ base/utils.c Sat Jan 10 17:14:26 2009 -@@ -610,8 +610,16 @@ int my_system(char *cmd,int timeout,int *early_timeout - /* handle errors */ - if(bytes_read==-1){ - /* we encountered a recoverable error, so try again */ -- if(errno==EINTR || errno==EAGAIN) -+ if(errno==EINTR) - continue; -+ else if (errno == EAGAIN) { -+ struct pollfd pfd; -+ -+ pfd.fd = fd[0]; -+ pfd.events = POLLIN; -+ poll(&pfd, 1, -1); -+ continue; -+ } - else - break; - } Index: patches/patch-cgi_statuswml_c =================================================================== RCS file: patches/patch-cgi_statuswml_c diff -N patches/patch-cgi_statuswml_c --- patches/patch-cgi_statuswml_c 7 Aug 2009 17:18:34 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,55 +0,0 @@ -$OpenBSD: patch-cgi_statuswml_c,v 1.2 2009/08/07 17:18:34 sthen Exp $ - -Fix CVE-2009-2288. - ---- cgi/statuswml.c.orig Sun Nov 30 18:13:11 2008 -+++ cgi/statuswml.c Fri Aug 7 15:15:10 2009 -@@ -67,6 +67,8 @@ extern char *ping_syntax; - void document_header(void); - void document_footer(void); - int process_cgivars(void); -+int validate_arguments(void); -+int is_valid_hostip(char *hostip); - - int display_type=DISPLAY_INDEX; - int hostgroup_style=DISPLAY_HOSTGROUP_SUMMARY; -@@ -108,6 +110,13 @@ int main(void){ - - document_header(); - -+ /* validate arguments in URL */ -+ result=validate_arguments(); -+ if(result==ERROR){ -+ document_footer(); -+ return ERROR; -+ } -+ - /* read the CGI configuration file */ - result=read_cgi_config_file(get_cgi_config_location()); - if(result==ERROR){ -@@ -334,7 +343,25 @@ int process_cgivars(void){ - return error; - } - -+int validate_arguments(void){ -+ int result=OK; -+ if((strcmp(ping_address,"")) && !is_valid_hostip(ping_address)) { -+ printf("<p>Invalid host name/ip</p>\n"); -+ result=ERROR; -+ } -+ if(strcmp(traceroute_address,"") && !is_valid_hostip(traceroute_address)){ -+ printf("<p>Invalid host name/ip</p>\n"); -+ result=ERROR; -+ } -+ return result; -+ } - -+int is_valid_hostip(char *hostip) { -+ char *valid_domain_chars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-"; -+ if(strcmp(hostip,"") && strlen(hostip)==strspn(hostip,valid_domain_chars) && hostip[0] != '-' && hostip[strlen(hostip)-1] != '-') -+ return TRUE; -+ return FALSE; -+ } - - /* main intro screen */ - void display_index(void){ Index: patches/patch-configure =================================================================== RCS file: /a/devel/cvs/ports/net/nagios/nagios/patches/patch-configure,v retrieving revision 1.9 diff -p -u -r1.9 patch-configure --- patches/patch-configure 18 Apr 2008 11:08:47 -0000 1.9 +++ patches/patch-configure 10 Sep 2009 05:15:51 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-configure,v 1.9 2008/04/18 11:08:47 sturm Exp $ ---- configure.orig Tue Apr 1 21:32:03 2008 -+++ configure Thu Apr 17 11:11:02 2008 -@@ -571,7 +571,7 @@ do +--- configure.orig Wed Aug 12 20:28:10 2009 ++++ configure Thu Sep 10 07:13:52 2009 +@@ -572,7 +572,7 @@ do ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) @@ -10,7 +10,7 @@ $OpenBSD: patch-configure,v 1.9 2008/04/ -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -@@ -4872,13 +4872,13 @@ if test $ac_cv_lib_cma_pthread_create = yes; then +@@ -4875,13 +4875,13 @@ if test $ac_cv_lib_cma_pthread_create = yes; then have_pthreads="yes" fi @@ -27,7 +27,7 @@ $OpenBSD: patch-configure,v 1.9 2008/04/ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -4937,19 +4937,19 @@ fi +@@ -4940,19 +4940,19 @@ fi echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6 if test $ac_cv_lib_pthread_pthread_create = yes; then @@ -51,7 +51,7 @@ $OpenBSD: patch-configure,v 1.9 2008/04/ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -5008,7 +5008,7 @@ fi +@@ -5011,7 +5011,7 @@ fi echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then @@ -60,7 +60,7 @@ $OpenBSD: patch-configure,v 1.9 2008/04/ fi if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then -@@ -5398,7 +5398,7 @@ cat >>confdefs.h <<_ACEOF +@@ -5401,7 +5401,7 @@ cat >>confdefs.h <<_ACEOF #define DEFAULT_NAGIOS_GROUP "$nagios_grp" _ACEOF @@ -69,7 +69,7 @@ $OpenBSD: patch-configure,v 1.9 2008/04/ -@@ -5772,7 +5772,7 @@ echo $ECHO_N "checking for gdImagePng in -lgd (order 1 +@@ -5775,7 +5775,7 @@ echo $ECHO_N "checking for gdImagePng in -lgd (order 1 echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_LIBS="$LIBS" @@ -78,7 +78,7 @@ $OpenBSD: patch-configure,v 1.9 2008/04/ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -5831,7 +5831,7 @@ fi +@@ -5834,7 +5834,7 @@ fi echo "${ECHO_T}yes" >&6 GDLIBFOUND=yep @@ -87,7 +87,7 @@ $OpenBSD: patch-configure,v 1.9 2008/04/ else echo "$as_me:$LINENO: result: no" >&5 -@@ -6782,9 +6782,9 @@ echo $ECHO_N "checking for linker flags for loadable m +@@ -6841,9 +6841,9 @@ echo $ECHO_N "checking for linker flags for loadable m MOD_LDFLAGS="-shared" MOD_CFLAGS="-fPIC" ;; Index: patches/patch-html_Makefile_in =================================================================== RCS file: /a/devel/cvs/ports/net/nagios/nagios/patches/patch-html_Makefile_in,v retrieving revision 1.5 diff -p -u -r1.5 patch-html_Makefile_in --- patches/patch-html_Makefile_in 9 Nov 2008 10:18:56 -0000 1.5 +++ patches/patch-html_Makefile_in 10 Sep 2009 05:15:50 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-html_Makefile_in,v 1.5 2008/11/09 10:18:56 sturm Exp $ ---- html/Makefile.in.orig Wed Jan 9 18:51:25 2008 -+++ html/Makefile.in Sat Mar 15 19:53:53 2008 -@@ -33,39 +33,39 @@ distclean: clean +--- html/Makefile.in.orig Wed Jul 8 00:34:51 2009 ++++ html/Makefile.in Thu Sep 10 07:15:44 2009 +@@ -33,46 +33,46 @@ distclean: clean devclean: distclean install: @@ -13,21 +13,27 @@ $OpenBSD: patch-html_Makefile_in,v 1.5 2 - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/docs/images - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images/logos +- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/includes - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/ssi - $(INSTALL) -m 664 $(INSTALL_OPTS) robots.txt $(DESTDIR)$(HTMLDIR) - $(INSTALL) -m 664 $(INSTALL_OPTS) docs/robots.txt $(DESTDIR)$(HTMLDIR)/docs + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(HTMLDIR) -+# $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(HTMLDIR)/media ++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(HTMLDIR)/media + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(HTMLDIR)/stylesheets + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(HTMLDIR)/contexthelp + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(HTMLDIR)/docs + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(HTMLDIR)/docs/images + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(HTMLDIR)/images + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(HTMLDIR)/images/logos ++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(HTMLDIR)/includes + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(HTMLDIR)/ssi + $(BSD_INSTALL_DATA) robots.txt $(DESTDIR)$(HTMLDIR) + $(BSD_INSTALL_DATA) docs/robots.txt $(DESTDIR)$(HTMLDIR)/docs - for file in *.html; \ + # Remove old HTML files (PHP files are used now) + rm -f $(DESTDIR)$(HTMLDIR)/index.html + rm -f $(DESTDIR)$(HTMLDIR)/main.html + rm -f $(DESTDIR)$(HTMLDIR)/side.html + for file in *.php; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR); done + do $(BSD_INSTALL_DATA) $$file $(DESTDIR)$(HTMLDIR); done # for file in media/*.wav; \ @@ -60,6 +66,9 @@ $OpenBSD: patch-html_Makefile_in,v 1.5 2 for file in images/logos/*.*; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images/logos; done + do $(BSD_INSTALL_DATA) $$file $(DESTDIR)$(HTMLDIR)/images/logos; done + for file in includes/*.*; \ +- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes; done ++ do $(BSD_INSTALL_DATA) $$file $(DESTDIR)$(HTMLDIR)/includes; done install-unstripped: $(MAKE) install Index: patches/patch-include_config_h_in =================================================================== RCS file: /a/devel/cvs/ports/net/nagios/nagios/patches/patch-include_config_h_in,v retrieving revision 1.5 diff -p -u -r1.5 patch-include_config_h_in --- patches/patch-include_config_h_in 9 Nov 2008 10:18:56 -0000 1.5 +++ patches/patch-include_config_h_in 10 Sep 2009 05:15:50 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-include_config_h_in,v 1.5 2008/11/09 10:18:56 sturm Exp $ ---- include/config.h.in.orig Sun Nov 2 11:51:30 2008 -+++ include/config.h.in Sun Nov 9 02:12:21 2008 +--- include/config.h.in.orig Wed Jul 8 00:19:45 2009 ++++ include/config.h.in Thu Sep 10 07:13:52 2009 @@ -124,11 +124,6 @@ #endif #endif @@ -13,7 +13,7 @@ $OpenBSD: patch-include_config_h_in,v 1. #undef HAVE_LIMITS_H #ifdef HAVE_LIMITS_H #include <limits.h> -@@ -217,6 +212,11 @@ +@@ -207,6 +202,11 @@ #undef HAVE_SYS_TIMEB_H #if HAVE_SYS_TIMEB_H #include <sys/timeb.h> Index: patches/patch-sample-config_cgi_cfg_in =================================================================== RCS file: /a/devel/cvs/ports/net/nagios/nagios/patches/patch-sample-config_cgi_cfg_in,v retrieving revision 1.4 diff -p -u -r1.4 patch-sample-config_cgi_cfg_in --- patches/patch-sample-config_cgi_cfg_in 24 Dec 2008 20:03:42 -0000 1.4 +++ patches/patch-sample-config_cgi_cfg_in 10 Sep 2009 05:15:51 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-sample-config_cgi_cfg_in,v 1.4 2008/12/24 20:03:42 sturm Exp $ ---- sample-config/cgi.cfg.in.orig Sun Nov 30 19:13:11 2008 -+++ sample-config/cgi.cfg.in Wed Dec 24 20:54:08 2008 -@@ -240,7 +240,7 @@ default_statuswrl_layout=4 +--- sample-config/cgi.cfg.in.orig Wed Jun 17 17:13:52 2009 ++++ sample-config/cgi.cfg.in Thu Sep 10 07:13:52 2009 +@@ -264,7 +264,7 @@ default_statuswrl_layout=4 # OS and distribution, so you may have to tweak this to # work on your system. cvs diff: Diffing pkg Index: pkg/PLIST-main =================================================================== RCS file: /a/devel/cvs/ports/net/nagios/nagios/pkg/PLIST-main,v retrieving revision 1.6 diff -p -u -r1.6 PLIST-main --- pkg/PLIST-main 9 Nov 2008 10:18:56 -0000 1.6 +++ pkg/PLIST-main 10 Sep 2009 08:26:47 -0000 @@ -9,6 +9,7 @@ share/examples/nagios/ share/examples/nagios/cgi.cfg @sample ${CHROOT}${SYSCONFDIR}/nagios/cgi.cfg share/examples/nagios/httpd.conf +share/examples/nagios/mrtg.cfg share/examples/nagios/nagios.cfg @sample ${CHROOT}${SYSCONFDIR}/nagios/nagios.cfg share/examples/nagios/objects/ Index: pkg/PLIST-web =================================================================== RCS file: /a/devel/cvs/ports/net/nagios/nagios/pkg/PLIST-web,v retrieving revision 1.4 diff -p -u -r1.4 PLIST-web --- pkg/PLIST-web 9 Nov 2008 10:18:56 -0000 1.4 +++ pkg/PLIST-web 10 Sep 2009 05:21:29 -0000 @@ -16,6 +16,7 @@ cgi-bin/nagios/ @bin cgi-bin/nagios/summary.cgi @bin cgi-bin/nagios/tac.cgi @bin cgi-bin/nagios/trends.cgi +nagios/config.inc.php nagios/contexthelp/ nagios/contexthelp/A1.html nagios/contexthelp/A2.html @@ -177,6 +178,8 @@ nagios/docs/images/mrtg-servicestatechan nagios/docs/images/multiple-templates1.png nagios/docs/images/multiple-templates2.png nagios/docs/images/nagios.jpg +nagios/docs/images/nagiosexchange.png +nagios/docs/images/nagiossupport.png nagios/docs/images/ndoutils.png nagios/docs/images/network-outage1.png nagios/docs/images/network-outage2.png @@ -220,6 +223,7 @@ nagios/docs/index.html nagios/docs/int-snmptrap.html nagios/docs/int-tcpwrappers.html nagios/docs/integration.html +nagios/docs/knownissues.html nagios/docs/largeinstalltweaks.html nagios/docs/macrolist.html nagios/docs/macros.html @@ -306,8 +310,9 @@ nagios/images/redudancy.png nagios/images/redundancy.png nagios/images/restart.gif nagios/images/right.gif -nagios/images/sblogo.jpg +nagios/images/sblogo.png nagios/images/serviceevent.gif +nagios/images/sflogo.png nagios/images/splunk1.gif nagios/images/splunk2.gif nagios/images/start.gif @@ -332,10 +337,13 @@ nagios/images/warning.png nagios/images/weblogo1.png nagios/images/zoom1.gif nagios/images/zoom2.gif -nagios/index.html -nagios/main.html +nagios/includes/ +nagios/includes/utils.inc.php +nagios/index.php +nagios/main.php +nagios/media/ nagios/robots.txt -nagios/side.html +nagios/side.php nagios/ssi/ nagios/stylesheets/ nagios/stylesheets/avail.css