diff options
author | tonnerre <tonnerre@pkgsrc.org> | 2008-06-21 14:35:49 +0000 |
---|---|---|
committer | tonnerre <tonnerre@pkgsrc.org> | 2008-06-21 14:35:49 +0000 |
commit | e3e10627320978c3cf9d9a8673f5c11c73d0495b (patch) | |
tree | 876406459abb95d4136aa929c6f5e246b410f56d | |
parent | dc905e3ab8ffe72c9eb5060e0294b40938dbd603 (diff) | |
download | pkgsrc-e3e10627320978c3cf9d9a8673f5c11c73d0495b.tar.gz |
Upgrade nagios to 2.12. Changes are mostly bugfixes since this is the legacy
branch.
Changes since old version 2.5:
* Fix for unscheduled triggered downtime entries.
* Fix for embedded audio in tac and status CGIs.
* Fixed bug in nagiostats utility when reporting host/service check latency.
* Misc code cleanups for compiler warnings.
* Fixed error when reading empty (zero byte) config files.
* Default is now to check for orphaned service checks.
* Fixed bug with non-standard CGI config file location in status data.
* Fixed bugs and simplified examples in sample config files.
* Fix for leading whitespace before comments in object config files.
* Fix for scheduling immediate service check through WAP interface.
* Fix for segfault during expiration or deletion of scheduled downtime.
* Minor documentation updates.
* Minor patches to availability and status CGIs.
* Updated nagiostats with new MRTG vars for tracking buffer usage.
* p1.pl now sets environment var (NAGIOS_PLUGIN) to indicate patch of
plugin being executed.
* Added error messages for passive service checks that don't correspond to
a defined service.
* Fix for handling signals under NPTL.
* Fix for missing check timeout in event broker calls.
* Possible segfault fix during restarts when daemon was performing host
checks.
* Bug fix for bad date format submission in command CGI.
* Bug fix for using servicegroups in service dependency definitions.
* Bug fix for calculating notification interval with service escalations.
* Program version is now displayed in CGIs.
* Fix for keeping service checks in the event queue when active service
checks are disabled globally.
* Bug fix with attempting to access an uninitalized mutex if external
commands are disabled.
* Fix for incorrect latency calculation for passive service checks.
* Fix for a segfault when processing passive host check results with empty
output/perfdata.
* Minor bug fixes in CGIs.
* Fix for not logging passive host check results.
* Minor fix for notification timeout log messages.
* Fix for SIGTERMs being seen as SIGEXITs, non-logging of SIGTERMs/shutdowns.
* Patch to allow non-ASCII characters in notifications, etc.
* Fix for flap detection information not be retained across restarts.
* Fix for cfg_dir directive not working on Solaris.
* Fix for segfault in event broker module code.
* Fix for a possible memory leak in situations where overflow occurs in
check result buffer.
* Fix for a bug with processing service dependency templates with null
master host(group) names.
* Better error logging when failing to rename/move files.
* Minor bug fixes in CGIs to ensure extra host/servicegroup url strings
are terminated properly.
* Patches for possible XSS vulnerability in CGIs (CVE-2007-5803).
Please note that this now needs PTHREAD_DIAGASSERT=A to run properly under
NetBSD-4.0 without the fixsa patch.
-rw-r--r-- | net/nagios-base/Makefile | 9 | ||||
-rw-r--r-- | net/nagios-base/PLIST | 8 | ||||
-rw-r--r-- | net/nagios-base/distinfo | 26 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-aa | 40 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-ac | 10 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-ag | 36 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-ai | 52 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-aj | 60 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-ak | 20 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-al | 29 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-am | 46 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-an | 13 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-ao | 54 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-ap | 20 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-aq | 44 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-ar | 12 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-as | 28 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-at | 20 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-au | 33 |
19 files changed, 37 insertions, 523 deletions
diff --git a/net/nagios-base/Makefile b/net/nagios-base/Makefile index 6319f6a3449..b4fba8b560e 100644 --- a/net/nagios-base/Makefile +++ b/net/nagios-base/Makefile @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.19 2008/06/20 15:28:11 gdt Exp $ +# $NetBSD: Makefile,v 1.20 2008/06/21 14:35:49 tonnerre Exp $ # -DISTNAME= nagios-2.5 +DISTNAME= nagios-2.12 PKGNAME= ${DISTNAME:S/-/-base-/} -PKGREVISION= 7 CATEGORIES= net sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nagios/} @@ -53,8 +52,8 @@ MESSAGE_SUBST+= NAGIOS_USER=${NAGIOS_USER} MESSAGE_SUBST+= NAGIOSCMD_GROUP=${NAGIOSCMD_GROUP} EGDIR= ${PREFIX}/share/examples/nagios -EGFILES= cgi.cfg checkcommands.cfg minimal.cfg -EGFILES+= misccommands.cfg nagios.cfg resource.cfg +EGFILES= cgi.cfg commands.cfg localhost.cfg +EGFILES+= nagios.cfg resource.cfg .for files in ${EGFILES} CONF_FILES+= ${EGDIR}/${files}-sample ${PKG_SYSCONFDIR}/${files} diff --git a/net/nagios-base/PLIST b/net/nagios-base/PLIST index 94e37f0415c..fdee23eb5ff 100644 --- a/net/nagios-base/PLIST +++ b/net/nagios-base/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.2 2007/11/26 22:14:13 seb Exp $ +@comment $NetBSD: PLIST,v 1.3 2008/06/21 14:35:49 tonnerre Exp $ bin/nagios bin/nagiostats bin/p1.pl @@ -18,11 +18,9 @@ libexec/nagios/cgi-bin/statuswrl.cgi libexec/nagios/cgi-bin/summary.cgi libexec/nagios/cgi-bin/tac.cgi libexec/nagios/cgi-bin/trends.cgi -share/examples/nagios/bigger.cfg-sample share/examples/nagios/cgi.cfg-sample -share/examples/nagios/checkcommands.cfg-sample -share/examples/nagios/minimal.cfg-sample -share/examples/nagios/misccommands.cfg-sample +share/examples/nagios/commands.cfg-sample +share/examples/nagios/localhost.cfg-sample share/examples/nagios/nagios.cfg-sample share/examples/nagios/nagios.conf share/examples/nagios/resource.cfg-sample diff --git a/net/nagios-base/distinfo b/net/nagios-base/distinfo index 0fd5d54a05d..14b0c93328f 100644 --- a/net/nagios-base/distinfo +++ b/net/nagios-base/distinfo @@ -1,26 +1,12 @@ -$NetBSD: distinfo,v 1.7 2008/03/18 21:53:41 tonnerre Exp $ +$NetBSD: distinfo,v 1.8 2008/06/21 14:35:49 tonnerre Exp $ -SHA1 (nagios-2.5.tar.gz) = 00e6bc45c5634649b6a1be2758ec181197d38f76 -RMD160 (nagios-2.5.tar.gz) = a0f1890ed546ce026cf784ae3ca83119275bd529 -Size (nagios-2.5.tar.gz) = 1736167 bytes -SHA1 (patch-aa) = 7d13c606bf9c17850bdc49b07bf31b00a9d10f05 +SHA1 (nagios-2.12.tar.gz) = d3e8e3419f751c66a29775bb5280cec662d26a29 +RMD160 (nagios-2.12.tar.gz) = b44e49166441735473450ba555137c695cc50920 +Size (nagios-2.12.tar.gz) = 1742179 bytes +SHA1 (patch-aa) = c8a270a81ab482a0a138c6b66185ffe44bfe9e50 SHA1 (patch-ab) = 5b33da97bc1339d9c7507cf7ed706ee27ae7c68a -SHA1 (patch-ac) = b72c80203f7c1c88f851a13c9031bc5a4febf512 +SHA1 (patch-ac) = 268393f07960bda7f60b4ac01e87c462c3e3147c SHA1 (patch-ad) = 2d7c6620ed08a64c8df2d26083fa327899305004 SHA1 (patch-ae) = 088bddbbd8d6a9f6b7aff89f238d510959a7220b SHA1 (patch-af) = a1b2c3a51b0ed72ff0f507bacc44a0d0c5924d60 -SHA1 (patch-ag) = 81c7bd5b4bbec8a5135b96d9b2d47a11f7e21953 SHA1 (patch-ah) = 88122296f9d74648c3dadbd7f6e12e7ef1f32081 -SHA1 (patch-ai) = 01af7bb4fd0bf3e341535e072384630f859b1338 -SHA1 (patch-aj) = 4655da482dced332a870feaeddc729c0c7efd841 -SHA1 (patch-ak) = ecdfe1bc8b219324780d0d86ce7c5dcc7c51c241 -SHA1 (patch-al) = 59763ce59854012ca94e5adb4d53ac5c46532309 -SHA1 (patch-am) = f839f730c11907a36df1ed0e01290caa667be655 -SHA1 (patch-an) = d1110a33f26ff3807982385d8e706436214dac3f -SHA1 (patch-ao) = ed9bff0519efeb531a4fa40170ce69dc8082139e -SHA1 (patch-ap) = a82898a22eb0e0938bffd0a2490a8fe306f07e65 -SHA1 (patch-aq) = 7403d4192c59e522e94f221d06a1ecec5aba9118 -SHA1 (patch-ar) = a496fbee60e35a5287bd646573ecdb007033f6cf -SHA1 (patch-as) = cd9c5454f4b6a9f8ccf496398b3413b85a7e0d99 -SHA1 (patch-at) = 9862506f7b8e87525d7c0616703154c006e6dd27 -SHA1 (patch-au) = bde2db89a81d3e41fd90556e6f0d20d3ce1d3bbc diff --git a/net/nagios-base/patches/patch-aa b/net/nagios-base/patches/patch-aa index 9f61be848c9..17f99fd308c 100644 --- a/net/nagios-base/patches/patch-aa +++ b/net/nagios-base/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.4 2007/11/26 22:14:14 seb Exp $ +$NetBSD: patch-aa,v 1.5 2008/06/21 14:35:49 tonnerre Exp $ ---- Makefile.in.orig 2006-05-30 16:31:44.000000000 +0000 +--- Makefile.in.orig 2007-04-23 17:44:25.000000000 +0200 +++ Makefile.in -@@ -22,15 +22,16 @@ LDFLAGS=@LDFLAGS@ @LIBS@ +@@ -22,16 +22,16 @@ LDFLAGS=@LDFLAGS@ @LIBS@ prefix=@prefix@ exec_prefix=@exec_prefix@ LOGDIR=@localstatedir@ @@ -15,13 +15,14 @@ $NetBSD: patch-aa,v 1.4 2007/11/26 22:14:14 seb Exp $ INSTALL=@INSTALL@ INSTALL_OPTS=@INSTALL_OPTS@ COMMAND_OPTS=@COMMAND_OPTS@ +-HTTPD_CONF=@HTTPD_CONF@ INIT_DIR=@init_dir@ -INIT_OPTS=-o root -g root +INIT_OPTS=-o root -g wheel CGICFGDIR=$(CGIDIR) PERLDIR=@PERLDIR@ -@@ -57,61 +58,7 @@ all: +@@ -58,60 +58,7 @@ all: cd $(SRC_BASE) && $(MAKE) cd $(SRC_CGI) && $(MAKE) cd $(SRC_HTM) && $(MAKE) @@ -71,10 +72,9 @@ $NetBSD: patch-aa,v 1.4 2007/11/26 22:14:14 seb Exp $ - @echo " - Relevant snippets from your config files" - @echo " - Relevant error messages from the Nagios log file" - @echo "" -- @echo "For those of you who are interested in contract support or" -- @echo "consulting services for Nagios, please visit:" +- @echo "For more information on obtaining support for Nagios, visit:" - @echo "" -- @echo " http://www.nagios.org/contractsupport" +- @echo " http://www.nagios.org/support/" - @echo "" - @echo "*************************************************************" - @echo "" @@ -99,26 +99,22 @@ $NetBSD: patch-aa,v 1.4 2007/11/26 22:14:14 seb Exp $ @echo "" @echo "*** Main program, CGIs and HTML files installed ***" @echo "" -@@ -213,14 +159,14 @@ install-basic: +@@ -213,12 +159,12 @@ install-basic: install-config: - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR) -- $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/nagios.cfg $(DESTDIR)$(CFGDIR)/nagios.cfg-sample -- $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg-sample -- $(INSTALL) -m 660 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg-sample -- $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/bigger.cfg $(DESTDIR)$(CFGDIR)/bigger.cfg-sample -- $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/minimal.cfg $(DESTDIR)$(CFGDIR)/minimal.cfg-sample -- $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/checkcommands.cfg $(DESTDIR)$(CFGDIR)/checkcommands.cfg-sample -- $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/misccommands.cfg $(DESTDIR)$(CFGDIR)/misccommands.cfg-sample +- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/nagios.cfg $(DESTDIR)$(CFGDIR)/nagios.cfg +- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg +- $(INSTALL) -b -m 660 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg +- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/localhost.cfg $(DESTDIR)$(CFGDIR)/localhost.cfg +- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/commands.cfg $(DESTDIR)$(CFGDIR)/commands.cfg + [ -d $(DESTDIR)$(SAMPDIR) ] || ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(SAMPDIR) -+ $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/nagios.cfg $(DESTDIR)$(SAMPDIR)/nagios.cfg-sample -+ $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(SAMPDIR)/cgi.cfg-sample -+ $(INSTALL) -m 660 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(SAMPDIR)/resource.cfg-sample -+ $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/bigger.cfg $(DESTDIR)$(SAMPDIR)/bigger.cfg-sample -+ $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/minimal.cfg $(DESTDIR)$(SAMPDIR)/minimal.cfg-sample -+ $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/checkcommands.cfg $(DESTDIR)$(SAMPDIR)/checkcommands.cfg-sample -+ $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/misccommands.cfg $(DESTDIR)$(SAMPDIR)/misccommands.cfg-sample ++ $(INSTALL) -m 644 $(INSTALL_OPTS) sample-config/nagios.cfg $(DESTDIR)$(SAMPDIR)/nagios.cfg-sample ++ $(INSTALL) -m 644 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(SAMPDIR)/cgi.cfg-sample ++ $(INSTALL) -m 640 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(SAMPDIR)/resource.cfg-sample ++ $(INSTALL) -m 644 $(INSTALL_OPTS) sample-config/template-object/localhost.cfg $(DESTDIR)$(SAMPDIR)/localhost.cfg-sample ++ $(INSTALL) -m 644 $(INSTALL_OPTS) sample-config/template-object/commands.cfg $(DESTDIR)$(SAMPDIR)/commands.cfg-sample @echo "" @echo "*** Sample config file installed ***" diff --git a/net/nagios-base/patches/patch-ac b/net/nagios-base/patches/patch-ac index 06cae3f6e6b..9c1b61a0a85 100644 --- a/net/nagios-base/patches/patch-ac +++ b/net/nagios-base/patches/patch-ac @@ -1,6 +1,6 @@ -$NetBSD: patch-ac,v 1.3 2007/11/26 22:14:14 seb Exp $ +$NetBSD: patch-ac,v 1.4 2008/06/21 14:35:49 tonnerre Exp $ ---- base/Makefile.in.orig 2006-05-30 16:31:44.000000000 +0000 +--- base/Makefile.in.orig 2006-05-30 18:31:44.000000000 +0200 +++ base/Makefile.in @@ -29,7 +29,7 @@ exec_prefix=@exec_prefix@ LOGDIR=@localstatedir@ @@ -11,13 +11,15 @@ $NetBSD: patch-ac,v 1.3 2007/11/26 22:14:14 seb Exp $ HTMLDIR=@datadir@ INSTALL=@INSTALL@ INSTALL_OPTS=@INSTALL_OPTS@ -@@ -188,8 +188,7 @@ install-unstripped: +@@ -188,9 +188,8 @@ install-unstripped: $(MAKE) install-basic install-basic: - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR) - $(INSTALL) -m 774 $(INSTALL_OPTS) @nagios_name@ $(DESTDIR)$(BINDIR) +- $(INSTALL) -m 774 $(INSTALL_OPTS) @nagiostats_name@ $(DESTDIR)$(BINDIR) + ${BSD_INSTALL_PROGRAM} @nagios_name@ $(DESTDIR)$(BINDIR) - $(INSTALL) -m 774 $(INSTALL_OPTS) @nagiostats_name@ $(DESTDIR)$(BINDIR) ++ $(INSTALL) -m 550 $(INSTALL_OPTS) @nagiostats_name@ $(DESTDIR)$(BINDIR) strip-post-install: + $(STRIP) $(DESTDIR)$(BINDIR)/@nagios_name@ diff --git a/net/nagios-base/patches/patch-ag b/net/nagios-base/patches/patch-ag deleted file mode 100644 index 1baeeceab28..00000000000 --- a/net/nagios-base/patches/patch-ag +++ /dev/null @@ -1,36 +0,0 @@ -$NetBSD: patch-ag,v 1.3 2008/03/18 21:53:41 tonnerre Exp $ - ---- cgi/avail.c.orig 2006-04-06 00:33:32.000000000 +0200 -+++ cgi/avail.c -@@ -1157,6 +1157,7 @@ int process_cgivars(void){ - hostgroup_name=""; - else - strcpy(hostgroup_name,variables[x]); -+ strip_html_brackets(hostgroup_name); - display_type=DISPLAY_HOSTGROUP_AVAIL; - show_all_hostgroups=(strcmp(hostgroup_name,"all"))?FALSE:TRUE; - } -@@ -1174,6 +1175,7 @@ int process_cgivars(void){ - servicegroup_name=""; - else - strcpy(servicegroup_name,variables[x]); -+ strip_html_brackets(servicegroup_name); - display_type=DISPLAY_SERVICEGROUP_AVAIL; - show_all_servicegroups=(strcmp(servicegroup_name,"all"))?FALSE:TRUE; - } -@@ -1191,6 +1193,7 @@ int process_cgivars(void){ - host_name=""; - else - strcpy(host_name,variables[x]); -+ strip_html_brackets(host_name); - display_type=DISPLAY_HOST_AVAIL; - show_all_hosts=(strcmp(host_name,"all"))?FALSE:TRUE; - } -@@ -1208,6 +1211,7 @@ int process_cgivars(void){ - svc_description=""; - else - strcpy(svc_description,variables[x]); -+ strip_html_brackets(svc_description); - display_type=DISPLAY_SERVICE_AVAIL; - show_all_services=(strcmp(svc_description,"all"))?FALSE:TRUE; - } diff --git a/net/nagios-base/patches/patch-ai b/net/nagios-base/patches/patch-ai deleted file mode 100644 index a203e9b85a1..00000000000 --- a/net/nagios-base/patches/patch-ai +++ /dev/null @@ -1,52 +0,0 @@ -$NetBSD: patch-ai,v 1.1 2008/03/18 21:53:41 tonnerre Exp $ - ---- cgi/cmd.c.orig 2006-05-19 16:25:03.000000000 +0200 -+++ cgi/cmd.c -@@ -380,6 +380,7 @@ int process_cgivars(void){ - comment_author=""; - else - strcpy(comment_author,variables[x]); -+ strip_html_brackets(comment_author); - } - - /* we found the comment data */ -@@ -395,6 +396,7 @@ int process_cgivars(void){ - comment_data=""; - else - strcpy(comment_data,variables[x]); -+ strip_html_brackets(comment_data); - } - - /* we found the host name */ -@@ -410,6 +412,7 @@ int process_cgivars(void){ - host_name=""; - else - strcpy(host_name,variables[x]); -+ strip_html_brackets(host_name); - } - - /* we found the hostgroup name */ -@@ -425,6 +428,7 @@ int process_cgivars(void){ - hostgroup_name=""; - else - strcpy(hostgroup_name,variables[x]); -+ strip_html_brackets(hostgroup_name); - } - - /* we found the service name */ -@@ -440,6 +444,7 @@ int process_cgivars(void){ - service_desc=""; - else - strcpy(service_desc,variables[x]); -+ strip_html_brackets(service_desc); - } - - /* we found the servicegroup name */ -@@ -455,6 +460,7 @@ int process_cgivars(void){ - servicegroup_name=""; - else - strcpy(servicegroup_name,variables[x]); -+ strip_html_brackets(servicegroup_name); - } - - /* we got the persistence option for a comment */ diff --git a/net/nagios-base/patches/patch-aj b/net/nagios-base/patches/patch-aj deleted file mode 100644 index aca84ca4e06..00000000000 --- a/net/nagios-base/patches/patch-aj +++ /dev/null @@ -1,60 +0,0 @@ -$NetBSD: patch-aj,v 1.1 2008/03/18 21:53:41 tonnerre Exp $ - ---- cgi/extinfo.c.orig 2006-03-21 22:31:46.000000000 +0100 -+++ cgi/extinfo.c -@@ -598,6 +598,7 @@ int process_cgivars(void){ - host_name=strdup(variables[x]); - if(host_name==NULL) - host_name=""; -+ strip_html_brackets(host_name); - } - - /* we found the hostgroup name */ -@@ -611,6 +612,7 @@ int process_cgivars(void){ - hostgroup_name=strdup(variables[x]); - if(hostgroup_name==NULL) - hostgroup_name=""; -+ strip_html_brackets(hostgroup_name); - } - - /* we found the service name */ -@@ -624,6 +626,7 @@ int process_cgivars(void){ - service_desc=strdup(variables[x]); - if(service_desc==NULL) - service_desc=""; -+ strip_html_brackets(service_desc); - } - - /* we found the servicegroup name */ -@@ -637,6 +640,7 @@ int process_cgivars(void){ - servicegroup_name=strdup(variables[x]); - if(servicegroup_name==NULL) - servicegroup_name=""; -+ strip_html_brackets(servicegroup_name); - } - - /* we found the sort type argument */ -@@ -989,9 +993,9 @@ void show_host_info(void){ - - printf("<TR><TD CLASS='dataVar'>Host Status:</td><td CLASS='dataVal'><DIV CLASS='%s'> %s %s </DIV></td></tr>\n",bg_class,state_string,(temp_hoststatus->problem_has_been_acknowledged==TRUE)?"(Has been acknowledged)":""); - -- printf("<TR><TD CLASS='dataVar'>Status Information:</td><td CLASS='dataVal'>%s</td></tr>\n",(temp_hoststatus->plugin_output==NULL)?"":temp_hoststatus->plugin_output); -+ printf("<TR><TD CLASS='dataVar'>Status Information:</td><td CLASS='dataVal'>%s</td></tr>\n",(temp_hoststatus->plugin_output==NULL)?"":html_encode(temp_hoststatus->plugin_output)); - -- printf("<TR><TD CLASS='dataVar'>Performance Data:</td><td CLASS='dataVal'>%s</td></tr>\n",(temp_hoststatus->perf_data==NULL)?"":temp_hoststatus->perf_data); -+ printf("<TR><TD CLASS='dataVar'>Performance Data:</td><td CLASS='dataVal'>%s</td></tr>\n",(temp_hoststatus->perf_data==NULL)?"":html_encode(temp_hoststatus->perf_data)); - - printf("<TR><TD CLASS='dataVar'>Current Attempt:</TD><TD CLASS='dataVal'>%d/%d</TD></TR>\n",temp_hoststatus->current_attempt,temp_hoststatus->max_attempts); - -@@ -1299,9 +1303,9 @@ void show_service_info(void){ - } - printf("<TR><TD CLASS='dataVar'>Current Status:</TD><TD CLASS='dataVal'><DIV CLASS='%s'> %s %s </DIV></TD></TR>\n",bg_class,state_string,(temp_svcstatus->problem_has_been_acknowledged==TRUE)?"(Has been acknowledged)":""); - -- printf("<TR><TD CLASS='dataVar'>Status Information:</TD><TD CLASS='dataVal'>%s</TD></TR>\n",(temp_svcstatus->plugin_output==NULL)?"":temp_svcstatus->plugin_output); -+ printf("<TR><TD CLASS='dataVar'>Status Information:</TD><TD CLASS='dataVal'>%s</TD></TR>\n",(temp_svcstatus->plugin_output==NULL)?"":html_encode(temp_svcstatus->plugin_output)); - -- printf("<TR><TD CLASS='dataVar'>Performance Data:</td><td CLASS='dataVal'>%s</td></tr>\n",(temp_svcstatus->perf_data==NULL)?"":temp_svcstatus->perf_data); -+ printf("<TR><TD CLASS='dataVar'>Performance Data:</td><td CLASS='dataVal'>%s</td></tr>\n",(temp_svcstatus->perf_data==NULL)?"":html_encode(temp_svcstatus->perf_data)); - - printf("<TR><TD CLASS='dataVar'>Current Attempt:</TD><TD CLASS='dataVal'>%d/%d</TD></TR>\n",temp_svcstatus->current_attempt,temp_svcstatus->max_attempts); - diff --git a/net/nagios-base/patches/patch-ak b/net/nagios-base/patches/patch-ak deleted file mode 100644 index ed52bcedcaa..00000000000 --- a/net/nagios-base/patches/patch-ak +++ /dev/null @@ -1,20 +0,0 @@ -$NetBSD: patch-ak,v 1.1 2008/03/18 21:53:41 tonnerre Exp $ - ---- cgi/histogram.c.orig 2006-03-21 22:31:46.000000000 +0100 -+++ cgi/histogram.c -@@ -1086,6 +1086,7 @@ int process_cgivars(void){ - host_name=""; - else - strcpy(host_name,variables[x]); -+ strip_html_brackets(host_name); - - display_type=DISPLAY_HOST_HISTOGRAM; - } -@@ -1103,6 +1104,7 @@ int process_cgivars(void){ - svc_description=""; - else - strcpy(svc_description,variables[x]); -+ strip_html_brackets(svc_description); - - display_type=DISPLAY_SERVICE_HISTOGRAM; - } diff --git a/net/nagios-base/patches/patch-al b/net/nagios-base/patches/patch-al deleted file mode 100644 index b9d78c20a2b..00000000000 --- a/net/nagios-base/patches/patch-al +++ /dev/null @@ -1,29 +0,0 @@ -$NetBSD: patch-al,v 1.1 2008/03/18 21:53:41 tonnerre Exp $ - ---- cgi/history.c.orig 2006-03-21 22:31:46.000000000 +0100 -+++ cgi/history.c -@@ -379,6 +379,7 @@ int process_cgivars(void){ - host_name=""; - else - strcpy(host_name,variables[x]); -+ strip_html_brackets(host_name); - - display_type=DISPLAY_HOSTS; - -@@ -401,6 +402,7 @@ int process_cgivars(void){ - svc_description=""; - else - strcpy(svc_description,variables[x]); -+ strip_html_brackets(svc_description); - - display_type=DISPLAY_SERVICES; - } -@@ -901,7 +903,7 @@ void get_history(void){ - - if(display_frills==TRUE) - printf("<img align='left' src='%s%s' alt='%s' title='%s'>",url_images_path,image,image_alt,image_alt); -- printf("[%s] %s<br clear='all'>\n",date_time,temp_buffer); -+ printf("[%s] %s<br clear='all'>\n",date_time,html_encode(temp_buffer)); - found_line=TRUE; - } - } diff --git a/net/nagios-base/patches/patch-am b/net/nagios-base/patches/patch-am deleted file mode 100644 index 04c10f0e0d4..00000000000 --- a/net/nagios-base/patches/patch-am +++ /dev/null @@ -1,46 +0,0 @@ -$NetBSD: patch-am,v 1.1 2008/03/18 21:53:41 tonnerre Exp $ - ---- cgi/notifications.c.orig 2006-06-19 22:53:24.000000000 +0200 -+++ cgi/notifications.c -@@ -371,6 +371,7 @@ int process_cgivars(void){ - query_host_name=strdup(variables[x]); - if(query_host_name==NULL) - query_host_name=""; -+ strip_html_brackets(query_host_name); - if(!strcmp(query_host_name,"all")) - find_all=TRUE; - else -@@ -390,6 +391,7 @@ int process_cgivars(void){ - - if(query_contact_name==NULL) - query_contact_name=""; -+ strip_html_brackets(query_contact_name); - if(!strcmp(query_contact_name,"all")) - find_all=TRUE; - else -@@ -408,6 +410,7 @@ int process_cgivars(void){ - query_svc_description=strdup(variables[x]); - if(query_svc_description==NULL) - query_svc_description=""; -+ strip_html_brackets(query_svc_description); - } - - /* we found the notification type argument */ -@@ -553,7 +556,7 @@ void display_notifications(void){ - /* get the host name */ - temp_buffer=(char *)strtok(NULL,";"); - snprintf(host_name,sizeof(host_name),"%s",(temp_buffer==NULL)?"":temp_buffer); -- host_name[sizeof(host_name)]='\x0'; -+ host_name[sizeof(host_name)-1]='\x0'; - - /* get the service name */ - if(notification_type==SERVICE_NOTIFICATION){ -@@ -714,7 +717,7 @@ void display_notifications(void){ - printf("<td CLASS='notifications%s'>%s</td>\n",(odd)?"Even":"Odd",date_time); - printf("<td CLASS='notifications%s'><a href='%s?type=contacts#%s'>%s</a></td>\n",(odd)?"Even":"Odd",CONFIG_CGI,url_encode(contact_name),contact_name); - printf("<td CLASS='notifications%s'><a href='%s?type=commands#%s'>%s</a></td>\n",(odd)?"Even":"Odd",CONFIG_CGI,url_encode(method_name),method_name); -- printf("<td CLASS='notifications%s'>%s</td>\n",(odd)?"Even":"Odd",temp_buffer); -+ printf("<td CLASS='notifications%s'>%s</td>\n",(odd)?"Even":"Odd",html_encode(temp_buffer)); - printf("</tr>\n"); - } - } diff --git a/net/nagios-base/patches/patch-an b/net/nagios-base/patches/patch-an deleted file mode 100644 index 59a14908ffb..00000000000 --- a/net/nagios-base/patches/patch-an +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-an,v 1.1 2008/03/18 21:53:41 tonnerre Exp $ - ---- cgi/showlog.c.orig 2006-03-21 22:31:46.000000000 +0100 -+++ cgi/showlog.c -@@ -513,7 +513,7 @@ int display_log(void){ - - if(display_frills==TRUE) - printf("<img align='left' src='%s%s' alt='%s' title='%s'>",url_images_path,image,image_alt,image_alt); -- printf("[%s] %s<br clear='all'>\n",date_time,(temp_buffer==NULL)?"":temp_buffer); -+ printf("[%s] %s<br clear='all'>\n",date_time,(temp_buffer==NULL)?"":html_encode(temp_buffer)); - } - - printf("</DIV></P>\n"); diff --git a/net/nagios-base/patches/patch-ao b/net/nagios-base/patches/patch-ao deleted file mode 100644 index 6e5ceda17ae..00000000000 --- a/net/nagios-base/patches/patch-ao +++ /dev/null @@ -1,54 +0,0 @@ -$NetBSD: patch-ao,v 1.1 2008/03/18 21:53:41 tonnerre Exp $ - ---- cgi/status.c.orig 2006-04-26 17:33:59.000000000 +0200 -+++ cgi/status.c -@@ -572,6 +572,7 @@ int process_cgivars(void){ - show_all_hostgroups=TRUE; - else - show_all_hostgroups=FALSE; -+ strip_html_brackets(hostgroup_name); - } - - /* we found the servicegroup argument */ -@@ -589,6 +590,7 @@ int process_cgivars(void){ - show_all_servicegroups=TRUE; - else - show_all_servicegroups=FALSE; -+ strip_html_brackets(servicegroup_name); - } - - /* we found the host argument */ -@@ -606,6 +608,7 @@ int process_cgivars(void){ - show_all_hosts=TRUE; - else - show_all_hosts=FALSE; -+ strip_html_brackets(host_name); - } - - /* we found the columns argument */ -@@ -725,6 +728,7 @@ int process_cgivars(void){ - break; - } - service_filter=strdup(variables[x]); -+ strip_html_brackets(service_filter); - } - } - -@@ -1720,7 +1724,7 @@ void show_service_detail(void){ - printf("<TD CLASS='status%s' nowrap>%s</TD>\n",status_bg_class,date_time); - printf("<TD CLASS='status%s' nowrap>%s</TD>\n",status_bg_class,state_duration); - printf("<TD CLASS='status%s'>%d/%d</TD>\n",status_bg_class,temp_status->current_attempt,temp_status->max_attempts); -- printf("<TD CLASS='status%s'>%s </TD>\n",status_bg_class,(temp_status->plugin_output==NULL)?"":temp_status->plugin_output); -+ printf("<TD CLASS='status%s'>%s </TD>\n",status_bg_class,(temp_status->plugin_output==NULL)?"":html_encode(temp_status->plugin_output)); - - printf("</TR>\n"); - -@@ -2102,7 +2106,7 @@ void show_host_detail(void){ - printf("<TD CLASS='status%s'>%s</TD>\n",status_class,status); - printf("<TD CLASS='status%s' nowrap>%s</TD>\n",status_bg_class,date_time); - printf("<TD CLASS='status%s' nowrap>%s</TD>\n",status_bg_class,state_duration); -- printf("<TD CLASS='status%s'>%s </TD>\n",status_bg_class,(temp_status->plugin_output==NULL)?"":temp_status->plugin_output); -+ printf("<TD CLASS='status%s'>%s </TD>\n",status_bg_class,(temp_status->plugin_output==NULL)?"":html_encode(temp_status->plugin_output)); - - printf("</TR>\n"); - } diff --git a/net/nagios-base/patches/patch-ap b/net/nagios-base/patches/patch-ap deleted file mode 100644 index d73fcb3e4ed..00000000000 --- a/net/nagios-base/patches/patch-ap +++ /dev/null @@ -1,20 +0,0 @@ -$NetBSD: patch-ap,v 1.1 2008/03/18 21:53:41 tonnerre Exp $ - ---- cgi/statusmap.c.orig 2006-03-21 22:31:46.000000000 +0100 -+++ cgi/statusmap.c -@@ -412,6 +412,7 @@ int process_cgivars(void){ - host_name="all"; - else - strcpy(host_name,variables[x]); -+ strip_html_brackets(host_name); - - if(!strcmp(host_name,"all")) - show_all_hosts=TRUE; -@@ -570,6 +571,7 @@ int process_cgivars(void){ - break; - } - -+ strip_html_brackets(variables[x]); - add_layer(variables[x]); - } - } diff --git a/net/nagios-base/patches/patch-aq b/net/nagios-base/patches/patch-aq deleted file mode 100644 index 8b5e7dc049f..00000000000 --- a/net/nagios-base/patches/patch-aq +++ /dev/null @@ -1,44 +0,0 @@ -$NetBSD: patch-aq,v 1.1 2008/03/18 21:53:41 tonnerre Exp $ - ---- cgi/statuswml.c.orig 2006-03-22 18:45:26.000000000 +0100 -+++ cgi/statuswml.c -@@ -239,6 +239,7 @@ int process_cgivars(void){ - hostgroup_name=""; - else - strcpy(hostgroup_name,variables[x]); -+ strip_html_brackets(hostgroup_name); - - if(!strcmp(hostgroup_name,"all")) - show_all_hostgroups=TRUE; -@@ -260,6 +261,7 @@ int process_cgivars(void){ - host_name=""; - else - strcpy(host_name,variables[x]); -+ strip_html_brackets(host_name); - } - - /* we found the service argument */ -@@ -276,6 +278,7 @@ int process_cgivars(void){ - service_desc=""; - else - strcpy(service_desc,variables[x]); -+ strip_html_brackets(service_desc); - } - - -@@ -317,6 +320,7 @@ int process_cgivars(void){ - ping_address=""; - else - strcpy(ping_address,variables[x]); -+ strip_html_brackets(ping_address); - } - - /* we found the traceroute argument */ -@@ -333,6 +337,7 @@ int process_cgivars(void){ - traceroute_address=""; - else - strcpy(traceroute_address,variables[x]); -+ strip_html_brackets(traceroute_address); - } - - } diff --git a/net/nagios-base/patches/patch-ar b/net/nagios-base/patches/patch-ar deleted file mode 100644 index 8fb9cca1507..00000000000 --- a/net/nagios-base/patches/patch-ar +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-ar,v 1.1 2008/03/18 21:53:41 tonnerre Exp $ - ---- cgi/statuswrl.c.orig 2006-03-27 17:38:06.000000000 +0200 -+++ cgi/statuswrl.c -@@ -239,6 +239,7 @@ int process_cgivars(void){ - host_name="all"; - else - strcpy(host_name,variables[x]); -+ strip_html_brackets(host_name); - - if(!strcmp(host_name,"all")) - show_all_hosts=TRUE; diff --git a/net/nagios-base/patches/patch-as b/net/nagios-base/patches/patch-as deleted file mode 100644 index 069f8e4f70c..00000000000 --- a/net/nagios-base/patches/patch-as +++ /dev/null @@ -1,28 +0,0 @@ -$NetBSD: patch-as,v 1.1 2008/03/18 21:53:41 tonnerre Exp $ - ---- cgi/summary.c.orig 2006-03-21 22:31:46.000000000 +0100 -+++ cgi/summary.c -@@ -1135,6 +1135,7 @@ int process_cgivars(void){ - target_hostgroup_name=""; - else - strcpy(target_hostgroup_name,variables[x]); -+ strip_html_brackets(target_hostgroup_name); - - if(!strcmp(target_hostgroup_name,"all")) - show_all_hostgroups=TRUE; -@@ -1157,6 +1158,7 @@ int process_cgivars(void){ - target_servicegroup_name=""; - else - strcpy(target_servicegroup_name,variables[x]); -+ strip_html_brackets(target_servicegroup_name); - - if(!strcmp(target_servicegroup_name,"all")) - show_all_servicegroups=TRUE; -@@ -1179,6 +1181,7 @@ int process_cgivars(void){ - target_host_name=""; - else - strcpy(target_host_name,variables[x]); -+ strip_html_brackets(target_host_name); - - if(!strcmp(target_host_name,"all")) - show_all_hosts=TRUE; diff --git a/net/nagios-base/patches/patch-at b/net/nagios-base/patches/patch-at deleted file mode 100644 index 69ccb1ca57b..00000000000 --- a/net/nagios-base/patches/patch-at +++ /dev/null @@ -1,20 +0,0 @@ -$NetBSD: patch-at,v 1.1 2008/03/18 21:53:41 tonnerre Exp $ - ---- cgi/trends.c.orig 2006-03-21 22:31:47.000000000 +0100 -+++ cgi/trends.c -@@ -1207,6 +1207,7 @@ int process_cgivars(void){ - host_name=""; - else - strcpy(host_name,variables[x]); -+ strip_html_brackets(host_name); - - display_type=DISPLAY_HOST_TRENDS; - } -@@ -1224,6 +1225,7 @@ int process_cgivars(void){ - svc_description=""; - else - strcpy(svc_description,variables[x]); -+ strip_html_brackets(svc_description); - - display_type=DISPLAY_SERVICE_TRENDS; - } diff --git a/net/nagios-base/patches/patch-au b/net/nagios-base/patches/patch-au deleted file mode 100644 index 3796b7cd294..00000000000 --- a/net/nagios-base/patches/patch-au +++ /dev/null @@ -1,33 +0,0 @@ -$NetBSD: patch-au,v 1.1 2008/03/18 21:53:41 tonnerre Exp $ - ---- cgi/cgiutils.c.orig 2006-05-20 20:37:29.000000000 +0200 -+++ cgi/cgiutils.c -@@ -1393,6 +1393,28 @@ char * html_encode(char *input){ - } - - -+ /* strip > and < from string */ -+ void strip_html_brackets(char *buffer){ -+ register int x; -+ register int y; -+ register int z; -+ -+ if(buffer==NULL || buffer[0]=='\x0') -+ return; -+ -+ /* remove all occurances in string */ -+ z=(int)strlen(buffer); -+ for(x=0,y=0;x<z;x++){ -+ if(buffer[x]=='<' || buffer[x]=='>') -+ continue; -+ buffer[y++]=buffer[x]; -+ } -+ buffer[y++]='\x0'; -+ -+ return; -+ } -+ -+ - - /* determines the log file we should use (from current time) */ - void get_log_archive_to_use(int archive,char *buffer,int buffer_length){ |