Hello community, here is the log from the commit of package nagios checked in at Mon Oct 29 12:40:50 CET 2007. -------- --- nagios/nagios.changes 2007-09-16 22:32:17.000000000 +0200 +++ /mounts/work_src_done/STABLE/nagios/nagios.changes 2007-10-26 14:42:45.000000000 +0200 @@ -1,0 +2,19 @@ +Fri Oct 26 08:56:18 CEST 2007 - tsieden@suse.de + +- update to nagios version 2.10 + * Added 'make install-webconf' command to install Apache web config file + * Sample config files are now installed without a -sample extension + * Fix for SIGTERMs being seen as SIGEXITs, non-logging of SIGTERMs/shutdowns + * Minor fix for notification timeout log messages + * Fix for not logging passive host check results + * Minor bug fixes in CGIs + * Fix for a segfault when processing passive host check results with empty output/perfdata + * Fix for incorrect latency calculation for passive service checks + * Bug fix with attempting to access an uninitalized mutex if external commands are disabled + * Fix for keeping service checks in the event queue when active service checks are disabled globally + * Fix for a potential cross site scripting vulnerability in the CGIs + * Program version is now displayed in CGIs + +- removed obsolete FAQ patch in html/docs dir + +------------------------------------------------------------------- Old: ---- nagios-2.9.tar.bz2 nagios.doc.faq-link.patch New: ---- nagios-2.10.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nagios.spec ++++++ --- /var/tmp/diff_new_pack.LF1069/_old 2007-10-29 12:40:15.000000000 +0100 +++ /var/tmp/diff_new_pack.LF1069/_new 2007-10-29 12:40:15.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package nagios (Version 2.9) +# spec file for package nagios (Version 2.10) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -18,8 +18,8 @@ BuildRequires: libapr-util1-devel xorg-x11-devel %endif Summary: The Nagios Network Monitor -Version: 2.9 -Release: 49 +Version: 2.10 +Release: 1 Url: http://www.nagios.org/ License: GPL v2 or later Group: System/Monitoring @@ -41,7 +41,6 @@ Patch: nagios.sehandlers.end_time.patch Patch1: nagios.avail.host_name.patch Patch2: nagios.sample-config.email-admin-localhost.patch -Patch3: nagios.doc.faq-link.patch Patch4: nagios.p1.pl-location.patch %description @@ -69,7 +68,6 @@ %patch -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 %patch4 -p1 %build @@ -123,9 +121,6 @@ touch ${RPM_BUILD_ROOT}%{nslockfile} make DESTDIR=$RPM_BUILD_ROOT INSTALL_OPTS="" COMMAND_OPTS="" INIT_OPTS= STRIP=: install make DESTDIR=$RPM_BUILD_ROOT INSTALL_OPTS="" COMMAND_OPTS="" INIT_OPTS= CGICFGDIR=/etc/nagios install-config -for i in $RPM_BUILD_ROOT/etc/nagios/*-sample ; do - mv $i ${i%%-sample} -done # devel install -m 0644 include/locations.h ${RPM_BUILD_ROOT}%{_prefix}/include/nagios # @@ -200,6 +195,21 @@ %dir %{apache2_sysconfdir}/conf.d %config(noreplace) %{apache2_sysconfdir}/conf.d/* %changelog +* Fri Oct 26 2007 - tsieden@suse.de +- update to nagios version 2.10 + * Added 'make install-webconf' command to install Apache web config file + * Sample config files are now installed without a -sample extension + * Fix for SIGTERMs being seen as SIGEXITs, non-logging of SIGTERMs/shutdowns + * Minor fix for notification timeout log messages + * Fix for not logging passive host check results + * Minor bug fixes in CGIs + * Fix for a segfault when processing passive host check results with empty output/perfdata + * Fix for incorrect latency calculation for passive service checks + * Bug fix with attempting to access an uninitalized mutex if external commands are disabled + * Fix for keeping service checks in the event queue when active service checks are disabled globally + * Fix for a potential cross site scripting vulnerability in the CGIs + * Program version is now displayed in CGIs +- removed obsolete FAQ patch in html/docs dir * Sun Sep 16 2007 - cschneemann@suse.de - added openssl-devel to BuildRequires to support SSL in check_http * Sun Aug 12 2007 - olh@suse.de ++++++ nagios-2.9.tar.bz2 -> nagios-2.10.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/base/checks.c new/nagios-2.10/base/checks.c --- old/nagios-2.9/base/checks.c 2007-04-10 16:50:22.000000000 +0200 +++ new/nagios-2.10/base/checks.c 2007-10-21 01:18:28.000000000 +0200 @@ -3,7 +3,7 @@ * CHECKS.C - Service and host check functions for Nagios * * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org) - * Last Modified: 04-10-2006 + * Last Modified: 10-19-2007 * * License: * @@ -679,7 +679,7 @@ /* calculate passive check latency */ if(queued_svc_msg.check_type==SERVICE_CHECK_PASSIVE){ gettimeofday(&tv,NULL); - temp_service->latency=(double)((double)(tv.tv_sec-queued_svc_msg.finish_time.tv_sec)+(double)((tv.tv_usec-queued_svc_msg.finish_time.tv_usec)/1000.0)); + temp_service->latency=(double)((double)(tv.tv_sec-queued_svc_msg.finish_time.tv_sec)+(double)((tv.tv_usec-queued_svc_msg.finish_time.tv_usec)/1000.0/1000.0)); if(temp_service->latency<0.0) temp_service->latency=0.0; } @@ -1442,7 +1442,9 @@ #endif /* don't schedule a check if active checks are disabled */ - if((execute_service_checks==FALSE || svc->checks_enabled==FALSE) && forced==FALSE) + /* 10/19/07 EG - schedule service checks even if they're disabled on a program-wide basis */ + /*if((execute_service_checks==FALSE || svc->checks_enabled==FALSE) && forced==FALSE)*/ + if(svc->checks_enabled==FALSE && forced==FALSE) return; /* allocate memory for a new event item */ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/base/commands.c new/nagios-2.10/base/commands.c --- old/nagios-2.9/base/commands.c 2007-03-05 18:34:39.000000000 +0100 +++ new/nagios-2.10/base/commands.c 2007-10-21 01:18:28.000000000 +0200 @@ -3,7 +3,7 @@ * COMMANDS.C - External command functions for Nagios * * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org) - * Last Modified: 03-05-2007 + * Last Modified: 10-20-2007 * * License: * @@ -563,7 +563,7 @@ /* log the external command */ snprintf(buffer,sizeof(buffer),"EXTERNAL COMMAND: %s;%s\n",command_id,args); buffer[sizeof(buffer)-1]='\x0'; - if(command_type==CMD_PROCESS_SERVICE_CHECK_RESULT){ + if(command_type==CMD_PROCESS_SERVICE_CHECK_RESULT || command_type==CMD_PROCESS_HOST_CHECK_RESULT){ if(log_passive_checks==TRUE) write_to_all_logs(buffer,NSLOG_PASSIVE_CHECK); } @@ -1950,13 +1950,15 @@ /* process passive host check result */ /* this function is a bit more involved than for passive service checks, as we need to replicate most functions performed by check_route_to_host() */ int process_passive_host_check(time_t check_time, char *host_name, int return_code, char *output){ - host *temp_host; + host *temp_host=NULL; char *real_host_name=""; struct timeval tv; char temp_plugin_output[MAX_PLUGINOUTPUT_LENGTH]=""; char old_plugin_output[MAX_PLUGINOUTPUT_LENGTH]=""; - char *temp_ptr; + char *temp_ptr=NULL; char temp_buffer[MAX_INPUT_BUFFER]=""; + char *output_ptr=NULL; + char *perf_ptr=NULL; #ifdef DEBUG0 printf("process_passive_host_check() start\n"); @@ -2051,41 +2053,27 @@ if(temp_host->latency<0.0) temp_host->latency=0.0; - /* check for empty plugin output */ - if(!strcmp(temp_plugin_output,"")) - strcpy(temp_plugin_output,"(No Information Returned From Host Check)"); - - /* first part of plugin output (up to pipe) is status info */ - temp_ptr=strtok(temp_plugin_output,"|\n"); - - /* make sure the plugin output isn't NULL */ - if(temp_ptr==NULL){ - strncpy(temp_host->plugin_output,"(No output returned from host check)",MAX_PLUGINOUTPUT_LENGTH-1); - temp_host->plugin_output[MAX_PLUGINOUTPUT_LENGTH-1]='\x0'; - } - - else{ - - strip(temp_ptr); - if(!strcmp(temp_ptr,"")){ - strncpy(temp_host->plugin_output,"(No output returned from host check)",MAX_PLUGINOUTPUT_LENGTH-1); - temp_host->plugin_output[MAX_PLUGINOUTPUT_LENGTH-1]='\x0'; - } - else{ - strncpy(temp_host->plugin_output,temp_ptr,MAX_PLUGINOUTPUT_LENGTH-1); - temp_host->plugin_output[MAX_PLUGINOUTPUT_LENGTH-1]='\x0'; - } - } + /* first part of plugin output (up to pipe) is status info, perfdata comes after pipe */ + /* don't use strtok() as it can cause problems if external commands are called recursively */ + /* adaptation of patch submitted by Altinity 9/17/07 */ + output_ptr=temp_plugin_output; + perf_ptr=strchr(temp_plugin_output,'|'); + if(perf_ptr){ + perf_ptr[0]='\x0'; + perf_ptr++; + } - /* second part of plugin output (after pipe) is performance data (which may or may not exist) */ - temp_ptr=strtok(NULL,"\n"); - - /* grab performance data if we found it available */ - if(temp_ptr!=NULL){ - strip(temp_ptr); - strncpy(temp_host->perf_data,temp_ptr,MAX_PLUGINOUTPUT_LENGTH-1); + /* save plugin output */ + strip(output_ptr); + strncpy(temp_host->plugin_output,(!strcmp(output_ptr,""))?"(No output returned from host check)":output_ptr,MAX_PLUGINOUTPUT_LENGTH-1); + temp_host->plugin_output[MAX_PLUGINOUTPUT_LENGTH-1]='\x0'; + + /* save perfdata if present */ + if(perf_ptr){ + strip(perf_ptr); + strncpy(temp_host->perf_data,perf_ptr,MAX_PLUGINOUTPUT_LENGTH-1); temp_host->perf_data[MAX_PLUGINOUTPUT_LENGTH-1]='\x0'; - } + } /* replace semicolons in plugin output (but not performance data) with colons */ temp_ptr=temp_host->plugin_output; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/base/nagios.c new/nagios-2.10/base/nagios.c --- old/nagios-2.9/base/nagios.c 2007-04-10 17:08:32.000000000 +0200 +++ new/nagios-2.10/base/nagios.c 2007-10-21 16:39:51.000000000 +0200 @@ -3,12 +3,12 @@ * NAGIOS.C - Core Program Code For Nagios * * Program: Nagios - * Version: 2.9 + * Version: 2.10 * License: GPL * Copyright (c) 1999-2007 Ethan Galstad (http://www.nagios.org) * * First Written: 01-28-1999 (start of development) - * Last Modified: 04-10-2007 + * Last Modified: 10-21-2007 * * Description: * @@ -142,7 +142,7 @@ int sigshutdown=FALSE; int sigrestart=FALSE; -char *sigs[]={"EXIT","HUP","INT","QUIT","ILL","TRAP","ABRT","BUS","FPE","KILL","USR1","SEGV","USR2","PIPE","ALRM","TERM","STKFLT","CHLD","CONT","STOP","TSTP","TTIN","TTOU","URG","XCPU","XFSZ","VTALRM","PROF","WINCH","IO","PWR","UNUSED","ZERR","DEBUG",(char *)NULL}; +char *sigs[35]={"EXIT","HUP","INT","QUIT","ILL","TRAP","ABRT","BUS","FPE","KILL","USR1","SEGV","USR2","PIPE","ALRM","TERM","STKFLT","CHLD","CONT","STOP","TSTP","TTIN","TTOU","URG","XCPU","XFSZ","VTALRM","PROF","WINCH","IO","PWR","UNUSED","ZERR","DEBUG",(char *)NULL}; int caught_signal=FALSE; int sig_id=0; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/base/nagiostats.c new/nagios-2.10/base/nagiostats.c --- old/nagios-2.9/base/nagiostats.c 2007-04-10 17:08:32.000000000 +0200 +++ new/nagios-2.10/base/nagiostats.c 2007-10-21 16:39:51.000000000 +0200 @@ -3,11 +3,11 @@ * NAGIOSTATS.C - Displays Nagios Statistics * * Program: Nagiostats - * Version: 2.9 + * Version: 2.10 * License: GPL * Copyright (c) 2003-2007 Ethan Galstad (nagios@nagios.org) * - * Last Modified: 04-10-2007 + * Last Modified: 10-21-2007 * * License: * diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/base/notifications.c new/nagios-2.10/base/notifications.c --- old/nagios-2.9/base/notifications.c 2007-01-20 05:25:40.000000000 +0100 +++ new/nagios-2.10/base/notifications.c 2007-08-06 21:44:27.000000000 +0200 @@ -3,7 +3,7 @@ * NOTIFICATIONS.C - Service and host notification functions for Nagios * * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org) - * Last Modified: 01-19-2007 + * Last Modified: 08-06-2007 * * License: * @@ -667,7 +667,7 @@ /* check to see if the notification command timed out */ if(early_timeout==TRUE){ - snprintf(temp_buffer,sizeof(temp_buffer),"Warning: Contact '%s' service notification command '%s' timed out after %d seconds\n",cntct->name,processed_command,DEFAULT_NOTIFICATION_TIMEOUT); + snprintf(temp_buffer,sizeof(temp_buffer),"Warning: Contact '%s' service notification command '%s' timed out after %d seconds\n",cntct->name,processed_command,notification_timeout); temp_buffer[sizeof(temp_buffer)-1]='\x0'; write_to_logs_and_console(temp_buffer,NSLOG_SERVICE_NOTIFICATION | NSLOG_RUNTIME_WARNING,TRUE); } @@ -1414,7 +1414,7 @@ /* check to see if the notification timed out */ if(early_timeout==TRUE){ - snprintf(temp_buffer,sizeof(temp_buffer),"Warning: Contact '%s' host notification command '%s' timed out after %d seconds\n",cntct->name,processed_command,DEFAULT_NOTIFICATION_TIMEOUT); + snprintf(temp_buffer,sizeof(temp_buffer),"Warning: Contact '%s' host notification command '%s' timed out after %d seconds\n",cntct->name,processed_command,notification_timeout); temp_buffer[sizeof(temp_buffer)-1]='\x0'; write_to_logs_and_console(temp_buffer,NSLOG_HOST_NOTIFICATION | NSLOG_RUNTIME_WARNING,TRUE); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/base/utils.c new/nagios-2.10/base/utils.c --- old/nagios-2.9/base/utils.c 2007-04-10 16:50:22.000000000 +0200 +++ new/nagios-2.10/base/utils.c 2007-04-30 23:22:32.000000000 +0200 @@ -3,7 +3,7 @@ * UTILS.C - Miscellaneous utility functions for Nagios * * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org) - * Last Modified: 04-10-2007 + * Last Modified: 04-30-2007 * * License: * @@ -76,7 +76,7 @@ extern int sigshutdown; extern int sigrestart; -extern char **sigs; +extern char *sigs[35]; extern int caught_signal; extern int sig_id; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/cgi/avail.c new/nagios-2.10/cgi/avail.c --- old/nagios-2.9/cgi/avail.c 2007-04-09 04:59:15.000000000 +0200 +++ new/nagios-2.10/cgi/avail.c 2007-10-21 16:39:51.000000000 +0200 @@ -3,7 +3,7 @@ * AVAIL.C - Nagios Availability CGI * * Copyright (c) 2000-2007 Ethan Galstad (nagios@nagios.org) - * Last Modified: 04-08-2007 + * Last Modified: 10-21-2007 * * License: * @@ -1157,6 +1157,7 @@ hostgroup_name=""; else strcpy(hostgroup_name,variables[x]); + strip_html_brackets(hostgroup_name); display_type=DISPLAY_HOSTGROUP_AVAIL; show_all_hostgroups=(strcmp(hostgroup_name,"all"))?FALSE:TRUE; } @@ -1174,6 +1175,7 @@ servicegroup_name=""; else strcpy(servicegroup_name,variables[x]); + strip_html_brackets(servicegroup_name); display_type=DISPLAY_SERVICEGROUP_AVAIL; show_all_servicegroups=(strcmp(servicegroup_name,"all"))?FALSE:TRUE; } @@ -1191,6 +1193,7 @@ host_name=""; else strcpy(host_name,variables[x]); + strip_html_brackets(host_name); display_type=DISPLAY_HOST_AVAIL; show_all_hosts=(strcmp(host_name,"all"))?FALSE:TRUE; } @@ -1208,6 +1211,7 @@ svc_description=""; else strcpy(svc_description,variables[x]); + strip_html_brackets(svc_description); display_type=DISPLAY_SERVICE_AVAIL; show_all_services=(strcmp(svc_description,"all"))?FALSE:TRUE; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/cgi/cgiutils.c new/nagios-2.10/cgi/cgiutils.c --- old/nagios-2.9/cgi/cgiutils.c 2007-04-10 16:50:22.000000000 +0200 +++ new/nagios-2.10/cgi/cgiutils.c 2007-10-21 16:39:51.000000000 +0200 @@ -3,7 +3,7 @@ * CGIUTILS.C - Common utilities for Nagios CGIs * * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org) - * Last Modified: 04-10-2007 + * Last Modified: 10-21-2007 * * License: * @@ -1424,6 +1424,29 @@ +/* strip > and < from string */ +void strip_html_brackets(char *buffer){ + register int x; + register int y; + register int z; + + if(buffer==NULL || buffer[0]=='\x0') + return; + + /* remove all occurances in string */ + z=(int)strlen(buffer); + for(x=0,y=0;x<z;x++){ + if(buffer[x]=='<' || buffer[x]=='>') + continue; + buffer[y++]=buffer[x]; + } + buffer[y++]='\x0'; + + return; + } + + + /* determines the log file we should use (from current time) */ void get_log_archive_to_use(int archive,char *buffer,int buffer_length){ struct tm *t; @@ -1604,7 +1627,7 @@ if(refresh==TRUE) printf("Updated every %d seconds<br>\n",refresh_rate); - printf("Nagios® - <A HREF='http://www.nagios.org' TARGET='_new' CLASS='homepageURL'>www.nagios.org</A><BR>\n"); + printf("Nagios® %s - <A HREF='http://www.nagios.org' TARGET='_new' CLASS='homepageURL'>www.nagios.org</A><BR>\n",PROGRAM_VERSION); if(current_authdata!=NULL) printf("Logged in as <i>%s</i><BR>\n",(!strcmp(current_authdata->username,""))?"?":current_authdata->username); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/cgi/cmd.c new/nagios-2.10/cgi/cmd.c --- old/nagios-2.9/cgi/cmd.c 2007-02-19 15:24:29.000000000 +0100 +++ new/nagios-2.10/cgi/cmd.c 2007-10-21 16:39:51.000000000 +0200 @@ -3,7 +3,7 @@ * CMD.C - Nagios Command CGI * * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org) - * Last Modified: 02-19-2007 + * Last Modified: 10-21-2007 * * License: * @@ -380,6 +380,7 @@ comment_author=""; else strcpy(comment_author,variables[x]); + strip_html_brackets(comment_author); } /* we found the comment data */ @@ -395,6 +396,7 @@ comment_data=""; else strcpy(comment_data,variables[x]); + strip_html_brackets(comment_data); } /* we found the host name */ @@ -410,6 +412,7 @@ host_name=""; else strcpy(host_name,variables[x]); + strip_html_brackets(host_name); } /* we found the hostgroup name */ @@ -425,6 +428,7 @@ hostgroup_name=""; else strcpy(hostgroup_name,variables[x]); + strip_html_brackets(hostgroup_name); } /* we found the service name */ @@ -440,6 +444,7 @@ service_desc=""; else strcpy(service_desc,variables[x]); + strip_html_brackets(service_desc); } /* we found the servicegroup name */ @@ -455,6 +460,7 @@ servicegroup_name=""; else strcpy(servicegroup_name,variables[x]); + strip_html_brackets(servicegroup_name); } /* we got the persistence option for a comment */ @@ -943,7 +949,7 @@ printf("<INPUT TYPE='checkbox' NAME='persistent' CHECKED>"); printf("</b></td></tr>\n"); printf("<tr><td CLASS='optBoxRequiredItem'>Author (Your Name):</td><td><b>"); - printf("<INPUT TYPE'TEXT' NAME='com_author' VALUE='%s'>",comment_author); + printf("<INPUT TYPE='TEXT' NAME='com_author' VALUE='%s'>",comment_author); printf("</b></td></tr>\n"); printf("<tr><td CLASS='optBoxRequiredItem'>Comment:</td><td><b>"); printf("<INPUT TYPE='TEXT' NAME='com_data' VALUE='%s' SIZE=40>",comment_data); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/cgi/extinfo.c new/nagios-2.10/cgi/extinfo.c --- old/nagios-2.9/cgi/extinfo.c 2007-04-10 16:50:22.000000000 +0200 +++ new/nagios-2.10/cgi/extinfo.c 2007-10-21 16:39:51.000000000 +0200 @@ -3,7 +3,7 @@ * EXTINFO.C - Nagios Extended Information CGI * * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org) - * Last Modified: 04-10-2007 + * Last Modified: 10-21-2007 * * License: * @@ -604,6 +604,7 @@ host_name=strdup(variables[x]); if(host_name==NULL) host_name=""; + strip_html_brackets(host_name); } /* we found the hostgroup name */ @@ -617,6 +618,7 @@ hostgroup_name=strdup(variables[x]); if(hostgroup_name==NULL) hostgroup_name=""; + strip_html_brackets(hostgroup_name); } /* we found the service name */ @@ -630,6 +632,7 @@ service_desc=strdup(variables[x]); if(service_desc==NULL) service_desc=""; + strip_html_brackets(service_desc); } /* we found the servicegroup name */ @@ -643,6 +646,7 @@ servicegroup_name=strdup(variables[x]); if(servicegroup_name==NULL) servicegroup_name=""; + strip_html_brackets(servicegroup_name); } /* we found the sort type argument */ @@ -716,6 +720,9 @@ printf("<TR><TD class='stateInfoTable1'>\n"); printf("<TABLE BORDER=0>\n"); + /* program version */ + printf("<TR><TD CLASS='dataVar'>Program Version:</TD><TD CLASS='dataVal'>%s</TD></TR>\n",PROGRAM_VERSION); + /* program start time */ get_time_string(&program_start,date_time,(int)sizeof(date_time),SHORT_DATE_TIME); printf("<TR><TD CLASS='dataVar'>Program Start Time:</TD><TD CLASS='dataVal'>%s</TD></TR>\n",date_time); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/cgi/histogram.c new/nagios-2.10/cgi/histogram.c --- old/nagios-2.9/cgi/histogram.c 2006-03-21 22:31:46.000000000 +0100 +++ new/nagios-2.10/cgi/histogram.c 2007-10-21 16:39:51.000000000 +0200 @@ -2,8 +2,8 @@ * * HISTOGRAM.C - Nagios Alert Histogram CGI * - * Copyright (c) 2001-2006 Ethan Galstad (nagios@nagios.org) - * Last Modified: 03-21-2006 + * Copyright (c) 2001-2007 Ethan Galstad (nagios@nagios.org) + * Last Modified: 10-21-2007 * * License: * @@ -1086,6 +1086,7 @@ host_name=""; else strcpy(host_name,variables[x]); + strip_html_brackets(host_name); display_type=DISPLAY_HOST_HISTOGRAM; } @@ -1103,6 +1104,7 @@ svc_description=""; else strcpy(svc_description,variables[x]); + strip_html_brackets(svc_description); display_type=DISPLAY_SERVICE_HISTOGRAM; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/cgi/history.c new/nagios-2.10/cgi/history.c --- old/nagios-2.9/cgi/history.c 2007-04-10 16:50:22.000000000 +0200 +++ new/nagios-2.10/cgi/history.c 2007-10-21 16:39:52.000000000 +0200 @@ -3,7 +3,7 @@ * HISTORY.C - Nagios History CGI * * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org) - * Last Modified: 04-10-2007 + * Last Modified: 10-21-2007 * * This CGI program will display the history for the specified host. * If no host is specified, the history for all hosts will be displayed. @@ -379,6 +379,7 @@ host_name=""; else strcpy(host_name,variables[x]); + strip_html_brackets(host_name); display_type=DISPLAY_HOSTS; @@ -401,6 +402,7 @@ svc_description=""; else strcpy(svc_description,variables[x]); + strip_html_brackets(svc_description); display_type=DISPLAY_SERVICES; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/cgi/notifications.c new/nagios-2.10/cgi/notifications.c --- old/nagios-2.9/cgi/notifications.c 2007-04-10 16:50:22.000000000 +0200 +++ new/nagios-2.10/cgi/notifications.c 2007-10-21 16:39:52.000000000 +0200 @@ -3,7 +3,7 @@ * NOTIFICATIONS.C - Nagios Notifications CGI * * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org) - * Last Modified: 04-10-2007 + * Last Modified: 10-21-2007 * * This CGI program will display the notification events for * a given host or contact or for all contacts/hosts. @@ -371,6 +371,7 @@ query_host_name=strdup(variables[x]); if(query_host_name==NULL) query_host_name=""; + strip_html_brackets(query_host_name); if(!strcmp(query_host_name,"all")) find_all=TRUE; else @@ -390,6 +391,8 @@ if(query_contact_name==NULL) query_contact_name=""; + strip_html_brackets(query_contact_name); + if(!strcmp(query_contact_name,"all")) find_all=TRUE; else @@ -408,6 +411,7 @@ query_svc_description=strdup(variables[x]); if(query_svc_description==NULL) query_svc_description=""; + strip_html_brackets(query_svc_description); } /* we found the notification type argument */ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/cgi/status.c new/nagios-2.10/cgi/status.c --- old/nagios-2.9/cgi/status.c 2007-04-10 16:50:22.000000000 +0200 +++ new/nagios-2.10/cgi/status.c 2007-10-21 16:39:52.000000000 +0200 @@ -3,7 +3,7 @@ * STATUS.C - Nagios Status CGI * * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org) - * Last Modified: 04-10-2007 + * Last Modified: 10-21-2007 * * License: * @@ -572,6 +572,7 @@ } hostgroup_name=strdup(variables[x]); + strip_html_brackets(hostgroup_name); if(hostgroup_name!=NULL && !strcmp(hostgroup_name,"all")) show_all_hostgroups=TRUE; @@ -589,6 +590,7 @@ } servicegroup_name=strdup(variables[x]); + strip_html_brackets(servicegroup_name); if(servicegroup_name!=NULL && !strcmp(servicegroup_name,"all")) show_all_servicegroups=TRUE; @@ -606,6 +608,7 @@ } host_name=strdup(variables[x]); + strip_html_brackets(host_name); if(host_name!=NULL && !strcmp(host_name,"all")) show_all_hosts=TRUE; @@ -730,6 +733,7 @@ break; } service_filter=strdup(variables[x]); + strip_html_brackets(service_filter); } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/cgi/statusmap.c new/nagios-2.10/cgi/statusmap.c --- old/nagios-2.9/cgi/statusmap.c 2006-03-21 22:31:46.000000000 +0100 +++ new/nagios-2.10/cgi/statusmap.c 2007-10-21 16:39:52.000000000 +0200 @@ -2,8 +2,8 @@ * * STATUSMAP.C - Nagios Network Status Map CGI * - * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org) - * Last Modified: 03-21-2006 + * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org) + * Last Modified: 10-21-2007 * * Description: * @@ -412,6 +412,7 @@ host_name="all"; else strcpy(host_name,variables[x]); + strip_html_brackets(host_name); if(!strcmp(host_name,"all")) show_all_hosts=TRUE; @@ -570,6 +571,7 @@ break; } + strip_html_brackets(variables[x]); add_layer(variables[x]); } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/cgi/statuswml.c new/nagios-2.10/cgi/statuswml.c --- old/nagios-2.9/cgi/statuswml.c 2007-01-18 22:28:09.000000000 +0100 +++ new/nagios-2.10/cgi/statuswml.c 2007-10-21 16:39:52.000000000 +0200 @@ -3,7 +3,7 @@ * STATUSWML.C - Nagios Status CGI for WAP-enabled devices * * Copyright (c) 2001-2007 Ethan Galstad (nagios@nagios.org) - * Last Modified: 01-18-2007 + * Last Modified: 10-21-2007 * * License: * @@ -239,6 +239,7 @@ hostgroup_name=""; else strcpy(hostgroup_name,variables[x]); + strip_html_brackets(hostgroup_name); if(!strcmp(hostgroup_name,"all")) show_all_hostgroups=TRUE; @@ -260,6 +261,7 @@ host_name=""; else strcpy(host_name,variables[x]); + strip_html_brackets(host_name); } /* we found the service argument */ @@ -276,6 +278,7 @@ service_desc=""; else strcpy(service_desc,variables[x]); + strip_html_brackets(service_desc); } @@ -317,6 +320,7 @@ ping_address=""; else strcpy(ping_address,variables[x]); + strip_html_brackets(ping_address); } /* we found the traceroute argument */ @@ -333,6 +337,7 @@ traceroute_address=""; else strcpy(traceroute_address,variables[x]); + strip_html_brackets(traceroute_address); } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/cgi/statuswrl.c new/nagios-2.10/cgi/statuswrl.c --- old/nagios-2.9/cgi/statuswrl.c 2006-03-27 17:38:06.000000000 +0200 +++ new/nagios-2.10/cgi/statuswrl.c 2007-10-21 16:39:52.000000000 +0200 @@ -2,8 +2,8 @@ * * STATUSWRL.C - Nagios 3-D (VRML) Network Status View * - * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org) - * Last Modified: 03-27-2006 + * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org) + * Last Modified: 10-21-2007 * * Description: * @@ -239,6 +239,7 @@ host_name="all"; else strcpy(host_name,variables[x]); + strip_html_brackets(host_name); if(!strcmp(host_name,"all")) show_all_hosts=TRUE; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/cgi/summary.c new/nagios-2.10/cgi/summary.c --- old/nagios-2.9/cgi/summary.c 2006-03-21 22:31:46.000000000 +0100 +++ new/nagios-2.10/cgi/summary.c 2007-10-21 16:39:52.000000000 +0200 @@ -2,8 +2,8 @@ * * SUMMARY.C - Nagios Alert Summary CGI * - * Copyright (c) 2002-2006 Ethan Galstad (nagios@nagios.org) - * Last Modified: 03-21-2006 + * Copyright (c) 2002-2007 Ethan Galstad (nagios@nagios.org) + * Last Modified: 10-21-2007 * * License: * @@ -1135,6 +1135,7 @@ target_hostgroup_name=""; else strcpy(target_hostgroup_name,variables[x]); + strip_html_brackets(target_hostgroup_name); if(!strcmp(target_hostgroup_name,"all")) show_all_hostgroups=TRUE; @@ -1157,6 +1158,7 @@ target_servicegroup_name=""; else strcpy(target_servicegroup_name,variables[x]); + strip_html_brackets(target_servicegroup_name); if(!strcmp(target_servicegroup_name,"all")) show_all_servicegroups=TRUE; @@ -1179,6 +1181,7 @@ target_host_name=""; else strcpy(target_host_name,variables[x]); + strip_html_brackets(target_host_name); if(!strcmp(target_host_name,"all")) show_all_hosts=TRUE; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/cgi/trends.c new/nagios-2.10/cgi/trends.c --- old/nagios-2.9/cgi/trends.c 2006-03-21 22:31:47.000000000 +0100 +++ new/nagios-2.10/cgi/trends.c 2007-10-21 16:39:52.000000000 +0200 @@ -2,8 +2,8 @@ * * TRENDS.C - Nagios State Trends CGI * - * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org) - * Last Modified: 03-21-2006 + * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org) + * Last Modified: 10-21-2007 * * License: * @@ -1207,6 +1207,7 @@ host_name=""; else strcpy(host_name,variables[x]); + strip_html_brackets(host_name); display_type=DISPLAY_HOST_TRENDS; } @@ -1224,6 +1225,7 @@ svc_description=""; else strcpy(svc_description,variables[x]); + strip_html_brackets(svc_description); display_type=DISPLAY_SERVICE_TRENDS; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/Changelog new/nagios-2.10/Changelog --- old/nagios-2.9/Changelog 2007-04-10 17:08:32.000000000 +0200 +++ new/nagios-2.10/Changelog 2007-10-21 16:47:23.000000000 +0200 @@ -3,7 +3,24 @@ ##################### -2.9 - 04/10/3007 +2.10 - 10/21/2007 +------------------ +* Added 'make install-webconf' command to install Apache web config file +* Sample config files are now installed without a -sample extension +* Fix for SIGTERMs being seen as SIGEXITs, non-logging of SIGTERMs/shutdowns +* Minor fix for notification timeout log messages +* Fix for not logging passive host check results +* Minor bug fixes in CGIs +* Fix for a segfault when processing passive host check results with empty output/perfdata +* Fix for incorrect latency calculation for passive service checks +* Bug fix with attempting to access an uninitalized mutex if external commands are disabled +* Fix for keeping service checks in the event queue when active service checks are disabled globally +* Fix for a potential cross site scripting vulnerability in the CGIs +* Program version is now displayed in CGIs + + + +2.9 - 04/10/2007 ---------------- * Fix for incorrect performance data file write/append mode options * Fix for current status of hosts with no host check command defined diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/configure new/nagios-2.10/configure --- old/nagios-2.9/configure 2007-04-10 17:08:32.000000000 +0200 +++ new/nagios-2.10/configure 2007-10-21 16:39:50.000000000 +0200 @@ -310,7 +310,7 @@ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA INSTALL build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT SET_MAKE STRIP CPP EGREP SOCKETLIBS THREADLIBS nagios_user nagios_grp INSTALL_OPTS command_user command_grp COMMAND_OPTS MAIL_PROG init_dir lockfile XSDC XSDH XCDC XCDH XRDC XRDH XODC XODH XPDC XPDH XDDC XDDH htmurl cgiurl BROKER_LDFLAGS BROKERLIBS MOD_CFLAGS MOD_LDFLAGS BROKER_O BROKER_H nagios_name nagiostats_name PATH_TO_TRACEROUTE PACKDIR VERSION SNPRINTF_O CGIEXTRAS GDLIBS PERLLIBS PERLDIR PERLXSI_O BASEEXTRALIBS INITDIR INSTALLPERLSTUFF PERL LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA INSTALL build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT SET_MAKE STRIP CPP EGREP SOCKETLIBS THREADLIBS nagios_user nagios_grp INSTALL_OPTS command_user command_grp COMMAND_OPTS HTTPD_CONF MAIL_PROG init_dir lockfile XSDC XSDH XCDC XCDH XRDC XRDH XODC XODH XPDC XPDH XDDC XDDH htmurl cgiurl BROKER_LDFLAGS BROKERLIBS MOD_CFLAGS MOD_LDFLAGS BROKER_O BROKER_H nagios_name nagiostats_name PATH_TO_TRACEROUTE PACKDIR VERSION SNPRINTF_O CGIEXTRAS GDLIBS PERLLIBS PERLDIR PERLXSI_O BASEEXTRALIBS INITDIR INSTALLPERLSTUFF PERL LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -866,6 +866,7 @@ --with-nagios-group=<grp> sets group name to run nagios --with-command-user=<user> sets user name for command access --with-command-group=<grp> sets group name for command access +--with-httpd-conf=<path_to_conf> sets path to Apache conf.d directory --with-mail=<path_to_mail> sets path to equivalent program to mail --with-init-dir=<path> sets directory to place init script into --with-lockfile=<path> sets path and file name for lock file @@ -1311,9 +1312,9 @@ PKG_NAME=nagios -PKG_VERSION="2.9" +PKG_VERSION="2.10" PKG_HOME_URL="http://www.nagios.org/" -PKG_REL_DATE="04-10-2007" +PKG_REL_DATE="10-21-2007" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do @@ -4834,6 +4835,28 @@ COMMAND_OPTS="-o $command_user -g $command_grp" +HTTP_CONF=no + +# Check whether --with-httpd_conf or --without-httpd_conf was given. +if test "${with_httpd_conf+set}" = set; then + withval="$with_httpd_conf" + HTTPD_CONF=$withval +else + HTTPD_CONF=no +fi; +if test HTTPD_CONF=no; then + if test -d /etc/httpd/conf.d; then + HTTPD_CONF="/etc/httpd/conf.d" + elif test -d /etc/apache2/conf.d; then + HTTPD_CONF="/etc/apache2/conf.d" + elif test -d /etc/apache/conf.d; then + HTTPD_CONF="/etc/apache/conf.d" + else + HTTPD_CONF="/etc/httpd/conf.d" + fi +fi + + MAIL_PROG=no # Check whether --with-mail or --without-mail was given. @@ -7197,6 +7220,7 @@ s,@command_user@,$command_user,;t t s,@command_grp@,$command_grp,;t t s,@COMMAND_OPTS@,$COMMAND_OPTS,;t t +s,@HTTPD_CONF@,$HTTPD_CONF,;t t s,@MAIL_PROG@,$MAIL_PROG,;t t s,@init_dir@,$init_dir,;t t s,@lockfile@,$lockfile,;t t @@ -7787,6 +7811,8 @@ echo "${ECHO_T} Lock file: $lockfile" >&6 echo "$as_me:$LINENO: result: Init directory: $init_dir" >&5 echo "${ECHO_T} Init directory: $init_dir" >&6 +echo "$as_me:$LINENO: result: Apache conf.d directory: $HTTPD_CONF" >&5 +echo "${ECHO_T} Apache conf.d directory: $HTTPD_CONF" >&6 echo "$as_me:$LINENO: result: Host OS: $host_os" >&5 echo "${ECHO_T} Host OS: $host_os" >&6 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/configure.in new/nagios-2.10/configure.in --- old/nagios-2.9/configure.in 2007-04-10 17:08:32.000000000 +0200 +++ new/nagios-2.10/configure.in 2007-10-21 16:39:51.000000000 +0200 @@ -9,9 +9,9 @@ AC_PREFIX_DEFAULT(/usr/local/nagios) PKG_NAME=nagios -PKG_VERSION="2.9" +PKG_VERSION="2.10" PKG_HOME_URL="http://www.nagios.org/" -PKG_REL_DATE="04-10-2007" +PKG_REL_DATE="10-21-2007" dnl Figure out how to invoke "install" and what install options to use. AC_PROG_INSTALL @@ -147,6 +147,22 @@ COMMAND_OPTS="-o $command_user -g $command_grp" AC_SUBST(COMMAND_OPTS) +dnl Check for location of Apache conf.d directory +HTTP_CONF=no +AC_ARG_WITH(httpd_conf,--with-httpd-conf=<path_to_conf> sets path to Apache conf.d directory,HTTPD_CONF=$withval,HTTPD_CONF=no) +if test HTTPD_CONF=no; then + if test -d /etc/httpd/conf.d; then + HTTPD_CONF="/etc/httpd/conf.d" + elif test -d /etc/apache2/conf.d; then + HTTPD_CONF="/etc/apache2/conf.d" + elif test -d /etc/apache/conf.d; then + HTTPD_CONF="/etc/apache/conf.d" + else + HTTPD_CONF="/etc/httpd/conf.d" + fi +fi +AC_SUBST(HTTPD_CONF) + dnl Check for location of mail program MAIL_PROG=no AC_ARG_WITH(mail,--with-mail=<path_to_mail> sets path to equivalent program to mail,MAIL_PROG=$withval,MAIL_PROG=no) @@ -726,6 +742,7 @@ AC_MSG_RESULT([ Install ${prefix}: $prefix]) AC_MSG_RESULT([ Lock file: $lockfile]) AC_MSG_RESULT([ Init directory: $init_dir]) +AC_MSG_RESULT([ Apache conf.d directory: $HTTPD_CONF]) AC_MSG_RESULT([ Host OS: $host_os]) echo "" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/html/docs/cgis.html new/nagios-2.10/html/docs/cgis.html --- old/nagios-2.9/html/docs/cgis.html 2003-10-16 01:49:23.000000000 +0200 +++ new/nagios-2.10/html/docs/cgis.html 2007-04-12 19:24:03.000000000 +0200 @@ -129,7 +129,7 @@ <td align=left valign=top width="50%"> <p> <strong>Description:</strong><br> -This CGI creates a map of all hosts that you have defined on your network. The CGI uses Thomas Boutell's <a href="http://www.boutell.com/gd">gd</a> library (version 1.6.3 or higher) to create a PNG image of your network layout. The coordinates used when drawing each host (along with the optional pretty icons) are taken from <a href="configextinfo.html">extended host information</a> definitions. If you'd prefer to let the CGI automatically generate drawing coordinates for you, use the <a href="configcgi.html#default_statusmap_layout">default_statusmap_layout</a> directive to specify a layout algorithm that should be used. If you can't seem to find this CGI, or if you have get errors when trying to compile or run it, read <a href="faqs.html#gd_library_problems">this FAQ</a>. +This CGI creates a map of all hosts that you have defined on your network. The CGI uses Thomas Boutell's <a href="http://www.boutell.com/gd">gd</a> library (version 1.6.3 or higher) to create a PNG image of your network layout. The coordinates used when drawing each host (along with the optional pretty icons) are taken from <a href="configextinfo.html">extended host information</a> definitions. If you'd prefer to let the CGI automatically generate drawing coordinates for you, use the <a href="configcgi.html#default_statusmap_layout">default_statusmap_layout</a> directive to specify a layout algorithm that should be used. </p> <p> <strong>Authorization Requirements:</strong><br> @@ -404,7 +404,6 @@ <p> <ul> <li>If you have chosen not to <a href="configcgi.html#use_authentication">use authentication</a> with the CGIs, this CGI will <i>not</i> allow anyone to issue commands to Nagios. This is done for your own protection. I would suggest removing this CGI altogether if you decide not to use authentication with the CGIs. -<li>In order for the CGI to issue commands to Nagios, you will have to set the proper file and directory permissions as described in <a href="faqs.html#command_file_permissions">this FAQ</a>. </ul> </p> </td> @@ -616,7 +615,7 @@ <td align=left valign=top width="50%"> <p> <strong>Description:</strong><br> -This CGI is used to create a graph of host or service states over an arbitrary period of time. In order for this CGI to be of much use, you should enable <a href="configmain.html#log_rotation_method">log rotation</a> and keep archived logs in the path specified by the <a href="configmain.html#log_archive_path">log_archive_path</a> directive. The CGI uses Thomas Boutell's <a href="http://www.boutell.com/gd">gd</a> library (version 1.6.3 or higher) to create the trends image. If you can't seem to find this CGI or if you have get errors when trying to compile or run it, read <a href="faqs.html#gd_library_problems">this FAQ</a>. +This CGI is used to create a graph of host or service states over an arbitrary period of time. In order for this CGI to be of much use, you should enable <a href="configmain.html#log_rotation_method">log rotation</a> and keep archived logs in the path specified by the <a href="configmain.html#log_archive_path">log_archive_path</a> directive. The CGI uses Thomas Boutell's <a href="http://www.boutell.com/gd">gd</a> library (version 1.6.3 or higher) to create the trends image. </p> <p> <strong>Authorization Requirements:</strong><br> @@ -706,7 +705,7 @@ <td align=left valign=top width="50%"> <p> <strong>Description:</strong><br> -This CGI is used to report on the availability of hosts and services over a user-specified period of time. In order for this CGI to be of much use, you should enable <a href="configmain.html#log_rotation_method">log rotation</a> and keep archived logs in the path specified by the <a href="configmain.html#log_archive_path">log_archive_path</a> directive. The CGI uses Thomas Boutell's <a href="http://www.boutell.com/gd">gd</a> library (version 1.6.3 or higher) to create the histogram image. If you can't seem to find this CGI or if you have get errors when trying to compile or run it, read <a href="faqs.html#gd_library_problems">this FAQ</a>. +This CGI is used to report on the availability of hosts and services over a user-specified period of time. In order for this CGI to be of much use, you should enable <a href="configmain.html#log_rotation_method">log rotation</a> and keep archived logs in the path specified by the <a href="configmain.html#log_archive_path">log_archive_path</a> directive. The CGI uses Thomas Boutell's <a href="http://www.boutell.com/gd">gd</a> library (version 1.6.3 or higher) to create the histogram image. </p> <p> <strong>Authorization Requirements:</strong><br> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/html/docs/configmain.html new/nagios-2.10/html/docs/configmain.html --- old/nagios-2.9/html/docs/configmain.html 2006-12-21 18:16:24.000000000 +0100 +++ new/nagios-2.10/html/docs/configmain.html 2007-04-12 19:24:03.000000000 +0200 @@ -767,7 +767,7 @@ </p> <p> -This option determines whether or not Nagios will check the <a href="#command_file">command file</a> for commands that should be executed. This option must be enabled if you plan on using the <a href="cgis.html#command_cgi">command CGI</a> to issue commands via the web interface. Third party programs can also issue commands to Nagios by writing to the command file, provided proper rights to the file have been granted as outlined in <a href="faqs.html#command_file_permissions">this FAQ</a>. More information on external commands can be found <a href="extcommands.html">here</a>. +This option determines whether or not Nagios will check the <a href="#command_file">command file</a> for commands that should be executed. This option must be enabled if you plan on using the <a href="cgis.html#command_cgi">command CGI</a> to issue commands via the web interface. More information on external commands can be found <a href="extcommands.html">here</a>. </p> <p> <ul> @@ -2313,7 +2313,7 @@ </tr> </table> </p> -This option allows you to specify a command to be run after <i>every</i> service check to process service <a href="perdata.html">performance data</a> that may be returned from the check. The <i>command</i> argument is the short name of a <a href="xodtemplate.html#command">command definition</a> that you define in your object configuration file. This command is only executed if the <a href="#process_performance_data">process_performance_data</a> option is enabled globally and if the <i>process_perf_data</i> directive in the <a href="xodtemplate.html#service">service definition</a> is enabled. +This option allows you to specify a command to be run after <i>every</i> service check to process service <a href="perfdata.html">performance data</a> that may be returned from the check. The <i>command</i> argument is the short name of a <a href="xodtemplate.html#command">command definition</a> that you define in your object configuration file. This command is only executed if the <a href="#process_performance_data">process_performance_data</a> option is enabled globally and if the <i>process_perf_data</i> directive in the <a href="xodtemplate.html#service">service definition</a> is enabled. </p> @@ -2338,7 +2338,7 @@ </tr> </table> </p> -This option allows you to specify a file to which host <a href="perdata.html">performance data</a> will be written after every host check. Data will be written to the performance file as specified by the <a href="#host_perfdata_file_template">host_perfdata_file_template</a> option. Performance data is only written to this file if the <a href="#process_performance_data">process_performance_data</a> option is enabled globally and if the <i>process_perf_data</i> directive in the <a href="xodtemplate.html#host">host definition</a> is enabled. +This option allows you to specify a file to which host <a href="perfdata.html">performance data</a> will be written after every host check. Data will be written to the performance file as specified by the <a href="#host_perfdata_file_template">host_perfdata_file_template</a> option. Performance data is only written to this file if the <a href="#process_performance_data">process_performance_data</a> option is enabled globally and if the <i>process_perf_data</i> directive in the <a href="xodtemplate.html#host">host definition</a> is enabled. </p> @@ -2363,7 +2363,7 @@ </tr> </table> </p> -This option allows you to specify a file to which service <a href="perdata.html">performance data</a> will be written after every service check. Data will be written to the performance file as specified by the <a href="#service_perfdata_file_template">service_perfdata_file_template</a> option. Performance data is only written to this file if the <a href="#process_performance_data">process_performance_data</a> option is enabled globally and if the <i>process_perf_data</i> directive in the <a href="xodtemplate.html#service">service definition</a> is enabled. +This option allows you to specify a file to which service <a href="perfdata.html">performance data</a> will be written after every service check. Data will be written to the performance file as specified by the <a href="#service_perfdata_file_template">service_perfdata_file_template</a> option. Performance data is only written to this file if the <a href="#process_performance_data">process_performance_data</a> option is enabled globally and if the <i>process_perf_data</i> directive in the <a href="xodtemplate.html#service">service definition</a> is enabled. </p> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/html/docs/distributed.html new/nagios-2.10/html/docs/distributed.html --- old/nagios-2.9/html/docs/distributed.html 2006-05-13 20:28:21.000000000 +0200 +++ new/nagios-2.10/html/docs/distributed.html 2007-04-23 17:44:26.000000000 +0200 @@ -123,7 +123,7 @@ <pre> define command{ command_name submit_check_result - command_line /usr/local/nagios/libexec/eventhandlers/submit_check_result $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATEID$ '$SERVICEOUTPUT$' + command_line /usr/local/nagios/libexec/eventhandlers/submit_check_result $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATE$ '$SERVICEOUTPUT$' } </pre> </font> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/html/docs/embeddedperl.html new/nagios-2.10/html/docs/embeddedperl.html --- old/nagios-2.9/html/docs/embeddedperl.html 2005-11-15 05:23:35.000000000 +0100 +++ new/nagios-2.10/html/docs/embeddedperl.html 2007-04-12 19:27:02.000000000 +0200 @@ -273,7 +273,7 @@ # service[check_nfs]=NFS;24x7;3;5;5;unix-admin;60;24x7;1;1;1;;check_rpc # # initial version: 3 May 2000 by Truongchinh Nguyen and Karl DeBisschop -# current status: $Revision: 1.26 $ +# current status: $Revision: 1.26.2.2 $ # # Copyright Notice: GPL # diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/html/docs/networkreachability.html new/nagios-2.10/html/docs/networkreachability.html --- old/nagios-2.9/html/docs/networkreachability.html 2005-02-02 19:51:23.000000000 +0100 +++ new/nagios-2.10/html/docs/networkreachability.html 2007-04-12 19:24:05.000000000 +0200 @@ -94,7 +94,7 @@ </p> <p> -I get lots of email from people asking why Nagios is sending notifications out about hosts that are unreachable. The answer is because you configured it to do that. If you want to disable UNREACHABLE notifications for hosts, modify the <i>notification_options</i> argument of your host definitions to not include the <i>u</i> (unreachable) option. More information can be found in <a href="faqs.html#unreachable_notifications">this FAQ</a>. +I get lots of email from people asking why Nagios is sending notifications out about hosts that are unreachable. The answer is because you configured it to do that. If you want to disable UNREACHABLE notifications for hosts, modify the <i>notification_options</i> argument of your host definitions to not include the <i>u</i> (unreachable) option. </p> <hr> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/html/docs/redundancy.html new/nagios-2.10/html/docs/redundancy.html --- old/nagios-2.9/html/docs/redundancy.html 2005-03-23 23:07:07.000000000 +0100 +++ new/nagios-2.10/html/docs/redundancy.html 2007-04-12 19:24:05.000000000 +0200 @@ -60,7 +60,7 @@ <ul> <li>Implementing <a href="eventhandlers.html">event handlers</a> for hosts and services <li>Issuing <a href="extcommands.html">external commands</a> to Nagios via shell scripts -<li>Executing plugins on <a href="faqs.html#remote_host_monitoring">remote hosts</a> using either the <a href="addons.html#nrpe">nrpe addon</a> or some other method +<li>Executing plugins on remote hosts using either the <a href="addons.html#nrpe">nrpe addon</a> or some other method <li>Checking the status of the Nagios process with the <a href="plugins.html#check_nagios">check_nagios</a> plugin </ul> </p> @@ -148,7 +148,7 @@ <p> <ul> <li>The host definition for host A (in the host E configuration file) should have a host <a href="eventhandlers.html">event handler</a> defined. Lets say the name of the host event handler is <font color="red">handle-master-host-event</font>. -<li>The configuration file on host E should have a service defined to check the status of the Nagios process on host A. Lets assume that you define this service check to run the <i>check_nagios</i> plugin on host A. This can be done by using one of the methods described in <a href="faqs.html#remote_host_monitoring">this FAQ</a>. +<li>The configuration file on host E should have a service defined to check the status of the Nagios process on host A. Lets assume that you define this service check to run the <i>check_nagios</i> plugin on host A (using NRPE, SSH, etc.). <li>The service definition for the Nagios process check on host A should have an <a href="eventhandlers.html">event handler</a> defined. Lets say the name of the service event handler is <font color="red">handle-master-proc-event</font>. </ul> </p> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/html/docs/volatileservices.html new/nagios-2.10/html/docs/volatileservices.html --- old/nagios-2.9/html/docs/volatileservices.html 2005-12-14 17:51:03.000000000 +0100 +++ new/nagios-2.10/html/docs/volatileservices.html 2007-04-12 19:24:06.000000000 +0200 @@ -132,7 +132,7 @@ </p> <p> -Note that if you are running PortSentry as root, you will have to make additions to the script to reset file ownership and permissions so that Nagios and the CGIs can read/modify the command file. Details on permissions/ownership of the command file can be found <a href="faqs.html#command_file_permissions">here</a>. +Note that if you are running PortSentry as root, you will have to make additions to the script to reset file ownership and permissions so that Nagios and the CGIs can read/modify the command file. </p> <p> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/html/docs/whatsnew.html new/nagios-2.10/html/docs/whatsnew.html --- old/nagios-2.9/html/docs/whatsnew.html 2006-01-04 17:39:57.000000000 +0100 +++ new/nagios-2.10/html/docs/whatsnew.html 2007-04-12 19:24:07.000000000 +0200 @@ -24,7 +24,7 @@ <hr> <p> -<font color='red'><strong>Important:</strong></font> Make sure you read through the documentation (especially the <a href="faqs.html">FAQs</a>) before sending a question to the mailing lists. +<font color='red'><strong>Important:</strong></font> Make sure you read through the documentation before sending a question to the mailing lists. </p> @@ -34,7 +34,7 @@ </p> <p> -The change log for Nagios can be found online at <a href="http://www.nagios.org/changelog.php">http://www.nagios.org/changelog.php</a> or in the <b>Changelog</b> file in the root directory of the source code distribution. +The change log for Nagios can be found online at <a href="http://www.nagios.org/development/changelog.php">http://www.nagios.org/development/changelog.php</a> or in the <b>Changelog</b> file in the root directory of the source code distribution. </p> <p> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/html/main.html new/nagios-2.10/html/main.html --- old/nagios-2.9/html/main.html 2007-04-10 17:08:32.000000000 +0200 +++ new/nagios-2.10/html/main.html 2007-10-21 16:39:53.000000000 +0200 @@ -35,8 +35,8 @@ <P> <div align=center> -<div align=center CLASS="version">Version 2.9</div> -<div align=center CLASS="releaseDate">April 10, 2007</div> +<div align=center CLASS="version">Version 2.10</div> +<div align=center CLASS="releaseDate">October 21, 2007</div> </div> </P> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/include/cgiutils.h.in new/nagios-2.10/include/cgiutils.h.in --- old/nagios-2.9/include/cgiutils.h.in 2007-04-10 16:50:23.000000000 +0200 +++ new/nagios-2.10/include/cgiutils.h.in 2007-10-21 16:39:53.000000000 +0200 @@ -2,7 +2,7 @@ * * CGIUTILS.H - Header file for common CGI functions * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org) - * Last Modified: 04-10-2007 + * Last Modified: 10-21-2007 * * License: * @@ -471,6 +471,7 @@ char * url_encode(char *); /* encodes a string in proper URL format */ char * html_encode(char *); /* encodes a string in HTML format (for what the user sees) */ char * strip_plugin_html(char *); /* strips dangerous HTML from plugin output */ +void strip_html_brackets(char *); void get_time_breakdown(unsigned long,int *,int *,int *,int *); /* given total seconds, get days, hours, minutes, seconds */ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/include/common.h new/nagios-2.10/include/common.h --- old/nagios-2.9/include/common.h 2007-04-10 17:08:32.000000000 +0200 +++ new/nagios-2.10/include/common.h 2007-10-21 16:39:53.000000000 +0200 @@ -21,8 +21,8 @@ ************************************************************************/ -#define PROGRAM_VERSION "2.9" -#define PROGRAM_MODIFICATION_DATE "04-10-2007" +#define PROGRAM_VERSION "2.10" +#define PROGRAM_MODIFICATION_DATE "10-21-2007" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/Makefile.in new/nagios-2.10/Makefile.in --- old/nagios-2.9/Makefile.in 2007-02-12 23:16:42.000000000 +0100 +++ new/nagios-2.10/Makefile.in 2007-04-23 17:44:25.000000000 +0200 @@ -1,7 +1,7 @@ ############################### # Makefile for Nagios # -# Last Modified: 02-12-2007 +# Last Modified: 04-23-2007 ############################### @@ -29,6 +29,7 @@ INSTALL=@INSTALL@ INSTALL_OPTS=@INSTALL_OPTS@ COMMAND_OPTS=@COMMAND_OPTS@ +HTTPD_CONF=@HTTPD_CONF@ INIT_DIR=@init_dir@ INIT_OPTS=-o root -g root CGICFGDIR=$(CGIDIR) @@ -213,11 +214,11 @@ install-config: $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR) - $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/nagios.cfg $(DESTDIR)$(CFGDIR)/nagios.cfg-sample - $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg-sample - $(INSTALL) -m 660 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg-sample - $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/localhost.cfg $(DESTDIR)$(CFGDIR)/localhost.cfg-sample - $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/commands.cfg $(DESTDIR)$(CFGDIR)/commands.cfg-sample + $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/nagios.cfg $(DESTDIR)$(CFGDIR)/nagios.cfg + $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg + $(INSTALL) -b -m 660 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg + $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/localhost.cfg $(DESTDIR)$(CFGDIR)/localhost.cfg + $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/commands.cfg $(DESTDIR)$(CFGDIR)/commands.cfg @echo "" @echo "*** Sample config file installed ***" @@ -233,6 +234,13 @@ @echo "*BEFORE* you post a question to one of the mailing lists." @echo "" +install-webconf: + $(INSTALL) -m 644 sample-config/httpd.conf $(HTTPD_CONF)/nagios.conf + + @echo "" + @echo "*** Nagios/Apache conf file installed ***" + @echo "" + install-init: install-daemoninit install-daemoninit: diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/nagios.spec new/nagios-2.10/nagios.spec --- old/nagios-2.9/nagios.spec 2007-04-10 17:08:32.000000000 +0200 +++ new/nagios-2.10/nagios.spec 2007-10-21 16:39:51.000000000 +0200 @@ -1,5 +1,5 @@ %define name nagios -%define version 2.9 +%define version 2.10 %define release 1.fc4.test %define nsusr nagios %define nsgrp nagios diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/update-version new/nagios-2.10/update-version --- old/nagios-2.9/update-version 2007-04-10 17:08:32.000000000 +0200 +++ new/nagios-2.10/update-version 2007-10-21 16:39:51.000000000 +0200 @@ -10,10 +10,10 @@ fi # Current version number -CURRENTVERSION=2.9 +CURRENTVERSION=2.10 # Last date -LASTDATE=04-10-2007 +LASTDATE=10-21-2007 if [ "x$1" = "x" ] then diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.9/xdata/xsddefault.c new/nagios-2.10/xdata/xsddefault.c --- old/nagios-2.9/xdata/xsddefault.c 2007-01-03 03:50:43.000000000 +0100 +++ new/nagios-2.10/xdata/xsddefault.c 2007-10-18 19:10:25.000000000 +0200 @@ -3,7 +3,7 @@ * XSDDEFAULT.C - Default external status data input routines for Nagios * * Copyright (c) 2000-2007 Ethan Galstad (nagios@nagios.org) - * Last Modified: 01-02-2007 + * Last Modified: 10-19-2007 * * License: * @@ -85,6 +85,7 @@ extern int enable_failure_prediction; extern int process_performance_data; extern int aggregate_status_updates; +extern int check_external_commands; extern int external_command_buffer_slots; extern int check_result_buffer_slots; @@ -338,10 +339,16 @@ pthread_mutex_unlock(&service_result_buffer.buffer_lock); /* get number of items in the command buffer */ - pthread_mutex_lock(&external_command_buffer.buffer_lock); - used_external_command_buffer_slots=external_command_buffer.items; - high_external_command_buffer_slots=external_command_buffer.high; - pthread_mutex_unlock(&external_command_buffer.buffer_lock); + if(check_external_commands==TRUE){ + pthread_mutex_lock(&external_command_buffer.buffer_lock); + used_external_command_buffer_slots=external_command_buffer.items; + high_external_command_buffer_slots=external_command_buffer.high; + pthread_mutex_unlock(&external_command_buffer.buffer_lock); + } + else{ + used_external_command_buffer_slots=0; + high_external_command_buffer_slots=0; + } /* write version info to status file */ fprintf(fp,"########################################\n"); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org