diff options
author | Doug Barton <dougb@FreeBSD.org> | 2011-10-14 22:30:49 +0000 |
---|---|---|
committer | Doug Barton <dougb@FreeBSD.org> | 2011-10-14 22:30:49 +0000 |
commit | 4eb5b88d9eb1a88094ac3ae85f20e29e7510e97b (patch) | |
tree | 07820ebb6104ca954e4d94f3a2fdb93d78912435 /net-mgmt | |
parent | b49d99567f90be4113da01b6a7ef65427d682653 (diff) | |
download | ports-4eb5b88d9eb1a88094ac3ae85f20e29e7510e97b.tar.gz ports-4eb5b88d9eb1a88094ac3ae85f20e29e7510e97b.zip |
Notes
Diffstat (limited to 'net-mgmt')
20 files changed, 0 insertions, 1691 deletions
diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile index f54ccd9cb615..9cd5323d6483 100644 --- a/net-mgmt/Makefile +++ b/net-mgmt/Makefile @@ -137,7 +137,6 @@ SUBDIR += nagios-snmp-plugins SUBDIR += nagios-snmp-plugins-extras SUBDIR += nagios-spamd-plugin - SUBDIR += nagios2 SUBDIR += nagiosagent SUBDIR += nagiosgraph SUBDIR += nagiosgrapher diff --git a/net-mgmt/nagios2/Makefile b/net-mgmt/nagios2/Makefile deleted file mode 100644 index 13af036bd8ec..000000000000 --- a/net-mgmt/nagios2/Makefile +++ /dev/null @@ -1,124 +0,0 @@ -# New ports collection makefile for: nagios -# Date created: 19 May 2002 -# Whom: Blaz Zupan <blaz@si.FreeBSD.org> -# -# $FreeBSD$ -# - -PORTNAME= nagios -PORTVERSION= 2.12 -PORTREVISION= 8 -CATEGORIES= net-mgmt -MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-2.x/${PORTNAME}-${PORTVERSION} - -MAINTAINER= jarrod@downtools.com.au -COMMENT= Extremely powerful network monitoring system - -FORBIDDEN= Vulnerable since 2009-06-30, http://portaudit.freebsd.org/3ebd4cb5-657f-11de-883a-00e0815b8da8.html -EXPIRATION_DATE= 2011-10-14 - -LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd -RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins - -USE_ICONV= yes -USE_PERL5_BUILD= yes -USE_AUTOTOOLS= autoconf libltdl -USE_RC_SUBR= nagios - -CONFLICTS= nagios-[13].* nagios-devel-* -NO_LATEST_LINK= yes - -OPTIONS= EMBEDDED_PERL "Enable embedded Perl [requires Perl 5.8+]" OFF \ - NANOSLEEP "Use nanosleep in event timing" OFF - -GNU_CONFIGURE= yes - -NAGIOSUSER?= nagios -NAGIOSGROUP?= nagios -NAGIOSDIR?= /var/spool/nagios - -NAGIOSUID= 181 -NAGIOSGID= ${NAGIOSUID} - -NAGIOSWWWDIR?= www/nagios -NAGIOSHTMURL?= /nagios -NAGIOSCGIURL?= ${NAGIOSHTMURL}/cgi-bin - -# Suggested NAGIOSHOMEURL values: -# Home: main.html -# Tactical Overview: ${NAGIOSCGIURL}/tac.cgi -# Service Detail: ${NAGIOSCGIURL}/status.cgi?host=all -# Host Detail: ${NAGIOSCGIURL}/status.cgi?hostgroup=all&style=hostdetail -# Status Map: ${NAGIOSCGIURL}/statusmap.cgi?host=all -NAGIOSHOMEURL?= main.html - -.include <bsd.port.pre.mk> - -CPPFLAGS+= -I${LOCALBASE}/include -fPIC -CFLAGS+= ${CPPFLAGS} - -CONFIGURE_ARGS= --with-command-user=${NAGIOSUSER} \ - --with-command-group=${WWWGRP} \ - --with-nagios-user=${NAGIOSUSER} \ - --with-nagios-group=${NAGIOSGROUP} \ - --with-htmurl=${NAGIOSHTMURL} \ - --with-cgiurl=${NAGIOSCGIURL} \ - --sbindir=${PREFIX}/${NAGIOSWWWDIR}/cgi-bin \ - --libexecdir=${PREFIX}/libexec/nagios \ - --datadir=${PREFIX}/${NAGIOSWWWDIR} \ - --sysconfdir=${PREFIX}/etc/nagios \ - --localstatedir=${NAGIOSDIR} \ - --prefix=${PREFIX} - -CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib" \ - PERL=${PERL} - -MAKE_JOBS_UNSAFE= yes - -INSTALL_TARGET= install install-commandmode install-config - -PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \ - NAGIOSWWWDIR=${NAGIOSWWWDIR} \ - NAGIOSUSER=${NAGIOSUSER} \ - NAGIOSGROUP=${NAGIOSGROUP} \ - NAGIOSUID=${NAGIOSUID} \ - NAGIOSGID=${NAGIOSGID} \ - NAGIOSHTMURL=${NAGIOSHTMURL} \ - NAGIOSCGIURL=${NAGIOSCGIURL} \ - WWWGRP=${WWWGRP} - -SUB_FILES= pkg-install \ - pkg-deinstall \ - pkg-message - -### XXX: Subtle bug with removing PREFIX from here -SUB_LIST= PREFIX=${PREFIX} \ - ${PLIST_SUB} - -.if defined(WITH_EMBEDDED_PERL) -USE_PERL5= 5.8.0+ -CONFIGURE_ARGS+= --enable-embedded-perl \ - --with-perlcache -PLIST_SUB+= EMBEDDED_PERL="" -.else -PLIST_SUB+= EMBEDDED_PERL="@comment " -.endif - -.if defined(WITH_NANOSLEEP) -CONFIGURE_ARGS+= --enable-nanosleep -.endif - -post-patch: - @${REINPLACE_CMD} -e 's#"main.html"#"${NAGIOSHOMEURL:S/\//\\\//g:S/&/\\&/g}"#' \ - ${WRKSRC}/html/index.html.in - -pre-install: - @${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL - -post-install: - @${CHMOD} 775 ${NAGIOSDIR} ${NAGIOSDIR}/archives ${NAGIOSDIR}/rw - @${CHOWN} ${NAGIOSUSER}:${NAGIOSGROUP} ${NAGIOSDIR} ${NAGIOSDIR}/archives - @${CHOWN} ${NAGIOSUSER}:${WWWGRP} ${NAGIOSDIR}/rw - @${CAT} ${PKGMESSAGE} - -.include <bsd.port.post.mk> diff --git a/net-mgmt/nagios2/distinfo b/net-mgmt/nagios2/distinfo deleted file mode 100644 index 49e1f3b6d2a1..000000000000 --- a/net-mgmt/nagios2/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (nagios-2.12.tar.gz) = d1bd812793bff2b3bac15ef72ceff788bd6c2ead4952cb1f19c6232fd3c497cd -SIZE (nagios-2.12.tar.gz) = 1742179 diff --git a/net-mgmt/nagios2/files/nagios.in b/net-mgmt/nagios2/files/nagios.in deleted file mode 100644 index 44444759ca39..000000000000 --- a/net-mgmt/nagios2/files/nagios.in +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: /tmp/pcvs/ports/net-mgmt/nagios2/files/Attic/nagios.in,v 1.3 2010-03-27 00:14:22 dougb Exp $ -# - -# PROVIDE: nagios -# REQUIRE: DAEMON -# BEFORE: LOGIN -# KEYWORD: shutdown - -# -# Add the following lines to /etc/rc.conf to enable nagios: -# nagios_enable (bool): Set to "NO" by default. -# Set it to "YES" to enable nagios. -# nagios_flags (str): Set to "" by default. -# nagios_configfile (str): Set to "%%PREFIX%%/etc/nagios/nagios.cfg" by default. -# - -. /etc/rc.subr - -name="nagios" -rcvar=`set_rcvar` - -command="%%PREFIX%%/bin/nagios" -command_args="-d" -extra_commands="reload" -pidfile="%%NAGIOSDIR%%/nagios.lock" -nagios_user="%%NAGIOSUSER%%" - -start_precmd="start_precmd" -stop_postcmd="stop_postcmd" -restart_precmd="nagios_checkconfig" -reload_precmd="nagios_checkconfig" -sig_reload=HUP - -[ -z "${nagios_enable}" ] && nagios_enable="NO" -[ -z "${nagios_configfile}" ] && nagios_configfile="%%PREFIX%%/etc/nagios/nagios.cfg" - -load_rc_config "${name}" - -required_files="${nagios_configfile}" -command_args="${command_args} ${nagios_configfile}" - -nagios_checkconfig() { - echo -n "Performing sanity check of nagios configuration: " - ${command} -v ${nagios_configfile} 2>&1 >/dev/null - if [ $? != 0 ]; then - echo "FAILED" - ${command} -v ${nagios_configfile} - return 1 - else - echo "OK" - fi -} - -start_precmd() { - if ! nagios_checkconfig; then - return 1 - fi - - su -m "${nagios_user}" -c "touch \"%%NAGIOSDIR%%/nagios.log\" \"%%NAGIOSDIR%%/status.sav\"" - rm -f "%%NAGIOSDIR%%/rw/nagios.cmd" -} - -stop_postcmd() { - rm -f "%%NAGIOSDIR%%/nagios.tmp" "%%NAGIOSDIR%%/rw/nagios.cmd" -} - -run_rc_command "$1" diff --git a/net-mgmt/nagios2/files/patch-CVE-2008-5027.5028 b/net-mgmt/nagios2/files/patch-CVE-2008-5027.5028 deleted file mode 100644 index b3daddc798cf..000000000000 --- a/net-mgmt/nagios2/files/patch-CVE-2008-5027.5028 +++ /dev/null @@ -1,703 +0,0 @@ -diff --git a/base/commands.c b/base/commands.c -index 79de49b..5b5ab45 100644 ---- base/commands.c -+++ base/commands.c -@@ -204,9 +204,9 @@ void check_for_external_commands(void){ - else if(!strcmp(command_id,"ENTER_ACTIVE_MODE") || !strcmp(command_id,"ENABLE_NOTIFICATIONS")) - command_type=CMD_ENABLE_NOTIFICATIONS; - -- else if(!strcmp(command_id,"SHUTDOWN_PROGRAM")) -+ else if(!strcmp(command_id,"SHUTDOWN_PROGRAM") || !strcmp(command_id,"SHUTDOWN_PROCESS")) - command_type=CMD_SHUTDOWN_PROCESS; -- else if(!strcmp(command_id,"RESTART_PROGRAM")) -+ else if(!strcmp(command_id,"RESTART_PROGRAM") || !strcmp(command_id,"RESTART_PROCESS")) - command_type=CMD_RESTART_PROCESS; - - else if(!strcmp(command_id,"SAVE_STATE_INFORMATION")) -diff --git a/cgi/cmd.c b/cgi/cmd.c -index 63059bd..d36cab6 100644 ---- cgi/cmd.c -+++ cgi/cmd.c -@@ -31,6 +31,10 @@ - #include "../include/cgiauth.h" - #include "../include/getcgi.h" - -+#include <stdarg.h> -+ -+extern const char *extcmd_get_name(int id); -+ - extern char main_config_file[MAX_FILENAME_LENGTH]; - extern char command_file[MAX_FILENAME_LENGTH]; - extern char comment_file[MAX_FILENAME_LENGTH]; -@@ -1825,6 +1829,35 @@ void commit_command_data(int cmd){ - return; - } - -+__attribute__((format(printf, 2, 3))) -+static int cmd_submitf(int id, const char *fmt, ...) -+{ -+ char cmd[MAX_EXTERNAL_COMMAND_LENGTH]; -+ const char *command; -+ int len, len2; -+ va_list ap; -+ -+ command = extcmd_get_name(id); -+ /* -+ * We disallow sending 'CHANGE' commands from the cgi's -+ * until we do proper session handling to prevent cross-site -+ * request forgery -+ */ -+ if (!command || (strlen(command) > 6 && !memcmp("CHANGE", command, 6))) -+ return ERROR; -+ -+ len = snprintf(cmd, sizeof(cmd) - 1, "[%lu] %s;", time(NULL), command); -+ if (len < 0) -+ return ERROR; -+ -+ va_start(ap, fmt); -+ len2 = vsnprintf(&cmd[len], sizeof(cmd) - len - 1, fmt, ap); -+ va_end(ap); -+ if (len2 < 0) -+ return ERROR; -+ -+ return write_command_to_file(cmd); -+} - - /* commits a command for processing */ - int commit_command(int cmd){ -@@ -1847,236 +1880,211 @@ int commit_command(int cmd){ - switch(cmd){ - - case CMD_ADD_HOST_COMMENT: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] ADD_HOST_COMMENT;%s;%d;%s;%s\n",current_time,host_name,(persistent_comment==TRUE)?1:0,comment_author,comment_data); -+ result = cmd_submitf(cmd,"%s;%d;%s;%s",host_name,(persistent_comment==TRUE)?1:0,comment_author,comment_data); - break; -- -+ - case CMD_ADD_SVC_COMMENT: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] ADD_SVC_COMMENT;%s;%s;%d;%s;%s\n",current_time,host_name,service_desc,(persistent_comment==TRUE)?1:0,comment_author,comment_data); -+ result = cmd_submitf(cmd,"%s;%s;%d;%s;%s",host_name,service_desc,(persistent_comment==TRUE)?1:0,comment_author,comment_data); - break; - - case CMD_DEL_HOST_COMMENT: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] DEL_HOST_COMMENT;%lu\n",current_time,comment_id); -- break; -- - case CMD_DEL_SVC_COMMENT: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] DEL_SVC_COMMENT;%lu\n",current_time,comment_id); -+ result = cmd_submitf(cmd,"%lu",comment_id); - break; -- -+ - case CMD_DELAY_HOST_NOTIFICATION: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] DELAY_HOST_NOTIFICATION;%s;%lu\n",current_time,host_name,notification_time); -+ result = cmd_submitf(cmd,"%s;%lu",host_name,notification_time); - break; - - case CMD_DELAY_SVC_NOTIFICATION: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] DELAY_SVC_NOTIFICATION;%s;%s;%lu\n",current_time,host_name,service_desc,notification_time); -+ result = cmd_submitf(cmd,"%s;%s;%lu",host_name,service_desc,notification_time); - break; - - case CMD_SCHEDULE_SVC_CHECK: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] SCHEDULE_%sSVC_CHECK;%s;%s;%lu\n",current_time,(force_check==TRUE)?"FORCED_":"",host_name,service_desc,start_time); -+ result = cmd_submitf((force_check==TRUE)?CMD_SCHEDULE_FORCED_SVC_CHECK:cmd,"%s;%s;%lu",host_name,service_desc,start_time); - break; - - case CMD_ENABLE_SVC_CHECK: - case CMD_DISABLE_SVC_CHECK: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_SVC_CHECK;%s;%s\n",current_time,(cmd==CMD_ENABLE_SVC_CHECK)?"ENABLE":"DISABLE",host_name,service_desc); -+ result = cmd_submitf(cmd,"%s;%s",host_name,service_desc); - break; -- -+ - case CMD_DISABLE_NOTIFICATIONS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] DISABLE_NOTIFICATIONS;%lu\n",current_time,scheduled_time); -- break; -- - case CMD_ENABLE_NOTIFICATIONS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] ENABLE_NOTIFICATIONS;%lu\n",current_time,scheduled_time); -- break; -- - case CMD_SHUTDOWN_PROCESS: - case CMD_RESTART_PROCESS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_PROGRAM;%lu\n",current_time,(cmd==CMD_SHUTDOWN_PROCESS)?"SHUTDOWN":"RESTART",scheduled_time); -+ result = cmd_submitf(cmd,"%lu",scheduled_time); - break; - - case CMD_ENABLE_HOST_SVC_CHECKS: - case CMD_DISABLE_HOST_SVC_CHECKS: -- if(affect_host_and_services==FALSE) -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_HOST_SVC_CHECKS;%s\n",current_time,(cmd==CMD_ENABLE_HOST_SVC_CHECKS)?"ENABLE":"DISABLE",host_name); -- else -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_HOST_SVC_CHECKS;%s\n[%lu] %s_HOST_CHECK;%s\n",current_time,(cmd==CMD_ENABLE_HOST_SVC_CHECKS)?"ENABLE":"DISABLE",host_name,current_time,(cmd==CMD_ENABLE_HOST_SVC_CHECKS)?"ENABLE":"DISABLE",host_name); -+ result = cmd_submitf(cmd,"%s",host_name); -+ if(affect_host_and_services==TRUE) -+ result |= cmd_submitf((cmd == CMD_ENABLE_HOST_SVC_CHECKS?CMD_ENABLE_HOST_CHECK:CMD_DISABLE_HOST_CHECK),"%s",host_name); - break; -- -+ - case CMD_SCHEDULE_HOST_SVC_CHECKS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] SCHEDULE_%sHOST_SVC_CHECKS;%s;%lu\n",current_time,(force_check==TRUE)?"FORCED_":"",host_name,scheduled_time); -+ result = cmd_submitf((force_check==TRUE?CMD_SCHEDULE_FORCED_HOST_SVC_CHECKS:cmd),"%s;%lu",host_name,scheduled_time); - break; - - case CMD_DEL_ALL_HOST_COMMENTS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] DEL_ALL_HOST_COMMENTS;%s\n",current_time,host_name); -+ result = cmd_submitf(cmd,"%s",host_name); - break; -- -+ - case CMD_DEL_ALL_SVC_COMMENTS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] DEL_ALL_SVC_COMMENTS;%s;%s\n",current_time,host_name,service_desc); -+ result = cmd_submitf(cmd,"%s;%s",host_name,service_desc); - break; - - case CMD_ENABLE_SVC_NOTIFICATIONS: - case CMD_DISABLE_SVC_NOTIFICATIONS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_SVC_NOTIFICATIONS;%s;%s\n",current_time,(cmd==CMD_ENABLE_SVC_NOTIFICATIONS)?"ENABLE":"DISABLE",host_name,service_desc); -+ result = cmd_submitf(cmd,"%s;%s",host_name,service_desc); - break; -- -+ - case CMD_ENABLE_HOST_NOTIFICATIONS: - case CMD_DISABLE_HOST_NOTIFICATIONS: - if(propagate_to_children==TRUE) -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_HOST_AND_CHILD_NOTIFICATIONS;%s\n",current_time,(cmd==CMD_ENABLE_HOST_NOTIFICATIONS)?"ENABLE":"DISABLE",host_name); -+ result = cmd_submitf((cmd==CMD_ENABLE_HOST_NOTIFICATIONS?CMD_ENABLE_HOST_AND_CHILD_NOTIFICATIONS:CMD_DISABLE_HOST_AND_CHILD_NOTIFICATIONS),"%s",host_name); - else -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_HOST_NOTIFICATIONS;%s\n",current_time,(cmd==CMD_ENABLE_HOST_NOTIFICATIONS)?"ENABLE":"DISABLE",host_name); -+ result = cmd_submitf(cmd,"%s",host_name); - break; -- -+ - case CMD_ENABLE_ALL_NOTIFICATIONS_BEYOND_HOST: - case CMD_DISABLE_ALL_NOTIFICATIONS_BEYOND_HOST: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_ALL_NOTIFICATIONS_BEYOND_HOST;%s\n",current_time,(cmd==CMD_ENABLE_ALL_NOTIFICATIONS_BEYOND_HOST)?"ENABLE":"DISABLE",host_name); -+ result = cmd_submitf(cmd,"%s",host_name); - break; -- -+ - case CMD_ENABLE_HOST_SVC_NOTIFICATIONS: - case CMD_DISABLE_HOST_SVC_NOTIFICATIONS: -- if(affect_host_and_services==FALSE) -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_HOST_SVC_NOTIFICATIONS;%s\n",current_time,(cmd==CMD_ENABLE_HOST_SVC_NOTIFICATIONS)?"ENABLE":"DISABLE",host_name); -- else -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_HOST_SVC_NOTIFICATIONS;%s\n[%lu] %s_HOST_NOTIFICATIONS;%s\n",current_time,(cmd==CMD_ENABLE_HOST_SVC_NOTIFICATIONS)?"ENABLE":"DISABLE",host_name,current_time,(cmd==CMD_ENABLE_HOST_SVC_NOTIFICATIONS)?"ENABLE":"DISABLE",host_name); -+ result = cmd_submitf(cmd,"%s",host_name); -+ if(affect_host_and_services==TRUE) -+ result |= cmd_submitf((cmd==CMD_ENABLE_HOST_SVC_NOTIFICATIONS?CMD_ENABLE_HOST_NOTIFICATIONS:CMD_DISABLE_HOST_NOTIFICATIONS),"%s",host_name); - break; -- -+ - case CMD_ACKNOWLEDGE_HOST_PROBLEM: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] ACKNOWLEDGE_HOST_PROBLEM;%s;%d;%d;%d;%s;%s\n",current_time,host_name,(sticky_ack==TRUE)?ACKNOWLEDGEMENT_STICKY:ACKNOWLEDGEMENT_NORMAL,(send_notification==TRUE)?1:0,(persistent_comment==TRUE)?1:0,comment_author,comment_data); -+ result = cmd_submitf(cmd,"%s;%d;%d;%d;%s;%s",host_name,(sticky_ack==TRUE)?ACKNOWLEDGEMENT_STICKY:ACKNOWLEDGEMENT_NORMAL,(send_notification==TRUE)?1:0,(persistent_comment==TRUE)?1:0,comment_author,comment_data); - break; -- -+ - case CMD_ACKNOWLEDGE_SVC_PROBLEM: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] ACKNOWLEDGE_SVC_PROBLEM;%s;%s;%d;%d;%d;%s;%s\n",current_time,host_name,service_desc,(sticky_ack==TRUE)?ACKNOWLEDGEMENT_STICKY:ACKNOWLEDGEMENT_NORMAL,(send_notification==TRUE)?1:0,(persistent_comment==TRUE)?1:0,comment_author,comment_data); -+ result = cmd_submitf(cmd,"%s;%s;%d;%d;%d;%s;%s",host_name,service_desc,(sticky_ack==TRUE)?ACKNOWLEDGEMENT_STICKY:ACKNOWLEDGEMENT_NORMAL,(send_notification==TRUE)?1:0,(persistent_comment==TRUE)?1:0,comment_author,comment_data); - break; - - case CMD_START_EXECUTING_SVC_CHECKS: - case CMD_STOP_EXECUTING_SVC_CHECKS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_EXECUTING_SVC_CHECKS;\n",current_time,(cmd==CMD_START_EXECUTING_SVC_CHECKS)?"START":"STOP"); -- break; -- - case CMD_START_ACCEPTING_PASSIVE_SVC_CHECKS: - case CMD_STOP_ACCEPTING_PASSIVE_SVC_CHECKS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_ACCEPTING_PASSIVE_SVC_CHECKS;\n",current_time,(cmd==CMD_START_ACCEPTING_PASSIVE_SVC_CHECKS)?"START":"STOP"); -+ result = cmd_submitf(cmd,""); - break; - - case CMD_ENABLE_PASSIVE_SVC_CHECKS: - case CMD_DISABLE_PASSIVE_SVC_CHECKS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_PASSIVE_SVC_CHECKS;%s;%s\n",current_time,(cmd==CMD_ENABLE_PASSIVE_SVC_CHECKS)?"ENABLE":"DISABLE",host_name,service_desc); -+ result = cmd_submitf(cmd,"%s;%s",host_name,service_desc); - break; -- -+ - case CMD_ENABLE_EVENT_HANDLERS: - case CMD_DISABLE_EVENT_HANDLERS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_EVENT_HANDLERS;\n",current_time,(cmd==CMD_ENABLE_EVENT_HANDLERS)?"ENABLE":"DISABLE"); -+ result = cmd_submitf(cmd,""); - break; - - case CMD_ENABLE_SVC_EVENT_HANDLER: - case CMD_DISABLE_SVC_EVENT_HANDLER: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_SVC_EVENT_HANDLER;%s;%s\n",current_time,(cmd==CMD_ENABLE_SVC_EVENT_HANDLER)?"ENABLE":"DISABLE",host_name,service_desc); -+ result = cmd_submitf(cmd,"%s;%s",host_name,service_desc); - break; -- -+ - case CMD_ENABLE_HOST_EVENT_HANDLER: - case CMD_DISABLE_HOST_EVENT_HANDLER: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_HOST_EVENT_HANDLER;%s\n",current_time,(cmd==CMD_ENABLE_HOST_EVENT_HANDLER)?"ENABLE":"DISABLE",host_name); -- break; -- - case CMD_ENABLE_HOST_CHECK: - case CMD_DISABLE_HOST_CHECK: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_HOST_CHECK;%s\n",current_time,(cmd==CMD_ENABLE_HOST_CHECK)?"ENABLE":"DISABLE",host_name); -+ result = cmd_submitf(cmd,"%s",host_name); - break; -- -+ - case CMD_START_OBSESSING_OVER_SVC_CHECKS: - case CMD_STOP_OBSESSING_OVER_SVC_CHECKS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_OBSESSING_OVER_SVC_CHECKS;\n",current_time,(cmd==CMD_START_OBSESSING_OVER_SVC_CHECKS)?"START":"STOP"); -+ result = cmd_submitf(cmd,""); - break; -- -+ - case CMD_REMOVE_HOST_ACKNOWLEDGEMENT: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] REMOVE_HOST_ACKNOWLEDGEMENT;%s\n",current_time,host_name); -+ result = cmd_submitf(cmd,"%s",host_name); - break; -- -+ - case CMD_REMOVE_SVC_ACKNOWLEDGEMENT: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] REMOVE_SVC_ACKNOWLEDGEMENT;%s;%s\n",current_time,host_name,service_desc); -+ result = cmd_submitf(cmd,"%s;%s",host_name,service_desc); - break; -- -+ - case CMD_PROCESS_SERVICE_CHECK_RESULT: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] PROCESS_SERVICE_CHECK_RESULT;%s;%s;%d;%s|%s\n",current_time,host_name,service_desc,plugin_state,plugin_output,performance_data); -+ result = cmd_submitf(cmd,"%s;%s;%d;%s|%s",host_name,service_desc,plugin_state,plugin_output,performance_data); - break; -- -+ - case CMD_PROCESS_HOST_CHECK_RESULT: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] PROCESS_HOST_CHECK_RESULT;%s;%d;%s|%s\n",current_time,host_name,plugin_state,plugin_output,performance_data); -+ result = cmd_submitf(cmd,"%s;%d;%s|%s",host_name,plugin_state,plugin_output,performance_data); - break; -- -+ - case CMD_SCHEDULE_HOST_DOWNTIME: - if(child_options==1) -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] SCHEDULE_AND_PROPAGATE_TRIGGERED_HOST_DOWNTIME;%s;%lu;%lu;%d;%lu;%lu;%s;%s\n",current_time,host_name,start_time,end_time,(fixed==TRUE)?1:0,triggered_by,duration,comment_author,comment_data); -+ cmd = CMD_SCHEDULE_AND_PROPAGATE_TRIGGERED_HOST_DOWNTIME; - else if(child_options==2) -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] SCHEDULE_AND_PROPAGATE_HOST_DOWNTIME;%s;%lu;%lu;%d;%lu;%lu;%s;%s\n",current_time,host_name,start_time,end_time,(fixed==TRUE)?1:0,triggered_by,duration,comment_author,comment_data); -- else -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] SCHEDULE_HOST_DOWNTIME;%s;%lu;%lu;%d;%lu;%lu;%s;%s\n",current_time,host_name,start_time,end_time,(fixed==TRUE)?1:0,triggered_by,duration,comment_author,comment_data); -+ cmd = CMD_SCHEDULE_AND_PROPAGATE_HOST_DOWNTIME; -+ result = cmd_submitf(cmd,"%s;%lu;%lu;%d;%lu;%lu;%s;%s",host_name,start_time,end_time,(fixed==TRUE)?1:0,triggered_by,duration,comment_author,comment_data); - break; -- -+ - case CMD_SCHEDULE_SVC_DOWNTIME: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] SCHEDULE_SVC_DOWNTIME;%s;%s;%lu;%lu;%d;%lu;%lu;%s;%s\n",current_time,host_name,service_desc,start_time,end_time,(fixed==TRUE)?1:0,triggered_by,duration,comment_author,comment_data); -+ result = cmd_submitf(cmd,"%s;%s;%lu;%lu;%d;%lu;%lu;%s;%s",host_name,service_desc,start_time,end_time,(fixed==TRUE)?1:0,triggered_by,duration,comment_author,comment_data); - break; -- -+ - case CMD_ENABLE_HOST_FLAP_DETECTION: - case CMD_DISABLE_HOST_FLAP_DETECTION: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_HOST_FLAP_DETECTION;%s\n",current_time,(cmd==CMD_ENABLE_HOST_FLAP_DETECTION)?"ENABLE":"DISABLE",host_name); -+ result = cmd_submitf(cmd,"%s",host_name); - break; -- -+ - case CMD_ENABLE_SVC_FLAP_DETECTION: - case CMD_DISABLE_SVC_FLAP_DETECTION: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_SVC_FLAP_DETECTION;%s;%s\n",current_time,(cmd==CMD_ENABLE_SVC_FLAP_DETECTION)?"ENABLE":"DISABLE",host_name,service_desc); -+ result = cmd_submitf(cmd,"%s;%s",host_name,service_desc); - break; -- -+ - case CMD_ENABLE_FLAP_DETECTION: - case CMD_DISABLE_FLAP_DETECTION: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_FLAP_DETECTION\n",current_time,(cmd==CMD_ENABLE_FLAP_DETECTION)?"ENABLE":"DISABLE"); -+ result = cmd_submitf(cmd,""); - break; -- -+ - case CMD_DEL_HOST_DOWNTIME: - case CMD_DEL_SVC_DOWNTIME: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] DEL_%s_DOWNTIME;%lu\n",current_time,(cmd==CMD_DEL_HOST_DOWNTIME)?"HOST":"SVC",downtime_id); -+ result = cmd_submitf(cmd,"%lu",downtime_id); - break; - - case CMD_ENABLE_FAILURE_PREDICTION: - case CMD_DISABLE_FAILURE_PREDICTION: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_FAILURE_PREDICTION\n",current_time,(cmd==CMD_ENABLE_FAILURE_PREDICTION)?"ENABLE":"DISABLE"); -- break; -- - case CMD_ENABLE_PERFORMANCE_DATA: - case CMD_DISABLE_PERFORMANCE_DATA: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_PERFORMANCE_DATA\n",current_time,(cmd==CMD_ENABLE_PERFORMANCE_DATA)?"ENABLE":"DISABLE"); -- break; -- - case CMD_START_EXECUTING_HOST_CHECKS: - case CMD_STOP_EXECUTING_HOST_CHECKS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_EXECUTING_HOST_CHECKS;\n",current_time,(cmd==CMD_START_EXECUTING_HOST_CHECKS)?"START":"STOP"); -- break; -- - case CMD_START_ACCEPTING_PASSIVE_HOST_CHECKS: - case CMD_STOP_ACCEPTING_PASSIVE_HOST_CHECKS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_ACCEPTING_PASSIVE_HOST_CHECKS;\n",current_time,(cmd==CMD_START_ACCEPTING_PASSIVE_HOST_CHECKS)?"START":"STOP"); -+ result = cmd_submitf(cmd,""); - break; - - case CMD_ENABLE_PASSIVE_HOST_CHECKS: - case CMD_DISABLE_PASSIVE_HOST_CHECKS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_PASSIVE_HOST_CHECKS;%s\n",current_time,(cmd==CMD_ENABLE_PASSIVE_HOST_CHECKS)?"ENABLE":"DISABLE",host_name); -+ result = cmd_submitf(cmd,"%s",host_name); - break; - - case CMD_START_OBSESSING_OVER_HOST_CHECKS: - case CMD_STOP_OBSESSING_OVER_HOST_CHECKS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_OBSESSING_OVER_HOST_CHECKS;\n",current_time,(cmd==CMD_START_OBSESSING_OVER_HOST_CHECKS)?"START":"STOP"); -+ result = cmd_submitf(cmd,""); - break; - - case CMD_SCHEDULE_HOST_CHECK: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] SCHEDULE_%sHOST_CHECK;%s;%lu\n",current_time,(force_check==TRUE)?"FORCED_":"",host_name,start_time); -+ if (force_check==TRUE) -+ cmd = CMD_SCHEDULE_FORCED_HOST_CHECK; -+ result = cmd_submitf(cmd,"%s;%lu",host_name,start_time); - break; - - case CMD_START_OBSESSING_OVER_SVC: - case CMD_STOP_OBSESSING_OVER_SVC: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_OBSESSING_OVER_SVC;%s;%s\n",current_time,(cmd==CMD_START_OBSESSING_OVER_SVC)?"START":"STOP",host_name,service_desc); -+ result = cmd_submitf(cmd,"%s;%s",host_name,service_desc); - break; - - case CMD_START_OBSESSING_OVER_HOST: - case CMD_STOP_OBSESSING_OVER_HOST: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_OBSESSING_OVER_HOST;%s\n",current_time,(cmd==CMD_START_OBSESSING_OVER_HOST)?"START":"STOP",host_name); -+ result = cmd_submitf(cmd,"%s",host_name); - break; - - -@@ -2084,34 +2092,31 @@ int commit_command(int cmd){ - - case CMD_ENABLE_HOSTGROUP_SVC_NOTIFICATIONS: - case CMD_DISABLE_HOSTGROUP_SVC_NOTIFICATIONS: -- if(affect_host_and_services==FALSE) -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_HOSTGROUP_SVC_NOTIFICATIONS;%s\n",current_time,(cmd==CMD_ENABLE_HOSTGROUP_SVC_NOTIFICATIONS)?"ENABLE":"DISABLE",hostgroup_name); -- else -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_HOSTGROUP_SVC_NOTIFICATIONS;%s\n[%lu] %s_HOSTGROUP_HOST_NOTIFICATIONS;%s\n",current_time,(cmd==CMD_ENABLE_HOSTGROUP_SVC_NOTIFICATIONS)?"ENABLE":"DISABLE",hostgroup_name,current_time,(cmd==CMD_ENABLE_HOSTGROUP_SVC_NOTIFICATIONS)?"ENABLE":"DISABLE",hostgroup_name); -+ result = cmd_submitf(cmd,"%s",hostgroup_name); -+ if(affect_host_and_services==TRUE) -+ result |= cmd_submitf((cmd==CMD_ENABLE_HOSTGROUP_SVC_NOTIFICATIONS?CMD_ENABLE_HOSTGROUP_HOST_NOTIFICATIONS:CMD_DISABLE_HOSTGROUP_HOST_NOTIFICATIONS),"%s",hostgroup_name); - break; - - case CMD_ENABLE_HOSTGROUP_HOST_NOTIFICATIONS: - case CMD_DISABLE_HOSTGROUP_HOST_NOTIFICATIONS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_HOSTGROUP_HOST_NOTIFICATIONS;%s\n",current_time,(cmd==CMD_ENABLE_HOSTGROUP_HOST_NOTIFICATIONS)?"ENABLE":"DISABLE",hostgroup_name); -+ result = cmd_submitf(cmd,"%s",hostgroup_name); - break; - - case CMD_ENABLE_HOSTGROUP_SVC_CHECKS: - case CMD_DISABLE_HOSTGROUP_SVC_CHECKS: -- if(affect_host_and_services==FALSE) -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_HOSTGROUP_SVC_CHECKS;%s\n",current_time,(cmd==CMD_ENABLE_HOSTGROUP_SVC_CHECKS)?"ENABLE":"DISABLE",hostgroup_name); -- else -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_HOSTGROUP_SVC_CHECKS;%s\n[%lu] %s_HOSTGROUP_HOST_CHECKS;%s\n",current_time,(cmd==CMD_ENABLE_HOSTGROUP_SVC_CHECKS)?"ENABLE":"DISABLE",hostgroup_name,current_time,(cmd==CMD_ENABLE_HOSTGROUP_SVC_CHECKS)?"ENABLE":"DISABLE",hostgroup_name); -+ result = cmd_submitf(cmd,"%s",hostgroup_name); -+ if(affect_host_and_services==TRUE) -+ result |= cmd_submitf((cmd==CMD_ENABLE_HOSTGROUP_SVC_CHECKS?CMD_ENABLE_HOSTGROUP_HOST_CHECKS:CMD_DISABLE_HOSTGROUP_HOST_CHECKS),"%s",hostgroup_name); - break; - - case CMD_SCHEDULE_HOSTGROUP_HOST_DOWNTIME: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] SCHEDULE_HOSTGROUP_HOST_DOWNTIME;%s;%lu;%lu;%d;0;%lu;%s;%s\n",current_time,hostgroup_name,start_time,end_time,(fixed==TRUE)?1:0,duration,comment_author,comment_data); -+ result = cmd_submitf(cmd,"%s;%lu;%lu;%d;0;%lu;%s;%s",hostgroup_name,start_time,end_time,(fixed==TRUE)?1:0,duration,comment_author,comment_data); - break; - - case CMD_SCHEDULE_HOSTGROUP_SVC_DOWNTIME: -- if(affect_host_and_services==FALSE) -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] SCHEDULE_HOSTGROUP_SVC_DOWNTIME;%s;%lu;%lu;%d;0;%lu;%s;%s\n",current_time,hostgroup_name,start_time,end_time,(fixed==TRUE)?1:0,duration,comment_author,comment_data); -- else -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] SCHEDULE_HOSTGROUP_SVC_DOWNTIME;%s;%lu;%lu;%d;0;%lu;%s;%s\n[%lu] SCHEDULE_HOSTGROUP_HOST_DOWNTIME;%s;%lu;%lu;%d;%lu;%s;%s\n",current_time,hostgroup_name,start_time,end_time,(fixed==TRUE)?1:0,duration,comment_author,comment_data,current_time,hostgroup_name,start_time,end_time,(fixed==TRUE)?1:0,duration,comment_author,comment_data); -+ result = cmd_submitf(cmd,"%s;%lu;%lu;%d;0;%lu;%s;%s",hostgroup_name,start_time,end_time,(fixed==TRUE)?1:0,duration,comment_author,comment_data); -+ if(affect_host_and_services==TRUE) -+ result |= cmd_submitf(CMD_SCHEDULE_HOSTGROUP_HOST_DOWNTIME,"%s;%lu;%lu;%d;%lu;%s;%s",hostgroup_name,start_time,end_time,(fixed==TRUE)?1:0,duration,comment_author,comment_data); - break; - - -@@ -2119,34 +2124,31 @@ int commit_command(int cmd){ - - case CMD_ENABLE_SERVICEGROUP_SVC_NOTIFICATIONS: - case CMD_DISABLE_SERVICEGROUP_SVC_NOTIFICATIONS: -- if(affect_host_and_services==FALSE) -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_SERVICEGROUP_SVC_NOTIFICATIONS;%s\n",current_time,(cmd==CMD_ENABLE_SERVICEGROUP_SVC_NOTIFICATIONS)?"ENABLE":"DISABLE",servicegroup_name); -- else -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_SERVICEGROUP_SVC_NOTIFICATIONS;%s\n[%lu] %s_SERVICEGROUP_HOST_NOTIFICATIONS;%s\n",current_time,(cmd==CMD_ENABLE_SERVICEGROUP_SVC_NOTIFICATIONS)?"ENABLE":"DISABLE",servicegroup_name,current_time,(cmd==CMD_ENABLE_SERVICEGROUP_SVC_NOTIFICATIONS)?"ENABLE":"DISABLE",servicegroup_name); -+ result = cmd_submitf(cmd,"%s",servicegroup_name); -+ if(affect_host_and_services==TRUE) -+ result |= cmd_submitf((cmd==CMD_ENABLE_SERVICEGROUP_SVC_NOTIFICATIONS?CMD_ENABLE_SERVICEGROUP_HOST_NOTIFICATIONS:CMD_DISABLE_SERVICEGROUP_HOST_NOTIFICATIONS),"%s",servicegroup_name); - break; - - case CMD_ENABLE_SERVICEGROUP_HOST_NOTIFICATIONS: - case CMD_DISABLE_SERVICEGROUP_HOST_NOTIFICATIONS: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_SERVICEGROUP_HOST_NOTIFICATIONS;%s\n",current_time,(cmd==CMD_ENABLE_SERVICEGROUP_HOST_NOTIFICATIONS)?"ENABLE":"DISABLE",servicegroup_name); -+ result = cmd_submitf(cmd,"%s",servicegroup_name); - break; - - case CMD_ENABLE_SERVICEGROUP_SVC_CHECKS: - case CMD_DISABLE_SERVICEGROUP_SVC_CHECKS: -- if(affect_host_and_services==FALSE) -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_SERVICEGROUP_SVC_CHECKS;%s\n",current_time,(cmd==CMD_ENABLE_SERVICEGROUP_SVC_CHECKS)?"ENABLE":"DISABLE",servicegroup_name); -- else -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] %s_SERVICEGROUP_SVC_CHECKS;%s\n[%lu] %s_SERVICEGROUP_HOST_CHECKS;%s\n",current_time,(cmd==CMD_ENABLE_SERVICEGROUP_SVC_CHECKS)?"ENABLE":"DISABLE",servicegroup_name,current_time,(cmd==CMD_ENABLE_SERVICEGROUP_SVC_CHECKS)?"ENABLE":"DISABLE",servicegroup_name); -+ result = cmd_submitf(cmd,"%s",servicegroup_name); -+ if(affect_host_and_services==TRUE) -+ result |= cmd_submitf((cmd==CMD_ENABLE_SERVICEGROUP_SVC_CHECKS?CMD_ENABLE_SERVICEGROUP_HOST_CHECKS:CMD_DISABLE_SERVICEGROUP_HOST_CHECKS),"%s",servicegroup_name); - break; - - case CMD_SCHEDULE_SERVICEGROUP_HOST_DOWNTIME: -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] SCHEDULE_SERVICEGROUP_HOST_DOWNTIME;%s;%lu;%lu;%d;0;%lu;%s;%s\n",current_time,servicegroup_name,start_time,end_time,(fixed==TRUE)?1:0,duration,comment_author,comment_data); -+ result = cmd_submitf(cmd,"%s;%lu;%lu;%d;0;%lu;%s;%s",servicegroup_name,start_time,end_time,(fixed==TRUE)?1:0,duration,comment_author,comment_data); - break; - - case CMD_SCHEDULE_SERVICEGROUP_SVC_DOWNTIME: -- if(affect_host_and_services==FALSE) -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] SCHEDULE_SERVICEGROUP_SVC_DOWNTIME;%s;%lu;%lu;%d;0;%lu;%s;%s\n",current_time,servicegroup_name,start_time,end_time,(fixed==TRUE)?1:0,duration,comment_author,comment_data); -- else -- snprintf(command_buffer,sizeof(command_buffer)-1,"[%lu] SCHEDULE_SERVICEGROUP_SVC_DOWNTIME;%s;%lu;%lu;%d;0;%lu;%s;%s\n[%lu] SCHEDULE_SERVICEGROUP_HOST_DOWNTIME;%s;%lu;%lu;%d;%lu;%s;%s\n",current_time,servicegroup_name,start_time,end_time,(fixed==TRUE)?1:0,duration,comment_author,comment_data,current_time,servicegroup_name,start_time,end_time,(fixed==TRUE)?1:0,duration,comment_author,comment_data); -+ result = cmd_submitf(cmd,"%s;%lu;%lu;%d;0;%lu;%s;%s",servicegroup_name,start_time,end_time,(fixed==TRUE)?1:0,duration,comment_author,comment_data); -+ if(affect_host_and_services==TRUE) -+ result |= cmd_submitf(CMD_SCHEDULE_SERVICEGROUP_HOST_DOWNTIME,"%s;%lu;%lu;%d;%lu;%s;%s",servicegroup_name,start_time,end_time,(fixed==TRUE)?1:0,duration,comment_author,comment_data); - break; - - default: -@@ -2154,12 +2156,6 @@ int commit_command(int cmd){ - break; - } - -- /* make sure command buffer is terminated */ -- command_buffer[sizeof(command_buffer)-1]='\x0'; -- -- /* write the command to the command file */ -- result=write_command_to_file(command_buffer); -- - return result; - } - -@@ -2170,6 +2166,14 @@ int write_command_to_file(char *cmd){ - FILE *fp; - struct stat statbuf; - -+ /* -+ * Commands are not allowed to have newlines in them, as -+ * that allows malicious users to hand-craft requests that -+ * bypass the access-restrictions. -+ */ -+ if (!cmd || !*cmd || strchr(cmd, '\n')) -+ return ERROR; -+ - /* bail out if the external command file doesn't exist */ - if(stat(command_file,&statbuf)){ - -@@ -2202,7 +2206,7 @@ int write_command_to_file(char *cmd){ - } - - /* write the command to file */ -- fputs(cmd,fp); -+ fprintf(fp, "%s\n", cmd); - - /* flush buffer */ - fflush(fp); -@@ -2728,3 +2732,182 @@ int string_to_time(char *buffer, time_t *t){ - - return OK; - } -+ -+/* From Nagios 3.0.5, cgi/extcmd_list.c */ -+ -+#include <stdio.h> -+#include <unistd.h> -+#include <stdlib.h> -+#include "../include/common.h" -+ -+struct nagios_extcmd { -+ const char *name; -+ int id; -+/* size_t namelen; -+ int min_args; -+ int (*handler)(struct nagios_extcmd *, int, char **); -+ struct nagios_extcmd *next_handler; -+ */ -+}; -+ -+#define CMD_DEF(name, min_args, handler) \ -+ { #name, CMD_ ## name } -+/* { #name, sizeof(#name) - 1, CMD_ ## name, min_args, handler, NULL } */ -+struct nagios_extcmd in_core_commands[] = -+{ -+ CMD_DEF(NONE, 0, NULL), -+ CMD_DEF(ADD_HOST_COMMENT, 0, NULL), -+ CMD_DEF(DEL_HOST_COMMENT, 0, NULL), -+ CMD_DEF(ADD_SVC_COMMENT, 0, NULL), -+ CMD_DEF(DEL_SVC_COMMENT, 0, NULL), -+ CMD_DEF(ENABLE_SVC_CHECK, 0, NULL), -+ CMD_DEF(DISABLE_SVC_CHECK, 0, NULL), -+ CMD_DEF(SCHEDULE_SVC_CHECK, 0, NULL), -+ CMD_DEF(DELAY_SVC_NOTIFICATION, 0, NULL), -+ CMD_DEF(DELAY_HOST_NOTIFICATION, 0, NULL), -+ CMD_DEF(DISABLE_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(ENABLE_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(RESTART_PROCESS, 0, NULL), -+ CMD_DEF(SHUTDOWN_PROCESS, 0, NULL), -+ CMD_DEF(ENABLE_HOST_SVC_CHECKS, 0, NULL), -+ CMD_DEF(DISABLE_HOST_SVC_CHECKS, 0, NULL), -+ CMD_DEF(SCHEDULE_HOST_SVC_CHECKS, 0, NULL), -+ CMD_DEF(DELAY_HOST_SVC_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(DEL_ALL_HOST_COMMENTS, 0, NULL), -+ CMD_DEF(DEL_ALL_SVC_COMMENTS, 0, NULL), -+ CMD_DEF(ENABLE_SVC_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(DISABLE_SVC_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(ENABLE_HOST_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(DISABLE_HOST_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(ENABLE_ALL_NOTIFICATIONS_BEYOND_HOST, 0, NULL), -+ CMD_DEF(DISABLE_ALL_NOTIFICATIONS_BEYOND_HOST, 0, NULL), -+ CMD_DEF(ENABLE_HOST_SVC_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(DISABLE_HOST_SVC_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(PROCESS_SERVICE_CHECK_RESULT, 0, NULL), -+ CMD_DEF(SAVE_STATE_INFORMATION, 0, NULL), -+ CMD_DEF(READ_STATE_INFORMATION, 0, NULL), -+ CMD_DEF(ACKNOWLEDGE_HOST_PROBLEM, 0, NULL), -+ CMD_DEF(ACKNOWLEDGE_SVC_PROBLEM, 0, NULL), -+ CMD_DEF(START_EXECUTING_SVC_CHECKS, 0, NULL), -+ CMD_DEF(STOP_EXECUTING_SVC_CHECKS, 0, NULL), -+ CMD_DEF(START_ACCEPTING_PASSIVE_SVC_CHECKS, 0, NULL), -+ CMD_DEF(STOP_ACCEPTING_PASSIVE_SVC_CHECKS, 0, NULL), -+ CMD_DEF(ENABLE_PASSIVE_SVC_CHECKS, 0, NULL), -+ CMD_DEF(DISABLE_PASSIVE_SVC_CHECKS, 0, NULL), -+ CMD_DEF(ENABLE_EVENT_HANDLERS, 0, NULL), -+ CMD_DEF(DISABLE_EVENT_HANDLERS, 0, NULL), -+ CMD_DEF(ENABLE_HOST_EVENT_HANDLER, 0, NULL), -+ CMD_DEF(DISABLE_HOST_EVENT_HANDLER, 0, NULL), -+ CMD_DEF(ENABLE_SVC_EVENT_HANDLER, 0, NULL), -+ CMD_DEF(DISABLE_SVC_EVENT_HANDLER, 0, NULL), -+ CMD_DEF(ENABLE_HOST_CHECK, 0, NULL), -+ CMD_DEF(DISABLE_HOST_CHECK, 0, NULL), -+ CMD_DEF(START_OBSESSING_OVER_SVC_CHECKS, 0, NULL), -+ CMD_DEF(STOP_OBSESSING_OVER_SVC_CHECKS, 0, NULL), -+ CMD_DEF(REMOVE_HOST_ACKNOWLEDGEMENT, 0, NULL), -+ CMD_DEF(REMOVE_SVC_ACKNOWLEDGEMENT, 0, NULL), -+ CMD_DEF(SCHEDULE_FORCED_HOST_SVC_CHECKS, 0, NULL), -+ CMD_DEF(SCHEDULE_FORCED_SVC_CHECK, 0, NULL), -+ CMD_DEF(SCHEDULE_HOST_DOWNTIME, 0, NULL), -+ CMD_DEF(SCHEDULE_SVC_DOWNTIME, 0, NULL), -+ CMD_DEF(ENABLE_HOST_FLAP_DETECTION, 0, NULL), -+ CMD_DEF(DISABLE_HOST_FLAP_DETECTION, 0, NULL), -+ CMD_DEF(ENABLE_SVC_FLAP_DETECTION, 0, NULL), -+ CMD_DEF(DISABLE_SVC_FLAP_DETECTION, 0, NULL), -+ CMD_DEF(ENABLE_FLAP_DETECTION, 0, NULL), -+ CMD_DEF(DISABLE_FLAP_DETECTION, 0, NULL), -+ CMD_DEF(ENABLE_HOSTGROUP_SVC_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(DISABLE_HOSTGROUP_SVC_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(ENABLE_HOSTGROUP_HOST_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(DISABLE_HOSTGROUP_HOST_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(ENABLE_HOSTGROUP_SVC_CHECKS, 0, NULL), -+ CMD_DEF(DISABLE_HOSTGROUP_SVC_CHECKS, 0, NULL), -+ CMD_DEF(CANCEL_HOST_DOWNTIME, 0, NULL), -+ CMD_DEF(CANCEL_SVC_DOWNTIME, 0, NULL), -+ CMD_DEF(CANCEL_ACTIVE_HOST_DOWNTIME, 0, NULL), -+ CMD_DEF(CANCEL_PENDING_HOST_DOWNTIME, 0, NULL), -+ CMD_DEF(CANCEL_ACTIVE_SVC_DOWNTIME, 0, NULL), -+ CMD_DEF(CANCEL_PENDING_SVC_DOWNTIME, 0, NULL), -+ CMD_DEF(CANCEL_ACTIVE_HOST_SVC_DOWNTIME, 0, NULL), -+ CMD_DEF(CANCEL_PENDING_HOST_SVC_DOWNTIME, 0, NULL), -+ CMD_DEF(FLUSH_PENDING_COMMANDS, 0, NULL), -+ CMD_DEF(DEL_HOST_DOWNTIME, 0, NULL), -+ CMD_DEF(DEL_SVC_DOWNTIME, 0, NULL), -+ CMD_DEF(ENABLE_FAILURE_PREDICTION, 0, NULL), -+ CMD_DEF(DISABLE_FAILURE_PREDICTION, 0, NULL), -+ CMD_DEF(ENABLE_PERFORMANCE_DATA, 0, NULL), -+ CMD_DEF(DISABLE_PERFORMANCE_DATA, 0, NULL), -+ CMD_DEF(SCHEDULE_HOSTGROUP_HOST_DOWNTIME, 0, NULL), -+ CMD_DEF(SCHEDULE_HOSTGROUP_SVC_DOWNTIME, 0, NULL), -+ CMD_DEF(SCHEDULE_HOST_SVC_DOWNTIME, 0, NULL), -+ CMD_DEF(PROCESS_HOST_CHECK_RESULT, 0, NULL), -+ CMD_DEF(START_EXECUTING_HOST_CHECKS, 0, NULL), -+ CMD_DEF(STOP_EXECUTING_HOST_CHECKS, 0, NULL), -+ CMD_DEF(START_ACCEPTING_PASSIVE_HOST_CHECKS, 0, NULL), -+ CMD_DEF(STOP_ACCEPTING_PASSIVE_HOST_CHECKS, 0, NULL), -+ CMD_DEF(ENABLE_PASSIVE_HOST_CHECKS, 0, NULL), -+ CMD_DEF(DISABLE_PASSIVE_HOST_CHECKS, 0, NULL), -+ CMD_DEF(START_OBSESSING_OVER_HOST_CHECKS, 0, NULL), -+ CMD_DEF(STOP_OBSESSING_OVER_HOST_CHECKS, 0, NULL), -+ CMD_DEF(SCHEDULE_HOST_CHECK, 0, NULL), -+ CMD_DEF(SCHEDULE_FORCED_HOST_CHECK, 0, NULL), -+ CMD_DEF(START_OBSESSING_OVER_SVC, 0, NULL), -+ CMD_DEF(STOP_OBSESSING_OVER_SVC, 0, NULL), -+ CMD_DEF(START_OBSESSING_OVER_HOST, 0, NULL), -+ CMD_DEF(STOP_OBSESSING_OVER_HOST, 0, NULL), -+ CMD_DEF(ENABLE_HOSTGROUP_HOST_CHECKS, 0, NULL), -+ CMD_DEF(DISABLE_HOSTGROUP_HOST_CHECKS, 0, NULL), -+ CMD_DEF(ENABLE_HOSTGROUP_PASSIVE_SVC_CHECKS, 0, NULL), -+ CMD_DEF(DISABLE_HOSTGROUP_PASSIVE_SVC_CHECKS, 0, NULL), -+ CMD_DEF(ENABLE_HOSTGROUP_PASSIVE_HOST_CHECKS, 0, NULL), -+ CMD_DEF(DISABLE_HOSTGROUP_PASSIVE_HOST_CHECKS, 0, NULL), -+ CMD_DEF(ENABLE_SERVICEGROUP_SVC_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(DISABLE_SERVICEGROUP_SVC_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(ENABLE_SERVICEGROUP_HOST_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(DISABLE_SERVICEGROUP_HOST_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(ENABLE_SERVICEGROUP_SVC_CHECKS, 0, NULL), -+ CMD_DEF(DISABLE_SERVICEGROUP_SVC_CHECKS, 0, NULL), -+ CMD_DEF(ENABLE_SERVICEGROUP_HOST_CHECKS, 0, NULL), -+ CMD_DEF(DISABLE_SERVICEGROUP_HOST_CHECKS, 0, NULL), -+ CMD_DEF(ENABLE_SERVICEGROUP_PASSIVE_SVC_CHECKS, 0, NULL), -+ CMD_DEF(DISABLE_SERVICEGROUP_PASSIVE_SVC_CHECKS, 0, NULL), -+ CMD_DEF(ENABLE_SERVICEGROUP_PASSIVE_HOST_CHECKS, 0, NULL), -+ CMD_DEF(DISABLE_SERVICEGROUP_PASSIVE_HOST_CHECKS, 0, NULL), -+ CMD_DEF(SCHEDULE_SERVICEGROUP_HOST_DOWNTIME, 0, NULL), -+ CMD_DEF(SCHEDULE_SERVICEGROUP_SVC_DOWNTIME, 0, NULL), -+ CMD_DEF(CHANGE_NORMAL_HOST_CHECK_INTERVAL, 0, NULL), -+ CMD_DEF(CHANGE_NORMAL_SVC_CHECK_INTERVAL, 0, NULL), -+ CMD_DEF(CHANGE_RETRY_SVC_CHECK_INTERVAL, 0, NULL), -+ CMD_DEF(CHANGE_MAX_HOST_CHECK_ATTEMPTS, 0, NULL), -+ CMD_DEF(CHANGE_MAX_SVC_CHECK_ATTEMPTS, 0, NULL), -+ CMD_DEF(SCHEDULE_AND_PROPAGATE_TRIGGERED_HOST_DOWNTIME, 0, NULL), -+ CMD_DEF(ENABLE_HOST_AND_CHILD_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(DISABLE_HOST_AND_CHILD_NOTIFICATIONS, 0, NULL), -+ CMD_DEF(SCHEDULE_AND_PROPAGATE_HOST_DOWNTIME, 0, NULL), -+ CMD_DEF(ENABLE_SERVICE_FRESHNESS_CHECKS, 0, NULL), -+ CMD_DEF(DISABLE_SERVICE_FRESHNESS_CHECKS, 0, NULL), -+ CMD_DEF(ENABLE_HOST_FRESHNESS_CHECKS, 0, NULL), -+ CMD_DEF(DISABLE_HOST_FRESHNESS_CHECKS, 0, NULL), -+ CMD_DEF(SET_HOST_NOTIFICATION_NUMBER, 0, NULL), -+ CMD_DEF(SET_SVC_NOTIFICATION_NUMBER, 0, NULL), -+}; -+#undef CMD_DEF -+ -+#ifndef ARRAY_SIZE -+# define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) -+#endif -+static int extcmd_entries, extcmd_slots; -+ -+const char *extcmd_get_name(int id) -+{ -+ int i; -+ -+ for (i = 0; i < ARRAY_SIZE(in_core_commands); i++) { -+ struct nagios_extcmd *ecmd; -+ ecmd = &in_core_commands[i]; -+ if (ecmd->id == id) -+ return ecmd->name; -+ } -+ -+ return NULL; -+} -diff --git a/include/common.h b/include/common.h -index 8f4d3cd..d4be718 100644 ---- include/common.h -+++ include/common.h -@@ -383,6 +383,7 @@ - #define MAX_COMMAND_BUFFER 8192 /* max length of raw or processed command line */ - - #define MAX_DATETIME_LENGTH 48 -+#define MAX_EXTERNAL_COMMAND_LENGTH 8192 - - - /************************* MODIFIED ATTRIBUTES **************************/ --- -1.6.0.4 - diff --git a/net-mgmt/nagios2/files/patch-Makefile.in b/net-mgmt/nagios2/files/patch-Makefile.in deleted file mode 100644 index be4f6689afc8..000000000000 --- a/net-mgmt/nagios2/files/patch-Makefile.in +++ /dev/null @@ -1,30 +0,0 @@ ---- Makefile.in.orig Tue Apr 24 01:14:25 2007 -+++ Makefile.in Thu Nov 1 20:08:40 2007 -@@ -186,7 +186,7 @@ - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR) - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)/archives - if [ $(INSTALLPERLSTUFF) = yes ]; then \ -- $(INSTALL) -m 664 $(INSTALL_OPTS) p1.pl $(DESTDIR)$(BINDIR); \ -+ $(INSTALL) -m 644 $(INSTALL_OPTS) p1.pl $(DESTDIR)$(BINDIR); \ - fi; - - @echo "" -@@ -213,12 +213,12 @@ - - - install-config: -- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR) -- $(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 -+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR) -+ $(INSTALL) -m 644 $(INSTALL_OPTS) sample-config/nagios.cfg $(DESTDIR)$(CFGDIR)/nagios.cfg-sample -+ $(INSTALL) -m 644 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg-sample -+ $(INSTALL) -m 644 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg-sample -+ $(INSTALL) -m 644 $(INSTALL_OPTS) sample-config/template-object/localhost.cfg $(DESTDIR)$(CFGDIR)/localhost.cfg-sample -+ $(INSTALL) -m 644 $(INSTALL_OPTS) sample-config/template-object/commands.cfg $(DESTDIR)$(CFGDIR)/commands.cfg-sample - - @echo "" - @echo "*** Sample config file installed ***" diff --git a/net-mgmt/nagios2/files/patch-base-Makefile.in b/net-mgmt/nagios2/files/patch-base-Makefile.in deleted file mode 100644 index 2b8138e62835..000000000000 --- a/net-mgmt/nagios2/files/patch-base-Makefile.in +++ /dev/null @@ -1,15 +0,0 @@ ---- base/Makefile.in.orig Wed May 31 02:01:44 2006 -+++ base/Makefile.in Sat Jun 3 11:09:48 2006 -@@ -188,9 +188,9 @@ - $(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) -+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR) -+ $(INSTALL) -m 755 $(INSTALL_OPTS) @nagios_name@ $(DESTDIR)$(BINDIR) -+ $(INSTALL) -m 755 $(INSTALL_OPTS) @nagiostats_name@ $(DESTDIR)$(BINDIR) - - strip-post-install: - $(STRIP) $(DESTDIR)$(BINDIR)/@nagios_name@ diff --git a/net-mgmt/nagios2/files/patch-base-utils.c b/net-mgmt/nagios2/files/patch-base-utils.c deleted file mode 100644 index 6ef4e98ad12d..000000000000 --- a/net-mgmt/nagios2/files/patch-base-utils.c +++ /dev/null @@ -1,42 +0,0 @@ ---- base/utils.c.orig 2008-02-11 03:50:10.000000000 +1030 -+++ base/utils.c 2009-05-03 11:58:03.000000000 +0930 -@@ -4553,7 +4553,7 @@ - /* initializes embedded perl interpreter */ - int init_embedded_perl(char **env){ - #ifdef EMBEDDEDPERL -- char *embedding[] = { "", "" }; -+ char **embedding = NULL; - int exitstatus = 0; - char buffer[MAX_INPUT_BUFFER]; - int argc = 2; -@@ -4571,6 +4571,21 @@ - - else{ - -+ embedding = malloc(argc * sizeof(char *)); -+ if (embedding == NULL) { -+ use_embedded_perl = FALSE; -+ snprintf(buffer, sizeof(buffer), "Error: Unable to allocate memory for embedded Perl interpreter! (see ports/131993)\n"); -+ buffer[sizeof(buffer) - 1] = '\0'; -+ write_to_logs_and_console(buffer, NSLOG_RUNTIME_ERROR, TRUE); -+ } else { -+ embedding[0] = malloc(sizeof(char)); -+ if (embedding[0] == NULL) { -+ use_embedded_perl = FALSE; -+ snprintf(buffer, sizeof(buffer), "Error: Unable to allocate memory for embedded Perl interpreter! (see ports/131993)\n"); -+ buffer[sizeof(buffer) - 1] = '\0'; -+ write_to_logs_and_console(buffer, NSLOG_RUNTIME_ERROR, TRUE); -+ } else { -+ *embedding[0] = '\0'; - embedding[1]=p1_file; - - use_embedded_perl=TRUE; -@@ -4584,6 +4599,8 @@ - write_to_logs_and_console(buffer,NSLOG_RUNTIME_ERROR,TRUE); - } - } -+ } -+ } - - /* a fatal error occurred... */ - if(use_embedded_perl==FALSE){ diff --git a/net-mgmt/nagios2/files/patch-cgi-Makefile.in b/net-mgmt/nagios2/files/patch-cgi-Makefile.in deleted file mode 100644 index e746d0009c95..000000000000 --- a/net-mgmt/nagios2/files/patch-cgi-Makefile.in +++ /dev/null @@ -1,14 +0,0 @@ ---- cgi/Makefile.in.orig Wed May 31 02:01:44 2006 -+++ cgi/Makefile.in Sat Jun 3 11:14:04 2006 -@@ -198,9 +198,9 @@ - $(MAKE) install-basic - - install-basic: -- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CGIDIR) -+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(CGIDIR) - for file in *.cgi; do \ -- $(INSTALL) -m 775 $(INSTALL_OPTS) $$file $(DESTDIR)$(CGIDIR); \ -+ $(INSTALL) -m 755 $(INSTALL_OPTS) $$file $(DESTDIR)$(CGIDIR); \ - done - - strip-post-install: diff --git a/net-mgmt/nagios2/files/patch-cgi-statuswml.c b/net-mgmt/nagios2/files/patch-cgi-statuswml.c deleted file mode 100644 index 7e6bf8f3ec20..000000000000 --- a/net-mgmt/nagios2/files/patch-cgi-statuswml.c +++ /dev/null @@ -1,53 +0,0 @@ ---- cgi/statuswml.c.orig 2008-05-20 02:34:38.000000000 +0930 -+++ cgi/statuswml.c 2009-07-09 19:59:49.000000000 +0930 -@@ -66,6 +66,8 @@ - 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; -@@ -107,6 +109,13 @@ - - 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){ -@@ -349,6 +358,27 @@ - } - - -+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){ diff --git a/net-mgmt/nagios2/files/patch-configure.in b/net-mgmt/nagios2/files/patch-configure.in deleted file mode 100644 index 7a67b5fb6901..000000000000 --- a/net-mgmt/nagios2/files/patch-configure.in +++ /dev/null @@ -1,62 +0,0 @@ ---- configure.in.orig 2008-03-13 00:31:04.000000000 +1030 -+++ configure.in 2008-03-19 23:58:49.000000000 +1030 -@@ -6,7 +6,6 @@ - - AC_INIT(base/nagios.c) - AC_CONFIG_HEADER(include/config.h include/snprintf.h include/nagios.h include/cgiutils.h) --AC_PREFIX_DEFAULT(/usr/local/nagios) - - PKG_NAME=nagios - PKG_VERSION="2.11" -@@ -60,7 +59,15 @@ - dnl Test for pthreads support - taken from ICU FreeBSD Port configure script - THREADLIBS="" - have_pthreads="no" -+have_thr="no" - -+dnl Prefer libthr(3) over libpthread(3) due to serious process hanging issues -+AC_CHECK_LIB(thr,pthread_create) -+if test $ac_cv_lib_thr_pthread_create = yes; then -+ THREADLIBS="-lthr" -+ have_pthreads="yes" -+ have_thr="yes" -+else - dnl FreeBSD: Try ports/linuxthreads first - Mammad Zadeh <mammad@yahoo-inc.com> - dnl FreeBSD -pthread check - Jonathan McDowell <noodles@earth.li> - AC_DEFUN(AC_PTHREAD_FREEBSD,[ -@@ -121,6 +128,7 @@ - if test $have_pthreads = "no"; then - AC_PTHREAD_FREEBSD - fi -+fi - - AC_SUBST(THREADLIBS) - -@@ -137,7 +145,7 @@ - AC_SUBST(nagios_grp) - AC_DEFINE_UNQUOTED(DEFAULT_NAGIOS_USER,"$nagios_user") - AC_DEFINE_UNQUOTED(DEFAULT_NAGIOS_GROUP,"$nagios_grp") --INSTALL_OPTS="-o $nagios_user -g $nagios_grp" -+INSTALL_OPTS="-o root -g wheel" - AC_SUBST(INSTALL_OPTS) - - AC_ARG_WITH(command_user,--with-command-user=<user> sets user name for command access,command_user=$withval,command_user=$nagios_user) -@@ -170,7 +178,7 @@ - AC_PATH_PROG(MAIL_PROG,mail) - fi - dnl Fix for systems that don't (yet) have mail/mailx installed... --if test x$MAIL_PROG=x; then -+if test x$MAIL_PROG = x; then - MAIL_PROG="/bin/mail" - fi - AC_SUBST(MAIL_PROG) -@@ -599,6 +607,9 @@ - - AC_DEFINE_UNQUOTED(EMBEDDEDPERL) - PERLLIBS="`perl -MExtUtils::Embed -e ldopts`" -+ if test x$have_thr = xyes; then -+ PERLLIBS="`echo $PERLLIBS | sed 's#pthread #lthr #'`" -+ fi - PERLDIR="`perl -MConfig -e 'print $Config{installsitearch}'`" - CFLAGS="${CFLAGS} `perl -MExtUtils::Embed -e ccopts`" - USEPERL=yes diff --git a/net-mgmt/nagios2/files/patch-contrib-Makefile.in b/net-mgmt/nagios2/files/patch-contrib-Makefile.in deleted file mode 100644 index dd80e3019859..000000000000 --- a/net-mgmt/nagios2/files/patch-contrib-Makefile.in +++ /dev/null @@ -1,17 +0,0 @@ ---- contrib/Makefile.in.orig Tue Nov 15 12:19:36 2005 -+++ contrib/Makefile.in Wed Dec 28 17:49:25 2005 -@@ -46,10 +46,10 @@ - devclean: distclean - - install: -- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CGIDIR) -- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR) -- for f in $(CGIS); do $(INSTALL) -m 775 $(INSTALL_OPTS) $$f $(DESTDIR)$(CGIDIR); done -- for f in $(UTILS); do $(INSTALL) -m 775 $(INSTALL_OPTS) $$f $(DESTDIR)$(BINDIR); done -+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(CGIDIR) -+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR) -+ for f in $(CGIS); do $(INSTALL) -m 755 $(INSTALL_OPTS) $$f $(DESTDIR)$(CGIDIR); done -+ for f in $(UTILS); do $(INSTALL) -m 755 $(INSTALL_OPTS) $$f $(DESTDIR)$(BINDIR); done - - ############################################################################## - # rules and dependencies for actual target programs diff --git a/net-mgmt/nagios2/files/patch-html-Makefile.in b/net-mgmt/nagios2/files/patch-html-Makefile.in deleted file mode 100644 index a34e47dc2970..000000000000 --- a/net-mgmt/nagios2/files/patch-html-Makefile.in +++ /dev/null @@ -1,61 +0,0 @@ ---- html/Makefile.in.orig Thu Apr 10 05:46:02 2003 -+++ html/Makefile.in Sat Feb 12 13:53:16 2005 -@@ -33,37 +33,37 @@ - devclean: distclean - - install: -- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR) -- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/media -- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/stylesheets -- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/contexthelp -- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/docs -- $(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)/ssi -- $(INSTALL) -m 664 $(INSTALL_OPTS) robots.txt $(DESTDIR)$(HTMLDIR) -- $(INSTALL) -m 664 $(INSTALL_OPTS) docs/robots.txt $(DESTDIR)$(HTMLDIR)/docs -+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR) -+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/media -+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/stylesheets -+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/contexthelp -+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/docs -+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/docs/images -+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images -+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images/logos -+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/ssi -+ $(INSTALL) -m 644 $(INSTALL_OPTS) robots.txt $(DESTDIR)$(HTMLDIR) -+ $(INSTALL) -m 644 $(INSTALL_OPTS) docs/robots.txt $(DESTDIR)$(HTMLDIR)/docs - for file in *.html; \ -- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR); done -+ do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR); done - for file in media/*.wav; \ -- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/media; done -+ do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/media; done - for file in stylesheets/*.css; \ -- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/stylesheets; done -+ do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/stylesheets; done - for file in contexthelp/*.html; \ -- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/contexthelp; done -+ do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/contexthelp; done - for file in docs/*.html; \ -- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/docs; done -+ do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/docs; done - for file in docs/images/*.*; \ -- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/docs/images; done -+ do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/docs/images; done - for file in images/*.gif; \ -- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done -+ do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done - for file in images/*.jpg; \ -- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done -+ do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done - for file in images/*.png; \ -- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done -+ do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done - for file in images/logos/*.*; \ -- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images/logos; done -+ do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images/logos; done - - - diff --git a/net-mgmt/nagios2/files/patch-html-docs-xodtemplate.html b/net-mgmt/nagios2/files/patch-html-docs-xodtemplate.html deleted file mode 100644 index 156de7c7a396..000000000000 --- a/net-mgmt/nagios2/files/patch-html-docs-xodtemplate.html +++ /dev/null @@ -1,24 +0,0 @@ ---- html/docs/xodtemplate.html.orig Wed Dec 27 05:03:22 2006 -+++ html/docs/xodtemplate.html Sat Jan 27 18:56:48 2007 -@@ -493,9 +493,9 @@ - <p class="SectionBody"> - <pre> - define service{ -- host_name linux-server -- service_description check-disk-sda1 -- check_command check-disk!/dev/sda1 -+ host_name freebsd-server -+ service_description check-disk-ad0s1a -+ check_command check-disk!/dev/ad0s1a - max_check_attempts 5 - normal_check_interval 5 - retry_check_interval 3 -@@ -503,7 +503,7 @@ - notification_interval 30 - notification_period 24x7 - notification_options w,c,r -- contact_groups linux-admins -+ contact_groups freebsd-admins - } - </pre> - </p> diff --git a/net-mgmt/nagios2/files/patch-sample-config-template-object-localhost.cfg.in b/net-mgmt/nagios2/files/patch-sample-config-template-object-localhost.cfg.in deleted file mode 100644 index ff3f25aac049..000000000000 --- a/net-mgmt/nagios2/files/patch-sample-config-template-object-localhost.cfg.in +++ /dev/null @@ -1,36 +0,0 @@ ---- sample-config/template-object/localhost.cfg.in.orig Tue Nov 28 12:59:05 2006 -+++ sample-config/template-object/localhost.cfg.in Sat Jan 27 19:01:52 2007 -@@ -151,15 +151,15 @@ - } - - --# Linux host definition template - This is NOT a real host, just a template! -+# FreeBSD host definition template - This is NOT a real host, just a template! - - define host{ -- name linux-server ; The name of this host template -+ name freebsd-server ; The name of this host template - use generic-host ; This template inherits other values from the generic-host template -- check_period 24x7 ; By default, Linux hosts are checked round the clock -- max_check_attempts 10 ; Check each Linux host 10 times (max) -- check_command check-host-alive ; Default command to check Linux hosts -- notification_period workhours ; Linux admins hate to be woken up, so we only notify during the day -+ check_period 24x7 ; By default, FreeBSD hosts are checked round the clock -+ max_check_attempts 10 ; Check each FreeBSD host 10 times (max) -+ check_command check-host-alive ; Default command to check FreeBSD hosts -+ notification_period workhours ; FreeBSD admins hate to be woken up, so we only notify during the day - ; Note that the notification_period variable is being overridden from - ; the value that is inherited from the generic-host template! - notification_interval 120 ; Resend notification every 2 hours -@@ -173,9 +173,9 @@ - # local host (this machine). - - define host{ -- use linux-server ; Name of host template to use -+ use freebsd-server ; Name of host template to use - ; This host definition will inherit all variables that are defined -- ; in (or inherited by) the linux-server host template definition. -+ ; in (or inherited by) the freebsd-server host template definition. - host_name localhost - alias localhost - address 127.0.0.1 diff --git a/net-mgmt/nagios2/files/pkg-deinstall.in b/net-mgmt/nagios2/files/pkg-deinstall.in deleted file mode 100644 index 6b20aa9bc962..000000000000 --- a/net-mgmt/nagios2/files/pkg-deinstall.in +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -NAGIOSDIR=%%NAGIOSDIR%% -NAGIOSUSER=%%NAGIOSUSER%% -NAGIOSGROUP=%%NAGIOSGROUP%% - -if [ "$2" = "POST-DEINSTALL" ]; then - if /usr/sbin/pw group show "${NAGIOSGROUP}" 2>&1 >/dev/null; then - echo "You should manually remove the \"${NAGIOSGROUP}\" group." - fi - - if /usr/sbin/pw user show "${NAGIOSUSER}" 2>&1 >/dev/null; then - echo "You should manually remove the \"${NAGIOSUSER}\" user." - fi - - if [ -e "${NAGIOSDIR}" ]; then - echo "You should manually remove the \"${NAGIOSDIR}\" directory." - fi -fi diff --git a/net-mgmt/nagios2/files/pkg-install.in b/net-mgmt/nagios2/files/pkg-install.in deleted file mode 100644 index f670f79b45ff..000000000000 --- a/net-mgmt/nagios2/files/pkg-install.in +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -NAGIOSDIR=%%NAGIOSDIR%% -NAGIOSUSER=%%NAGIOSUSER%% -NAGIOSGROUP=%%NAGIOSGROUP%% -NAGIOSUID=%%NAGIOSUID%% -NAGIOSGID=%%NAGIOSGID%% - -ask() { - local question default answer - - question=$1 - default=$2 - if [ -z "${PACKAGE_BUILDING}" ]; then - read -p "${question} [${default}]? " answer - fi - if [ "x${answer}" = "x" ]; then - answer=${default} - fi - echo ${answer} -} - -yesno() { - local default question answer - - question=$1 - default=$2 - while :; do - answer=$(ask "${question}" "${default}") - case "${answer}" in - [Yy][Ee][Ss]|[Yy]) - return 0 - ;; - [Nn][Oo]|[Nn]) - return 1 - ;; - esac - echo "Please answer yes or no." - done -} - -if [ "$2" = "PRE-INSTALL" ]; then - if /usr/sbin/pw group show "${NAGIOSGROUP}" 2>&1 >/dev/null; then - echo "You already have a \"${NAGIOSGROUP}\" group, so I will use it." - else - echo "You need a \"${NAGIOSGROUP}\" group." - if yesno "Would you like me to create it" "YES"; then - /usr/sbin/pw groupadd "${NAGIOSGROUP}" -g "${NAGIOSGID}" -h - || \ - /usr/sbin/pw groupadd "${NAGIOSGROUP}" -h - || exit - echo "Done." - else - echo "Please create the \"${NAGIOSGROUP}\" group manually and try again." - exit 1 - fi - fi - - if /usr/sbin/pw user show "${NAGIOSUSER}" 2>&1 >/dev/null; then - echo "You already have a \"${NAGIOSUSER}\" user, so I will use it." - else - echo "You need a \"${NAGIOSUSER}\" user." - if yesno "Would you like me to create it" "YES"; then - /usr/sbin/pw useradd "${NAGIOSUSER}" -u "${NAGIOSUID}" -g "${NAGIOSGROUP}" -h - -d "${NAGIOSDIR}" \ - -s /sbin/nologin -c "Nagios pseudo-user" || \ - /usr/sbin/pw useradd "${NAGIOSUSER}" -g "${NAGIOSGROUP}" -h - -d "${NAGIOSDIR}" \ - -s /sbin/nologin -c "Nagios pseudo-user" || exit - else - echo "Please create the \"${NAGIOSUSER}\" user manually and try again." - exit 1 - fi - fi -fi diff --git a/net-mgmt/nagios2/files/pkg-message.in b/net-mgmt/nagios2/files/pkg-message.in deleted file mode 100644 index a6cd7784dae3..000000000000 --- a/net-mgmt/nagios2/files/pkg-message.in +++ /dev/null @@ -1,30 +0,0 @@ -********************************************************************** - - Enable Nagios in /etc/rc.conf with the following line: - - nagios_enable="YES" - - Configuration templates are available in %%PREFIX%%/etc/nagios as - *.cfg-sample files. Copy them to *.cfg files where required and - edit to suit your needs. Documentation is available in HTML form - in %%PREFIX%%/%%NAGIOSWWWDIR%%/docs. - - If you don't already have a web server running, you will need to - install and configure one to finish off your Nagios installation. - When used with Apache, the following should be sufficient to publish - the web component of Nagios (modify the allow list to suit): - - <Directory %%PREFIX%%/%%NAGIOSWWWDIR%%> - Order deny,allow - Deny from all - Allow from 127.0.0.1 - </Directory> - - <Directory %%PREFIX%%/%%NAGIOSWWWDIR%%/cgi-bin> - Options ExecCGI - </Directory> - - ScriptAlias %%NAGIOSCGIURL%%/ %%PREFIX%%/%%NAGIOSWWWDIR%%/cgi-bin/ - Alias %%NAGIOSHTMURL%%/ %%PREFIX%%/%%NAGIOSWWWDIR%%/ - -********************************************************************** diff --git a/net-mgmt/nagios2/pkg-descr b/net-mgmt/nagios2/pkg-descr deleted file mode 100644 index b1ff9995e7fc..000000000000 --- a/net-mgmt/nagios2/pkg-descr +++ /dev/null @@ -1,12 +0,0 @@ -Nagios is a host and service monitor designed to inform you of network -problems before your clients, end-users or managers do. It has been -designed to run under the Linux operating system, but works fine under -most *NIX variants as well. The monitoring daemon runs intermittent -checks on hosts and services you specify using external "plugins" -which return status information to Nagios. When problems are -encountered, the daemon can send notifications out to administrative -contacts in a variety of different ways (email, instant message, SMS, -etc.). Current status information, historical logs, and reports can -all be accessed via a web browser. - -WWW: http://www.nagios.org/ diff --git a/net-mgmt/nagios2/pkg-plist b/net-mgmt/nagios2/pkg-plist deleted file mode 100644 index f889005af8ad..000000000000 --- a/net-mgmt/nagios2/pkg-plist +++ /dev/null @@ -1,300 +0,0 @@ -@exec mkdir -p %D/%%NAGIOSWWWDIR%%/ssi -@exec mkdir -p %%NAGIOSDIR%%/archives -@exec mkdir -p %%NAGIOSDIR%%/rw -@exec chmod 775 %%NAGIOSDIR%% %%NAGIOSDIR%%/archives %%NAGIOSDIR%%/rw -@exec chown %%NAGIOSUSER%%:%%NAGIOSGROUP%% %%NAGIOSDIR%% %%NAGIOSDIR%%/archives -@exec chown %%NAGIOSUSER%%:%%WWWGRP%% %%NAGIOSDIR%%/rw -bin/nagios -bin/nagiostats -%%EMBEDDED_PERL%%bin/p1.pl -etc/nagios/cgi.cfg-sample -etc/nagios/commands.cfg-sample -etc/nagios/localhost.cfg-sample -etc/nagios/nagios.cfg-sample -etc/nagios/resource.cfg-sample -%%NAGIOSWWWDIR%%/cgi-bin/avail.cgi -%%NAGIOSWWWDIR%%/cgi-bin/cmd.cgi -%%NAGIOSWWWDIR%%/cgi-bin/config.cgi -%%NAGIOSWWWDIR%%/cgi-bin/extinfo.cgi -%%NAGIOSWWWDIR%%/cgi-bin/histogram.cgi -%%NAGIOSWWWDIR%%/cgi-bin/history.cgi -%%NAGIOSWWWDIR%%/cgi-bin/notifications.cgi -%%NAGIOSWWWDIR%%/cgi-bin/outages.cgi -%%NAGIOSWWWDIR%%/cgi-bin/showlog.cgi -%%NAGIOSWWWDIR%%/cgi-bin/status.cgi -%%NAGIOSWWWDIR%%/cgi-bin/statusmap.cgi -%%NAGIOSWWWDIR%%/cgi-bin/statuswml.cgi -%%NAGIOSWWWDIR%%/cgi-bin/statuswrl.cgi -%%NAGIOSWWWDIR%%/cgi-bin/summary.cgi -%%NAGIOSWWWDIR%%/cgi-bin/tac.cgi -%%NAGIOSWWWDIR%%/cgi-bin/trends.cgi -%%NAGIOSWWWDIR%%/contexthelp/A1.html -%%NAGIOSWWWDIR%%/contexthelp/A2.html -%%NAGIOSWWWDIR%%/contexthelp/A3.html -%%NAGIOSWWWDIR%%/contexthelp/A4.html -%%NAGIOSWWWDIR%%/contexthelp/A5.html -%%NAGIOSWWWDIR%%/contexthelp/A6.html -%%NAGIOSWWWDIR%%/contexthelp/A7.html -%%NAGIOSWWWDIR%%/contexthelp/B1.html -%%NAGIOSWWWDIR%%/contexthelp/C1.html -%%NAGIOSWWWDIR%%/contexthelp/D1.html -%%NAGIOSWWWDIR%%/contexthelp/E1.html -%%NAGIOSWWWDIR%%/contexthelp/F1.html -%%NAGIOSWWWDIR%%/contexthelp/G1.html -%%NAGIOSWWWDIR%%/contexthelp/G2.html -%%NAGIOSWWWDIR%%/contexthelp/G3.html -%%NAGIOSWWWDIR%%/contexthelp/G4.html -%%NAGIOSWWWDIR%%/contexthelp/G5.html -%%NAGIOSWWWDIR%%/contexthelp/G6.html -%%NAGIOSWWWDIR%%/contexthelp/H1.html -%%NAGIOSWWWDIR%%/contexthelp/H2.html -%%NAGIOSWWWDIR%%/contexthelp/H3.html -%%NAGIOSWWWDIR%%/contexthelp/H4.html -%%NAGIOSWWWDIR%%/contexthelp/H5.html -%%NAGIOSWWWDIR%%/contexthelp/H6.html -%%NAGIOSWWWDIR%%/contexthelp/H7.html -%%NAGIOSWWWDIR%%/contexthelp/H8.html -%%NAGIOSWWWDIR%%/contexthelp/I1.html -%%NAGIOSWWWDIR%%/contexthelp/I2.html -%%NAGIOSWWWDIR%%/contexthelp/I3.html -%%NAGIOSWWWDIR%%/contexthelp/I4.html -%%NAGIOSWWWDIR%%/contexthelp/I5.html -%%NAGIOSWWWDIR%%/contexthelp/I6.html -%%NAGIOSWWWDIR%%/contexthelp/I7.html -%%NAGIOSWWWDIR%%/contexthelp/I8.html -%%NAGIOSWWWDIR%%/contexthelp/I9.html -%%NAGIOSWWWDIR%%/contexthelp/J1.html -%%NAGIOSWWWDIR%%/contexthelp/K1.html -%%NAGIOSWWWDIR%%/contexthelp/L1.html -%%NAGIOSWWWDIR%%/contexthelp/L10.html -%%NAGIOSWWWDIR%%/contexthelp/L11.html -%%NAGIOSWWWDIR%%/contexthelp/L12.html -%%NAGIOSWWWDIR%%/contexthelp/L13.html -%%NAGIOSWWWDIR%%/contexthelp/L2.html -%%NAGIOSWWWDIR%%/contexthelp/L3.html -%%NAGIOSWWWDIR%%/contexthelp/L4.html -%%NAGIOSWWWDIR%%/contexthelp/L5.html -%%NAGIOSWWWDIR%%/contexthelp/L6.html -%%NAGIOSWWWDIR%%/contexthelp/L7.html -%%NAGIOSWWWDIR%%/contexthelp/L8.html -%%NAGIOSWWWDIR%%/contexthelp/L9.html -%%NAGIOSWWWDIR%%/contexthelp/M1.html -%%NAGIOSWWWDIR%%/contexthelp/M2.html -%%NAGIOSWWWDIR%%/contexthelp/M3.html -%%NAGIOSWWWDIR%%/contexthelp/M4.html -%%NAGIOSWWWDIR%%/contexthelp/M5.html -%%NAGIOSWWWDIR%%/contexthelp/M6.html -%%NAGIOSWWWDIR%%/contexthelp/N1.html -%%NAGIOSWWWDIR%%/contexthelp/N2.html -%%NAGIOSWWWDIR%%/contexthelp/N3.html -%%NAGIOSWWWDIR%%/contexthelp/N4.html -%%NAGIOSWWWDIR%%/contexthelp/N5.html -%%NAGIOSWWWDIR%%/contexthelp/N6.html -%%NAGIOSWWWDIR%%/contexthelp/N7.html -%%NAGIOSWWWDIR%%/docs/about.html -%%NAGIOSWWWDIR%%/docs/adaptive.html -%%NAGIOSWWWDIR%%/docs/addons.html -%%NAGIOSWWWDIR%%/docs/beginners.html -%%NAGIOSWWWDIR%%/docs/cgiauth.html -%%NAGIOSWWWDIR%%/docs/cgiincludes.html -%%NAGIOSWWWDIR%%/docs/cgis.html -%%NAGIOSWWWDIR%%/docs/checkscheduling.html -%%NAGIOSWWWDIR%%/docs/clusters.html -%%NAGIOSWWWDIR%%/docs/commandfile.html -%%NAGIOSWWWDIR%%/docs/config.html -%%NAGIOSWWWDIR%%/docs/configcgi.html -%%NAGIOSWWWDIR%%/docs/configextinfo.html -%%NAGIOSWWWDIR%%/docs/configmain.html -%%NAGIOSWWWDIR%%/docs/configobject.html -%%NAGIOSWWWDIR%%/docs/dependencies.html -%%NAGIOSWWWDIR%%/docs/distributed.html -%%NAGIOSWWWDIR%%/docs/downtime.html -%%NAGIOSWWWDIR%%/docs/embeddedperl.html -%%NAGIOSWWWDIR%%/docs/escalations.html -%%NAGIOSWWWDIR%%/docs/eventhandlers.html -%%NAGIOSWWWDIR%%/docs/extcommands.html -%%NAGIOSWWWDIR%%/docs/flapping.html -%%NAGIOSWWWDIR%%/docs/freshness.html -%%NAGIOSWWWDIR%%/docs/funstuff.html -%%NAGIOSWWWDIR%%/docs/images/activepassive.png -%%NAGIOSWWWDIR%%/docs/images/cgi-avail-a.png -%%NAGIOSWWWDIR%%/docs/images/cgi-avail-b.png -%%NAGIOSWWWDIR%%/docs/images/cgi-cmd.png -%%NAGIOSWWWDIR%%/docs/images/cgi-config.png -%%NAGIOSWWWDIR%%/docs/images/cgi-extinfo-a.png -%%NAGIOSWWWDIR%%/docs/images/cgi-extinfo-b.png -%%NAGIOSWWWDIR%%/docs/images/cgi-extinfo-c.png -%%NAGIOSWWWDIR%%/docs/images/cgi-extinfo-d.png -%%NAGIOSWWWDIR%%/docs/images/cgi-histogram.png -%%NAGIOSWWWDIR%%/docs/images/cgi-history.png -%%NAGIOSWWWDIR%%/docs/images/cgi-notifications.png -%%NAGIOSWWWDIR%%/docs/images/cgi-outages.png -%%NAGIOSWWWDIR%%/docs/images/cgi-showlog.png -%%NAGIOSWWWDIR%%/docs/images/cgi-status-a.png -%%NAGIOSWWWDIR%%/docs/images/cgi-status-b.png -%%NAGIOSWWWDIR%%/docs/images/cgi-status-c.png -%%NAGIOSWWWDIR%%/docs/images/cgi-status-d.png -%%NAGIOSWWWDIR%%/docs/images/cgi-statusmap.png -%%NAGIOSWWWDIR%%/docs/images/cgi-statuswml.png -%%NAGIOSWWWDIR%%/docs/images/cgi-statuswrl.png -%%NAGIOSWWWDIR%%/docs/images/cgi-summary.png -%%NAGIOSWWWDIR%%/docs/images/cgi-tac.png -%%NAGIOSWWWDIR%%/docs/images/cgi-trends.png -%%NAGIOSWWWDIR%%/docs/images/checktiming.png -%%NAGIOSWWWDIR%%/docs/images/distributed.png -%%NAGIOSWWWDIR%%/docs/images/host-dependencies.png -%%NAGIOSWWWDIR%%/docs/images/indirecthostcheck.png -%%NAGIOSWWWDIR%%/docs/images/indirectsvccheck.png -%%NAGIOSWWWDIR%%/docs/images/indirectsvccheck2.png -%%NAGIOSWWWDIR%%/docs/images/interleaved1.png -%%NAGIOSWWWDIR%%/docs/images/interleaved2.png -%%NAGIOSWWWDIR%%/docs/images/interleaved3.png -%%NAGIOSWWWDIR%%/docs/images/logofullsize.png -%%NAGIOSWWWDIR%%/docs/images/mrtgstats.png -%%NAGIOSWWWDIR%%/docs/images/network-heirarchy.png -%%NAGIOSWWWDIR%%/docs/images/network-outage1.png -%%NAGIOSWWWDIR%%/docs/images/network-outage2.png -%%NAGIOSWWWDIR%%/docs/images/noninterleaved1.png -%%NAGIOSWWWDIR%%/docs/images/noninterleaved2.png -%%NAGIOSWWWDIR%%/docs/images/physical-network.png -%%NAGIOSWWWDIR%%/docs/images/plugintheory.png -%%NAGIOSWWWDIR%%/docs/images/redudancy.png -%%NAGIOSWWWDIR%%/docs/images/redundancy.png -%%NAGIOSWWWDIR%%/docs/images/service-dependencies.png -%%NAGIOSWWWDIR%%/docs/images/statetransitions.png -%%NAGIOSWWWDIR%%/docs/images/statetransitions2.png -%%NAGIOSWWWDIR%%/docs/index.html -%%NAGIOSWWWDIR%%/docs/indirectchecks.html -%%NAGIOSWWWDIR%%/docs/installing.html -%%NAGIOSWWWDIR%%/docs/installweb.html -%%NAGIOSWWWDIR%%/docs/int-snmptrap.html -%%NAGIOSWWWDIR%%/docs/int-tcpwrappers.html -%%NAGIOSWWWDIR%%/docs/macros.html -%%NAGIOSWWWDIR%%/docs/nagiostats.html -%%NAGIOSWWWDIR%%/docs/networkoutages.html -%%NAGIOSWWWDIR%%/docs/networkreachability.html -%%NAGIOSWWWDIR%%/docs/notifications.html -%%NAGIOSWWWDIR%%/docs/parallelization.html -%%NAGIOSWWWDIR%%/docs/passivechecks.html -%%NAGIOSWWWDIR%%/docs/perfdata.html -%%NAGIOSWWWDIR%%/docs/plugins.html -%%NAGIOSWWWDIR%%/docs/plugintheory.html -%%NAGIOSWWWDIR%%/docs/redundancy.html -%%NAGIOSWWWDIR%%/docs/robots.txt -%%NAGIOSWWWDIR%%/docs/security.html -%%NAGIOSWWWDIR%%/docs/stalking.html -%%NAGIOSWWWDIR%%/docs/starting.html -%%NAGIOSWWWDIR%%/docs/statetypes.html -%%NAGIOSWWWDIR%%/docs/stoprestart.html -%%NAGIOSWWWDIR%%/docs/templaterecursion.html -%%NAGIOSWWWDIR%%/docs/templatetricks.html -%%NAGIOSWWWDIR%%/docs/timeperiods.html -%%NAGIOSWWWDIR%%/docs/toc.html -%%NAGIOSWWWDIR%%/docs/tuning.html -%%NAGIOSWWWDIR%%/docs/verifyconfig.html -%%NAGIOSWWWDIR%%/docs/volatileservices.html -%%NAGIOSWWWDIR%%/docs/whatsnew.html -%%NAGIOSWWWDIR%%/docs/xodtemplate.html -%%NAGIOSWWWDIR%%/images/ack.gif -%%NAGIOSWWWDIR%%/images/action.gif -%%NAGIOSWWWDIR%%/images/command.png -%%NAGIOSWWWDIR%%/images/comment.gif -%%NAGIOSWWWDIR%%/images/contexthelp1.gif -%%NAGIOSWWWDIR%%/images/contexthelp2.gif -%%NAGIOSWWWDIR%%/images/critical.png -%%NAGIOSWWWDIR%%/images/delay.gif -%%NAGIOSWWWDIR%%/images/delete.gif -%%NAGIOSWWWDIR%%/images/detail.gif -%%NAGIOSWWWDIR%%/images/disabled.gif -%%NAGIOSWWWDIR%%/images/down.gif -%%NAGIOSWWWDIR%%/images/downtime.gif -%%NAGIOSWWWDIR%%/images/empty.gif -%%NAGIOSWWWDIR%%/images/enabled.gif -%%NAGIOSWWWDIR%%/images/extinfo.gif -%%NAGIOSWWWDIR%%/images/flapping.gif -%%NAGIOSWWWDIR%%/images/greendot.gif -%%NAGIOSWWWDIR%%/images/histogram.png -%%NAGIOSWWWDIR%%/images/history.gif -%%NAGIOSWWWDIR%%/images/hostevent.gif -%%NAGIOSWWWDIR%%/images/info.png -%%NAGIOSWWWDIR%%/images/left.gif -%%NAGIOSWWWDIR%%/images/logofullsize.jpg -%%NAGIOSWWWDIR%%/images/logos/nagios.gd2 -%%NAGIOSWWWDIR%%/images/logos/nagios.gif -%%NAGIOSWWWDIR%%/images/logos/nagiosvrml.png -%%NAGIOSWWWDIR%%/images/logos/unknown.gd2 -%%NAGIOSWWWDIR%%/images/logos/unknown.gif -%%NAGIOSWWWDIR%%/images/logrotate.png -%%NAGIOSWWWDIR%%/images/ndisabled.gif -%%NAGIOSWWWDIR%%/images/noack.gif -%%NAGIOSWWWDIR%%/images/notes.gif -%%NAGIOSWWWDIR%%/images/notify.gif -%%NAGIOSWWWDIR%%/images/orangedot.gif -%%NAGIOSWWWDIR%%/images/passiveonly.gif -%%NAGIOSWWWDIR%%/images/recovery.png -%%NAGIOSWWWDIR%%/images/redudancy.png -%%NAGIOSWWWDIR%%/images/redundancy.png -%%NAGIOSWWWDIR%%/images/restart.gif -%%NAGIOSWWWDIR%%/images/right.gif -%%NAGIOSWWWDIR%%/images/sblogo.jpg -%%NAGIOSWWWDIR%%/images/serviceevent.gif -%%NAGIOSWWWDIR%%/images/start.gif -%%NAGIOSWWWDIR%%/images/status.gif -%%NAGIOSWWWDIR%%/images/status2.gif -%%NAGIOSWWWDIR%%/images/status3.gif -%%NAGIOSWWWDIR%%/images/status4.gif -%%NAGIOSWWWDIR%%/images/stop.gif -%%NAGIOSWWWDIR%%/images/tacdisabled.jpg -%%NAGIOSWWWDIR%%/images/tacdisabled.png -%%NAGIOSWWWDIR%%/images/tacenabled.jpg -%%NAGIOSWWWDIR%%/images/tacenabled.png -%%NAGIOSWWWDIR%%/images/thermcrit.png -%%NAGIOSWWWDIR%%/images/thermok.png -%%NAGIOSWWWDIR%%/images/thermwarn.png -%%NAGIOSWWWDIR%%/images/trends.gif -%%NAGIOSWWWDIR%%/images/trendshost.png -%%NAGIOSWWWDIR%%/images/trendssvc.png -%%NAGIOSWWWDIR%%/images/unknown.png -%%NAGIOSWWWDIR%%/images/up.gif -%%NAGIOSWWWDIR%%/images/warning.png -%%NAGIOSWWWDIR%%/images/weblogo1.png -%%NAGIOSWWWDIR%%/images/zoom1.gif -%%NAGIOSWWWDIR%%/images/zoom2.gif -%%NAGIOSWWWDIR%%/index.html -%%NAGIOSWWWDIR%%/main.html -%%NAGIOSWWWDIR%%/media/critical.wav -%%NAGIOSWWWDIR%%/media/hostdown.wav -%%NAGIOSWWWDIR%%/media/warning.wav -%%NAGIOSWWWDIR%%/robots.txt -%%NAGIOSWWWDIR%%/side.html -%%NAGIOSWWWDIR%%/stylesheets/avail.css -%%NAGIOSWWWDIR%%/stylesheets/checksanity.css -%%NAGIOSWWWDIR%%/stylesheets/cmd.css -%%NAGIOSWWWDIR%%/stylesheets/common.css -%%NAGIOSWWWDIR%%/stylesheets/config.css -%%NAGIOSWWWDIR%%/stylesheets/extinfo.css -%%NAGIOSWWWDIR%%/stylesheets/histogram.css -%%NAGIOSWWWDIR%%/stylesheets/history.css -%%NAGIOSWWWDIR%%/stylesheets/ministatus.css -%%NAGIOSWWWDIR%%/stylesheets/notifications.css -%%NAGIOSWWWDIR%%/stylesheets/outages.css -%%NAGIOSWWWDIR%%/stylesheets/showlog.css -%%NAGIOSWWWDIR%%/stylesheets/status.css -%%NAGIOSWWWDIR%%/stylesheets/statusmap.css -%%NAGIOSWWWDIR%%/stylesheets/summary.css -%%NAGIOSWWWDIR%%/stylesheets/tac.css -%%NAGIOSWWWDIR%%/stylesheets/trends.css -@dirrmtry etc/nagios -@dirrm %%NAGIOSWWWDIR%%/cgi-bin -@dirrm %%NAGIOSWWWDIR%%/contexthelp -@dirrm %%NAGIOSWWWDIR%%/docs/images -@dirrm %%NAGIOSWWWDIR%%/docs -@dirrm %%NAGIOSWWWDIR%%/images/logos -@dirrm %%NAGIOSWWWDIR%%/images -@dirrm %%NAGIOSWWWDIR%%/media -@dirrm %%NAGIOSWWWDIR%%/ssi -@dirrm %%NAGIOSWWWDIR%%/stylesheets -@dirrmtry %%NAGIOSWWWDIR%% -@unexec rmdir %%NAGIOSDIR%%/archives 2>/dev/null || true -@unexec rmdir %%NAGIOSDIR%%/rw 2>/dev/null || true -@unexec rmdir %%NAGIOSDIR%% 2>/dev/null || true |