diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9e2513d --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +nagios-3.2.1.tar.gz +/nagios-3.2.2.tar.gz +/nagios-3.2.3.tar.gz +/nagios-3.3.1.tar.gz +/nagios-3.4.1.tar.gz +/nagios-3.4.2.tar.gz +/nagios-3.4.3.tar.gz +/nagios-3.4.4.tar.gz +/nagios-3.5.0.tar.gz +/nagios-3.5.1.tar.gz +/nagios-4.0.8.tar.gz +/nagioscore-release-4.2.4.tar.gz +/nagioscore-nagios-4.3.1.tar.gz +/nagioscore-nagios-4.3.2.tar.gz +/nagioscore-nagios-4.3.4.tar.gz +/nagioscore-nagios-4.4.2.tar.gz +/nagioscore-nagios-4.4.3.tar.gz +/nagioscore-nagios-4.4.5.tar.gz +/nagioscore-nagios-4.4.6.tar.gz +/nagioscore-nagios-4.4.7.tar.gz +/nagioscore-nagios-4.4.8.tar.gz +/nagioscore-nagios-4.4.9.tar.gz +/nagioscore-nagios-4.4.10.tar.gz +/nagioscore-nagios-4.4.14.tar.gz +/nagioscore-nagios-4.5.9.tar.gz diff --git a/dead.package b/dead.package deleted file mode 100644 index a72aec0..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -epel8-playground decommissioned : https://pagure.io/epel/issue/136 diff --git a/nagios-0001-default-init.patch b/nagios-0001-default-init.patch new file mode 100644 index 0000000..422f0de --- /dev/null +++ b/nagios-0001-default-init.patch @@ -0,0 +1,88 @@ +diff -up ./startup/default-init.in.fix_el6_init ./startup/default-init.in +--- ./startup/default-init.in.fix_el6_init 2019-01-15 09:58:00.000000000 -0500 ++++ ./startup/default-init.in 2019-02-05 09:38:09.463144849 -0500 +@@ -1,6 +1,6 @@ + #!/bin/sh + # +-# chkconfig: 345 99 01 ++# chkconfig: - 99 01 + # description: Nagios network monitor + # processname: nagios + # File : nagios +@@ -24,6 +24,9 @@ + # - Clean out redhat macros and other dependencies + # 2003-01-11 Ethan Galstad + # - Updated su syntax (Gary Miller) ++# 2018-11-28 Justin Paulsen ++# - Patched for EPEL release of Nagioscore 4.4.2 ++# - - nagios-0001-default-init.patch + # + # Description: Starts and stops the Nagios monitor + # used to provide network services status. +@@ -91,12 +94,12 @@ check_config () + echo "ERROR: Could not delete '$NagiosCfgtestFile'" + exit 8 + fi +- if ! su $NagiosUser -c "touch $NagiosCfgtestFile"; then ++ if ! su $NagiosUser -c "touch $NagiosCfgtestFile" -s /bin/sh ; then + echo "ERROR: Could not create or update '$NagiosCfgtestFile'" + exit 8 + fi + +- TMPFILE=$(mktemp /tmp/.configtest.XXXXXXXX) ++ TMPFILE=$(mktemp $NagiosCfgtestFile.XXX) + $NagiosBin -vp $NagiosCfgFile > "$TMPFILE" + WARN=`grep ^"Total Warnings:" "$TMPFILE" |awk -F: '{print \$2}' |sed s/' '//g` + ERR=`grep ^"Total Errors:" "$TMPFILE" |awk -F: '{print \$2}' |sed s/' '//g` +@@ -138,11 +141,14 @@ status_nagios () + + printstatus_nagios () + { +- if status_nagios; then ++ status_nagios $1 $2 ++ RETVAL=$? ++ if [ $RETVAL = 0 ]; then + echo "nagios (pid $NagiosPID) is running..." + else + echo "nagios is not running" + fi ++ return $RETVAL + } + + killproc_nagios () +@@ -157,7 +163,17 @@ pid_nagios () + return 1 + fi + +- NagiosPID=`head -n 1 $NagiosRunFile` ++ export NagiosPID=`head -n 1 $NagiosRunFile` ++ if [[ -z "$NagiosPID" ]]; then ++ echo "No usable PID found in $NagiosRunFile" ++ exit 1 ++ fi ++ ++ regex='^[0-9]+$' ++ if ! [[ $NagiosPID =~ $regex ]]; then ++ echo "PID not number found in $NagiosRunFile" ++ exit 1 ++ fi + } + + # Check that nagios exists. +@@ -188,7 +204,7 @@ case "$1" in + fi + fi + +- su $NagiosUser -c "touch $NagiosVarDir/nagios.log $NagiosRetentionFile" ++ su $NagiosUser -c "touch $NagiosVarDir/nagios.log $NagiosRetentionFile" -s /bin/sh + @BIN_RM@ -f $NagiosCommandFile + touch $NagiosRunFile + $NagiosBin -d $NagiosCfgFile +@@ -281,6 +297,7 @@ case "$1" in + *) + echo "Usage: nagios {start|stop|restart|reload|force-reload|status|checkconfig|configtest}" + exit 1 ++ exit 2 + ;; + + esac diff --git a/nagios-0002-Fix-installation-of-httpd-conf.d-config-file.patch b/nagios-0002-Fix-installation-of-httpd-conf.d-config-file.patch new file mode 100644 index 0000000..bcd92b2 --- /dev/null +++ b/nagios-0002-Fix-installation-of-httpd-conf.d-config-file.patch @@ -0,0 +1,11 @@ +diff -up ./Makefile.in.fix_httpd_conf_d ./Makefile.in +--- ./Makefile.in.fix_httpd_conf_d 2018-11-28 12:36:22.206486501 -0600 ++++ ./Makefile.in 2018-11-28 12:37:26.098414877 -0600 +@@ -337,6 +337,7 @@ install-groups-users: + @autoconf-macros/add_group_user $(DIST) $(NAGIOS_USER) $(NAGIOS_GRP) 1 + + install-webconf: ++ $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTTPD_CONF) + $(INSTALL) -m 644 sample-config/httpd.conf $(DESTDIR)$(HTTPD_CONF)/nagios.conf + if [ $(LN_HTTPD_SITES_ENABLED) -eq 1 ]; then \ + $(LN_S) $(DESTDIR)$(HTTPD_CONF)/nagios.conf $(DESTDIR)/etc/apache2/sites-enabled/nagios.conf; \ diff --git a/nagios-0003-Install-config-files-too.patch b/nagios-0003-Install-config-files-too.patch new file mode 100644 index 0000000..3194a02 --- /dev/null +++ b/nagios-0003-Install-config-files-too.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.in b/Makefile.in +index b992ab1e..ef2a797f 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -439,7 +439,7 @@ dox: + doxygen doxy.conf + + +-fullinstall: install install-init install-commandmode install-webconf install-devel ++fullinstall: install install-init install-commandmode install-webconf install-devel install-config + + # Uninstall is too destructive if base install directory is /usr, etc. + #uninstall: diff --git a/nagios-0004-Fix-path-to-CGI-executables.patch b/nagios-0004-Fix-path-to-CGI-executables.patch new file mode 100644 index 0000000..d3fdfe7 --- /dev/null +++ b/nagios-0004-Fix-path-to-CGI-executables.patch @@ -0,0 +1,50 @@ +From 3bdd7e40e1c7e7484edcb53b01ef3cd446305466 Mon Sep 17 00:00:00 2001 +From: Peter Lemenkov +Date: Mon, 15 Nov 2010 15:07:49 +0300 +Subject: [PATCH 08/12] Fix path to CGI executables + +See rhbz #653291 for additional details: + +https://bugzilla.redhat.com/653291 + +Signed-off-by: Peter Lemenkov + + +Modified for 4.0.8 - Scott Wilkerson + +--- + sample-config/httpd.conf.in | 4 ++-- + subst.in | 1 + + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/sample-config/httpd.conf.in b/sample-config/httpd.conf.in +index 71d4fbb..1b1e693 100644 +--- a/sample-config/httpd.conf.in ++++ b/sample-config/httpd.conf.in +@@ -5,9 +5,9 @@ + # configuration file. Customize the paths, etc. as + # needed to fit your system. + +-ScriptAlias @cgiurl@ "@sbindir@" ++ScriptAlias @cgiurl@ "@cgidir@" + +- ++ + # SSLRequireSSL + Options ExecCGI + AllowOverride None +diff --git a/subst.in b/subst.in +index a8e2c06..bbffb3a 100755 +--- a/subst.in ++++ b/subst.in +@@ -35,6 +35,7 @@ while ($f = shift @ARGV) { + s|\@datarootdir\@|@datarootdir@|g; + s|\@sbindir\@|@sbindir@|g; + s|\@bindir\@|@bindir@|g; ++ s|\@cgidir\@|@libdir@/cgi-bin/|g; + s|\@htmurl\@|@htmurl@|g; + s|\@cgiurl\@|@cgiurl@|g; + s|\@MAIL_PROG\@|@MAIL_PROG@|g; +-- +1.8.3.1 + diff --git a/nagios-0005-Fixed-path-to-passwd-file-in-Apache-s-config-file.patch b/nagios-0005-Fixed-path-to-passwd-file-in-Apache-s-config-file.patch new file mode 100644 index 0000000..1019607 --- /dev/null +++ b/nagios-0005-Fixed-path-to-passwd-file-in-Apache-s-config-file.patch @@ -0,0 +1,39 @@ +diff -up ./sample-config/httpd.conf.in.fix_path_to_passwd ./sample-config/httpd.conf.in +--- ./sample-config/httpd.conf.in.fix_path_to_passwd 2016-10-24 10:10:28.000000000 -0400 ++++ ./sample-config/httpd.conf.in 2016-11-08 14:37:02.117929826 -0500 +@@ -18,7 +18,7 @@ ScriptAlias @cgiurl@ "@sbindir@" + + AuthName "Nagios Access" + AuthType Basic +- AuthUserFile @sysconfdir@/htpasswd.users ++ AuthUserFile @sysconfdir@/passwd + Require valid-user + + +@@ -31,7 +31,7 @@ ScriptAlias @cgiurl@ "@sbindir@" + + AuthName "Nagios Access" + AuthType Basic +- AuthUserFile @sysconfdir@/htpasswd.users ++ AuthUserFile @sysconfdir@/passwd + Require valid-user + + +@@ -49,7 +49,7 @@ Alias @htmurl@ "@datadir@" + + AuthName "Nagios Access" + AuthType Basic +- AuthUserFile @sysconfdir@/htpasswd.users ++ AuthUserFile @sysconfdir@/passwd + Require valid-user + + +@@ -62,7 +62,7 @@ Alias @htmurl@ "@datadir@" + + AuthName "Nagios Access" + AuthType Basic +- AuthUserFile @sysconfdir@/htpasswd.users ++ AuthUserFile @sysconfdir@/passwd + Require valid-user + + diff --git a/nagios-0006-Added-several-images-to-the-sample-config-revb.patch b/nagios-0006-Added-several-images-to-the-sample-config-revb.patch new file mode 100644 index 0000000..09fea7e --- /dev/null +++ b/nagios-0006-Added-several-images-to-the-sample-config-revb.patch @@ -0,0 +1,29 @@ +diff -up ./sample-config/template-object/templates.cfg.in.more_images ./sample-config/template-object/templates.cfg.in +--- ./sample-config/template-object/templates.cfg.in.more_images 2018-11-28 13:10:25.822264939 -0600 ++++ ./sample-config/template-object/templates.cfg.in 2018-11-28 13:16:15.711410141 -0600 +@@ -123,6 +123,7 @@ define host { + notification_interval 30 ; Resend notifications every 30 minutes + notification_options d,r ; Only send notifications for specific host states + contact_groups admins ; Notifications get sent to the admins by default ++ statusmap_image printer.png + register 0 ; DON'T REGISTER THIS - ITS JUST A TEMPLATE + } + +@@ -142,9 +143,17 @@ define host { + notification_interval 30 ; Resend notifications every 30 minutes + notification_options d,r ; Only send notifications for specific host states + contact_groups admins ; Notifications get sent to the admins by default ++ statusmap_image switch.png + register 0 ; DON'T REGISTER THIS - ITS JUST A TEMPLATE + } + ++# Define a template for routers that we can reuse ++define host{ ++ name generic-router ; The name of this host template ++ use generic-switch ; Inherit default values from the generic-host template ++ statusmap_image router.png ++ register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE ++} + + + ############################################################################### diff --git a/nagios-0008-Add-cfg_dir-etc-nagios-conf.d-to-the-main-nagios-con.patch b/nagios-0008-Add-cfg_dir-etc-nagios-conf.d-to-the-main-nagios-con.patch new file mode 100644 index 0000000..e22f333 --- /dev/null +++ b/nagios-0008-Add-cfg_dir-etc-nagios-conf.d-to-the-main-nagios-con.patch @@ -0,0 +1,12 @@ +diff -up ./sample-config/nagios.cfg.in.conf_d ./sample-config/nagios.cfg.in +--- ./sample-config/nagios.cfg.in.conf_d 2017-08-24 17:43:48.000000000 -0400 ++++ ./sample-config/nagios.cfg.in 2017-09-15 18:29:48.659666387 -0400 +@@ -53,6 +53,8 @@ cfg_file=@sysconfdir@/objects/localhost. + #cfg_dir=@sysconfdir@/switches + #cfg_dir=@sysconfdir@/routers + ++cfg_dir=@sysconfdir@/conf.d ++ + + + diff --git a/nagios-0009-fix-localstatedir-for-linux.patch b/nagios-0009-fix-localstatedir-for-linux.patch new file mode 100644 index 0000000..070285f --- /dev/null +++ b/nagios-0009-fix-localstatedir-for-linux.patch @@ -0,0 +1,281 @@ +diff -up ./base/Makefile.in.fix_localstatedir ./base/Makefile.in +--- ./base/Makefile.in.fix_localstatedir 2019-01-16 13:29:13.079040249 -0600 ++++ ./base/Makefile.in 2019-01-16 13:32:54.103372583 -0600 +@@ -33,7 +33,7 @@ LIBS=@LIBS@ + + prefix=@prefix@ + exec_prefix=@exec_prefix@ +-LOGDIR=@localstatedir@ ++LOGDIR=@localstatedir@/log/nagios/ + CFGDIR=@sysconfdir@ + BINDIR=@bindir@ + CGIDIR=@cgibindir@ +diff -up ./cgi/Makefile.in.fix_localstatedir ./cgi/Makefile.in +--- ./cgi/Makefile.in.fix_localstatedir 2019-01-16 13:33:14.596032529 -0600 ++++ ./cgi/Makefile.in 2019-01-16 13:33:35.252689754 -0600 +@@ -12,7 +12,7 @@ SRC_LIB=../lib + + prefix=@prefix@ + exec_prefix=@exec_prefix@ +-LOGDIR=@localstatedir@ ++LOGDIR=@localstatedir@/log/nagios/ + CFGDIR=@sysconfdir@ + BINDIR=@bindir@ + CGIDIR=@cgibindir@ +diff -up ./common/Makefile.in.fix_localstatedir ./common/Makefile.in +--- ./common/Makefile.in.fix_localstatedir 2019-01-16 13:33:51.236424521 -0600 ++++ ./common/Makefile.in 2019-01-16 13:34:17.928981586 -0600 +@@ -13,7 +13,7 @@ LDFLAGS=@LDFLAGS@ @LIBS@ + + prefix=@prefix@ + exec_prefix=@exec_prefix@ +-LOGDIR=@localstatedir@ ++LOGDIR=@localstatedir@/log/nagios/ + CFGDIR=@sysconfdir@ + BINDIR=@bindir@ + CGIDIR=@cgibindir@ +diff -up ./html/config.inc.php.in.fix_localstatedir ./html/config.inc.php.in +--- ./html/config.inc.php.in.fix_localstatedir 2019-01-16 13:35:06.875169375 -0600 ++++ ./html/config.inc.php.in 2019-01-16 14:25:51.436714786 -0600 +@@ -9,8 +9,8 @@ $cfg['cgi_base_url']='@cgiurl@'; + + // FILE LOCATION DEFAULTS + $cfg['main_config_file']='@sysconfdir@/nagios.cfg'; // default location of the main Nagios config file +-$cfg['status_file']='@localstatedir@/status.dat'; // default location of Nagios status file +-$cfg['state_retention_file']='@localstatedir@/retention.dat'; // default location of Nagios retention file ++$cfg['status_file']='@localstatedir@/spool/nagios/status.dat'; // default location of Nagios status file ++$cfg['state_retention_file']='@localstatedir@/spool/nagios/retention.dat'; // default location of Nagios retention file + + + +diff -up ./html/Makefile.in.fix_localstatedir ./html/Makefile.in +--- ./html/Makefile.in.fix_localstatedir 2019-01-16 13:37:18.936977949 -0600 ++++ ./html/Makefile.in 2019-01-16 13:37:36.645684091 -0600 +@@ -4,7 +4,7 @@ LDFLAGS=@LDFLAGS@ @LIBS@ + + prefix=@prefix@ + exec_prefix=@exec_prefix@ +-LOGDIR=@localstatedir@ ++LOGDIR=@localstatedir@/log/nagios/ + CFGDIR=@sysconfdir@ + BINDIR=@bindir@ + CGIDIR=@cgibindir@ +diff -up ./include/locations.h.in.fix_localstatedir ./include/locations.h.in +--- ./include/locations.h.in.fix_localstatedir 2019-01-16 13:38:02.700251743 -0600 ++++ ./include/locations.h.in 2019-01-16 14:36:54.105757936 -0600 +@@ -17,18 +17,18 @@ + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + ************************************************************************/ + +-#define DEFAULT_TEMP_FILE "@localstatedir@/tempfile" ++#define DEFAULT_TEMP_FILE "@localstatedir@/spool/nagios/tempfile" + #define DEFAULT_TEMP_PATH "/tmp" +-#define DEFAULT_CHECK_RESULT_PATH "@localstatedir@/spool/checkresults" +-#define DEFAULT_STATUS_FILE "@localstatedir@/status.dat" +-#define DEFAULT_LOG_FILE "@localstatedir@/nagios.log" +-#define DEFAULT_LOG_ARCHIVE_PATH "@localstatedir@/archives/" +-#define DEFAULT_DEBUG_FILE "@localstatedir@/nagios.debug" +-#define DEFAULT_COMMENT_FILE "@localstatedir@/comments.dat" +-#define DEFAULT_DOWNTIME_FILE "@localstatedir@/downtime.dat" +-#define DEFAULT_RETENTION_FILE "@localstatedir@/retention.dat" +-#define DEFAULT_COMMAND_FILE "@localstatedir@/rw/nagios.cmd" +-#define DEFAULT_QUERY_SOCKET "@localstatedir@/rw/nagios.qh" ++#define DEFAULT_CHECK_RESULT_PATH "@localstatedir@/spool/nagios/checkresults" ++#define DEFAULT_STATUS_FILE "@localstatedir@/spool/nagios/status.dat" ++#define DEFAULT_LOG_FILE "@localstatedir@/log/nagios/nagios.log" ++#define DEFAULT_LOG_ARCHIVE_PATH "@localstatedir@/log/nagios/archives/" ++#define DEFAULT_DEBUG_FILE "@localstatedir@/log/nagios/nagios.debug" ++#define DEFAULT_COMMENT_FILE "@localstatedir@/spool/nagios/comments.dat" ++#define DEFAULT_DOWNTIME_FILE "@localstatedir@/spool/nagios/downtime.dat" ++#define DEFAULT_RETENTION_FILE "@localstatedir@/spool/nagios/retention.dat" ++#define DEFAULT_COMMAND_FILE "@localstatedir@/spool/nagios/cmd/nagios.cmd" ++#define DEFAULT_QUERY_SOCKET "@localstatedir@/spool/nagios/cmd/nagios.qh" + #define DEFAULT_CONFIG_FILE "@sysconfdir@/nagios.cfg" + #define DEFAULT_PHYSICAL_HTML_PATH "@datadir@" + #define DEFAULT_URL_HTML_PATH "@htmurl@" +@@ -36,6 +36,6 @@ + #define DEFAULT_URL_CGIBIN_PATH "@cgiurl@" + #define DEFAULT_CGI_CONFIG_FILE "@sysconfdir@/cgi.cfg" + #define DEFAULT_LOCK_FILE "@subsyslockfile@" +-#define DEFAULT_OBJECT_CACHE_FILE "@localstatedir@/objects.cache" +-#define DEFAULT_PRECACHED_OBJECT_FILE "@localstatedir@/objects.precache" +-#define DEFAULT_EVENT_BROKER_FILE "@localstatedir@/broker.socket" ++#define DEFAULT_OBJECT_CACHE_FILE "@localstatedir@/spool/nagios/objects.cache" ++#define DEFAULT_PRECACHED_OBJECT_FILE "@localstatedir@/spool/nagios/objects.precache" ++#define DEFAULT_EVENT_BROKER_FILE "@localstatedir@/spool/nagios/broker.socket" +diff -up ./sample-config/nagios.cfg.in.fix_localstatedir ./sample-config/nagios.cfg.in +--- ./sample-config/nagios.cfg.in.fix_localstatedir 2018-08-16 15:10:12.000000000 -0400 ++++ ./sample-config/nagios.cfg.in 2018-11-30 13:52:14.989761698 -0500 +@@ -15,7 +15,7 @@ + # for historical purposes. This should be the first option specified + # in the config file!!! + +-log_file=@localstatedir@/nagios.log ++log_file=@localstatedir@/log/nagios/nagios.log + + + +@@ -63,7 +63,7 @@ cfg_file=@sysconfdir@/objects/localhost. + # directly) in order to prevent inconsistencies that can occur + # when the config files are modified after Nagios starts. + +-object_cache_file=@localstatedir@/objects.cache ++object_cache_file=@localstatedir@/spool/nagios/objects.cache + + + +@@ -79,7 +79,7 @@ object_cache_file=@localstatedir@/object + # Read the documentation section on optimizing Nagios to find our more + # about how this feature works. + +-precached_object_file=@localstatedir@/objects.precache ++precached_object_file=@localstatedir@/spool/nagios/objects.precache + + + +@@ -92,7 +92,7 @@ precached_object_file=@localstatedir@/ob + # defined as macros in this file and restrictive permissions (600) + # can be placed on this file. + +-resource_file=@sysconfdir@/resource.cfg ++resource_file=@sysconfdir@/private/resource.cfg + + + +@@ -102,7 +102,7 @@ resource_file=@sysconfdir@/resource.cfg + # The contents of the status file are deleted every time Nagios + # restarts. + +-status_file=@localstatedir@/status.dat ++status_file=@localstatedir@/spool/nagios/status.dat + + + +@@ -151,14 +151,14 @@ check_external_commands=1 + # directory level instead of on the file, as the file is deleted every + # time its contents are processed. + +-command_file=@localstatedir@/rw/nagios.cmd ++command_file=@localstatedir@/spool/nagios/cmd/nagios.cmd + + + + # QUERY HANDLER INTERFACE + # This is the socket that is created for the Query Handler interface + +-#query_socket=@localstatedir@/rw/nagios.qh ++#query_socket=@localstatedir@/spool/nagios/cmd/nagios.qh + + + +@@ -176,7 +176,7 @@ lock_file=@subsyslockfile@ + # is created, used, and deleted throughout the time that Nagios is + # running. + +-temp_file=@localstatedir@/nagios.tmp ++temp_file=@localstatedir@/spool/nagios/nagios.tmp + + + +@@ -243,7 +243,7 @@ log_rotation_method=d + # This is the directory where archived (rotated) log files should be + # placed (assuming you've chosen to do log rotation). + +-log_archive_path=@localstatedir@/archives ++log_archive_path=@localstatedir@/log/nagios/archives + + + +@@ -618,7 +618,7 @@ retain_state_information=1 + # This file is used only if the retain_state_information + # variable is set to 1. + +-state_retention_file=@localstatedir@/retention.dat ++state_retention_file=@localstatedir@/spool/nagios/retention.dat + + + +@@ -831,8 +831,8 @@ process_performance_data=0 + # Performance data is only written to these files if the + # enable_performance_data option (above) is set to 1. + +-#host_perfdata_file=@localstatedir@/host-perfdata +-#service_perfdata_file=@localstatedir@/service-perfdata ++#host_perfdata_file=@localstatedir@/log/nagios/host-perfdata ++#service_perfdata_file=@localstatedir@/log/nagios/service-perfdata + + + +@@ -1292,7 +1292,7 @@ debug_verbosity=1 + # DEBUG FILE + # This option determines where Nagios should write debugging information. + +-debug_file=@localstatedir@/nagios.debug ++debug_file=@localstatedir@/log/nagios/nagios.debug + + + +diff -up ./sample-config/template-object/commands.cfg.in.fix_localstatedir ./sample-config/template-object/commands.cfg.in +--- ./sample-config/template-object/commands.cfg.in.fix_localstatedir 2019-01-16 13:50:29.366875513 -0600 ++++ ./sample-config/template-object/commands.cfg.in 2019-01-16 13:51:22.140000845 -0600 +@@ -241,7 +241,7 @@ define command { + define command { + + command_name process-host-perfdata +- command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> @localstatedir@/host-perfdata.out ++ command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> @localstatedir@/log/nagios/host-perfdata.out + } + + +@@ -249,5 +249,5 @@ define command { + define command { + + command_name process-service-perfdata +- command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> @localstatedir@/service-perfdata.out ++ command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> @localstatedir@/log/nagios/service-perfdata.out + } +diff -up ./startup/default-init.in.fix_localstatedir ./startup/default-init.in +--- ./startup/default-init.in.fix_localstatedir 2019-01-16 14:16:54.874599523 -0600 ++++ ./startup/default-init.in 2019-01-16 14:22:55.103634621 -0600 +@@ -41,12 +41,12 @@ + # Our install-time configuration. + NagiosBin=@bindir@/@nagios_name@ + NagiosCfgFile=@sysconfdir@/nagios.cfg +-NagiosCfgtestFile=@localstatedir@/nagios.configtest +-NagiosStatusFile=@localstatedir@/status.dat +-NagiosRetentionFile=@localstatedir@/retention.dat +-NagiosCommandFile=@localstatedir@/rw/nagios.cmd ++NagiosCfgtestFile=@localstatedir@/spool/nagios/nagios.configtest ++NagiosStatusFile=@localstatedir@/spool/nagios/status.dat ++NagiosRetentionFile=@localstatedir@/spool/nagios/retention.dat ++NagiosCommandFile=@localstatedir@/spool/nagios/cmd/nagios.cmd + NagiosRunFile=@subsyslockfile@ +-NagiosVarDir=@localstatedir@ ++NagiosVarDir=@localstatedir@/spool/nagios/ + NagiosCGIDir=@cgibindir@ + NagiosUser=@nagios_user@ + NagiosGroup=@nagios_grp@ +diff -up ./startup/default-service.in.fix_localstatedir ./startup/default-service.in +--- ./startup/default-service.in.fix_localstatedir 2019-01-16 14:23:17.575262522 -0600 ++++ ./startup/default-service.in 2019-01-16 14:23:39.273903222 -0600 +@@ -8,7 +8,7 @@ Type=forking + ExecStartPre=@bindir@/nagios -v @sysconfdir@/nagios.cfg + ExecStart=@bindir@/nagios -d @sysconfdir@/nagios.cfg + ExecStop=@BIN_KILL@ -s TERM ${MAINPID} +-ExecStopPost=@BIN_RM@ -f @localstatedir@/rw/nagios.cmd ++ExecStopPost=@BIN_RM@ -f @localstatedir@/spool/nagios/cmd/nagios.cmd + ExecReload=@bindir@/nagios -v @sysconfdir@/nagios.cfg + ExecReload=@BIN_KILL@ -s HUP ${MAINPID} + +diff -up ./t-tap/Makefile.in.fix_localstatedir ./t-tap/Makefile.in +--- ./t-tap/Makefile.in.fix_localstatedir 2019-01-16 14:24:14.944312569 -0600 ++++ ./t-tap/Makefile.in 2019-01-16 14:24:42.359858604 -0600 +@@ -42,7 +42,7 @@ LIBS=@LIBS@ ../lib/libnagios.a + + prefix=@prefix@ + exec_prefix=@exec_prefix@ +-LOGDIR=@localstatedir@ ++LOGDIR=@localstatedir@/log/nagios/ + CFGDIR=@sysconfdir@ + BINDIR=@bindir@ + CGIDIR=@cgibindir@ diff --git a/nagios-0010-remove-information-leak.patch b/nagios-0010-remove-information-leak.patch new file mode 100644 index 0000000..cd3b400 --- /dev/null +++ b/nagios-0010-remove-information-leak.patch @@ -0,0 +1,114 @@ +diff -up ./cgi/extinfo.c.remove_3rdparty_links ./cgi/extinfo.c +--- ./cgi/extinfo.c.remove_3rdparty_links 2019-08-20 15:29:34.000000000 +0000 ++++ ./cgi/extinfo.c 2019-08-29 18:17:32.321544245 +0000 +@@ -557,27 +557,6 @@ void document_header(int use_stylesheet) + printf("\n", url_stylesheets_path, NAGFUNCS_CSS); + } + +- if (display_type == DISPLAY_HOST_INFO) +- vidurl = "https://www.youtube.com/embed/n3QEAf-MxY4"; +- else if(display_type == DISPLAY_SERVICE_INFO) +- vidurl = "https://www.youtube.com/embed/f_knwQOS6FI"; +- +- if (enable_page_tour == TRUE && vidurl) { +- printf("\n", url_js_path, JQUERY_JS); +- printf("\n", url_js_path, NAGFUNCS_JS); +- printf("\n"); +- } +- + printf("\n"); + + printf("\n"); +diff -up ./cgi/status.c.remove_3rdparty_links ./cgi/status.c +--- ./cgi/status.c.remove_3rdparty_links 2019-08-20 15:29:34.000000000 +0000 ++++ ./cgi/status.c 2019-08-29 18:17:32.322544264 +0000 +@@ -556,31 +556,8 @@ void document_header(int use_stylesheet) + /* JS function to append content to elements on page */ + printf("\n", url_js_path, NAGFUNCS_JS); +- +- printf("\n"); +- } ++ } + + + +diff --git a/html/main.php b/html/main.php +index 15713f8d..91cb1266 100644 +--- a/html/main.php ++++ b/html/main.php +@@ -23,21 +23,7 @@ if ($theme != 'dark' && $theme != 'light') { + +