Hello community,
here is the log from the commit of package nagios
checked in at Tue Mar 13 00:59:00 CET 2007.
--------
--- nagios/nagios.changes 2007-02-09 11:03:46.000000000 +0100
+++ /mounts/work_src_done/STABLE/nagios/nagios.changes 2007-03-12 13:28:16.004507000 +0100
@@ -1,0 +2,12 @@
+Mon Mar 12 13:27:34 CET 2007 - tsieden@suse.de
+
+- update to nagios version 2.8
+ * Bug fix for calculating notification interval with service escalations
+ * Bug fix for using servicegroups in service dependency definitions
+ * Bug fix for bad date format submission in command CGI
+ * Possible segfault fix during restarts when daemon was performing host checks
+ * Fix for missing check timeout in event broker calls
+ * Fix for handling signals under NPTL
+ * Added error messages for passive service checks that don't correspond to a defined service
+
+-------------------------------------------------------------------
Old:
----
nagios-2.7.tar.bz2
New:
----
nagios-2.8.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nagios.spec ++++++
--- /var/tmp/diff_new_pack.b12918/_old 2007-03-13 00:58:46.000000000 +0100
+++ /var/tmp/diff_new_pack.b12918/_new 2007-03-13 00:58:46.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package nagios (Version 2.7)
+# spec file for package nagios (Version 2.8)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,7 +13,7 @@
Name: nagios
BuildRequires: apache2-devel freetype2-devel gd-devel iputils libapr-util1-devel libjpeg-devel libpng-devel mailx pcre-devel xorg-x11-devel
Summary: The Nagios Network Monitor
-Version: 2.7
+Version: 2.8
Release: 1
URL: http://www.nagios.org/
License: GNU General Public License (GPL)
@@ -191,7 +191,16 @@
%dir %{apache2_sysconfdir}/conf.d
%config(noreplace) %{apache2_sysconfdir}/conf.d/*
-%changelog -n nagios
+%changelog
+* Mon Mar 12 2007 - tsieden@suse.de
+- update to nagios version 2.8
+ * Bug fix for calculating notification interval with service escalations
+ * Bug fix for using servicegroups in service dependency definitions
+ * Bug fix for bad date format submission in command CGI
+ * Possible segfault fix during restarts when daemon was performing host checks
+ * Fix for missing check timeout in event broker calls
+ * Fix for handling signals under NPTL
+ * Added error messages for passive service checks that don't correspond to a defined service
* Fri Feb 09 2007 - tsieden@suse.de
- update to nagios version 2.7
* p1.pl now sets environment var (NAGIOS_PLUGIN) to indicate patch of plugin that is executing
++++++ nagios-2.7.tar.bz2 -> nagios-2.8.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/base/checks.c new/nagios-2.8/base/checks.c
--- old/nagios-2.7/base/checks.c 2006-06-21 02:59:19.000000000 +0200
+++ new/nagios-2.8/base/checks.c 2007-03-01 20:15:10.000000000 +0100
@@ -2,8 +2,8 @@
*
* CHECKS.C - Service and host check functions for Nagios
*
- * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 06-20-2006
+ * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)
+ * Last Modified: 03-01-2006
*
* License:
*
@@ -271,7 +271,7 @@
/* send data to event broker */
end_time.tv_sec=0L;
end_time.tv_usec=0L;
- broker_service_check(NEBTYPE_SERVICECHECK_INITIATE,NEBFLAG_NONE,NEBATTR_NONE,svc,SERVICE_CHECK_ACTIVE,start_time,end_time,svc->service_check_command,svc->latency,0.0,0,FALSE,0,processed_command,NULL);
+ broker_service_check(NEBTYPE_SERVICECHECK_INITIATE,NEBFLAG_NONE,NEBATTR_NONE,svc,SERVICE_CHECK_ACTIVE,start_time,end_time,svc->service_check_command,svc->latency,0.0,service_check_timeout,FALSE,0,processed_command,NULL);
#endif
#ifdef EMBEDDEDPERL
@@ -2055,7 +2055,7 @@
/* send data to event broker */
end_time.tv_sec=0L;
end_time.tv_usec=0L;
- broker_host_check(NEBTYPE_HOSTCHECK_INITIATE,NEBFLAG_NONE,NEBATTR_NONE,hst,HOST_CHECK_ACTIVE,hst->current_state,hst->state_type,start_time,end_time,hst->host_check_command,hst->latency,0.0,0,FALSE,0,NULL,NULL,NULL,NULL);
+ broker_host_check(NEBTYPE_HOSTCHECK_INITIATE,NEBFLAG_NONE,NEBATTR_NONE,hst,HOST_CHECK_ACTIVE,hst->current_state,hst->state_type,start_time,end_time,hst->host_check_command,hst->latency,0.0,host_check_timeout,FALSE,0,NULL,NULL,NULL,NULL);
#endif
/* make sure we return the original host state unless it changes... */
@@ -2098,8 +2098,9 @@
if(sigrestart==TRUE || sigshutdown==TRUE){
hst->current_attempt=1;
hst->current_state=old_state;
- free(hst->plugin_output);
- hst->plugin_output=(char *)old_plugin_output;
+ if(hst->plugin_output!=NULL)
+ free(hst->plugin_output);
+ hst->plugin_output=(char *)strdup(old_plugin_output);
return hst->current_state;
}
@@ -2194,8 +2195,9 @@
if(sigrestart==TRUE || sigshutdown==TRUE){
hst->current_attempt=1;
hst->current_state=old_state;
- free(hst->plugin_output);
- hst->plugin_output=(char *)old_plugin_output;
+ if(hst->plugin_output!=NULL)
+ free(hst->plugin_output);
+ hst->plugin_output=(char *)strdup(old_plugin_output);
return hst->current_state;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/base/commands.c new/nagios-2.8/base/commands.c
--- old/nagios-2.7/base/commands.c 2007-01-03 03:50:40.000000000 +0100
+++ new/nagios-2.8/base/commands.c 2007-03-05 18:34:39.000000000 +0100
@@ -2,8 +2,8 @@
*
* COMMANDS.C - External command functions for Nagios
*
- * Copyright (c) 1999-2005 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 12-26-2005
+ * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)
+ * Last Modified: 03-05-2007
*
* License:
*
@@ -1793,6 +1793,7 @@
host *temp_host=NULL;
service *temp_service=NULL;
char *real_host_name=NULL;
+ char temp_buffer[MAX_INPUT_BUFFER]="";
#ifdef DEBUG0
printf("process_passive_service_check() start\n");
@@ -1819,12 +1820,24 @@
}
/* we couldn't find the host */
- if(real_host_name==NULL)
+ if(real_host_name==NULL){
+
+ snprintf(temp_buffer,sizeof(temp_buffer),"Warning: Passive check result was received for service '%s' on host '%s', but the host could not be found!\n",svc_description,host_name);
+ temp_buffer[sizeof(temp_buffer)-1]='\x0';
+ write_to_logs_and_console(temp_buffer,NSLOG_RUNTIME_WARNING,TRUE);
+
return ERROR;
+ }
/* make sure the service exists */
- if((temp_service=find_service(real_host_name,svc_description))==NULL)
+ if((temp_service=find_service(real_host_name,svc_description))==NULL){
+
+ snprintf(temp_buffer,sizeof(temp_buffer),"Warning: Passive check result was received for service '%s' on host '%s', but the service could not be found!\n",svc_description,host_name);
+ temp_buffer[sizeof(temp_buffer)-1]='\x0';
+ write_to_logs_and_console(temp_buffer,NSLOG_RUNTIME_WARNING,TRUE);
+
return ERROR;
+ }
/* skip this is we aren't accepting passive checks for this service */
if(temp_service->accept_passive_service_checks==FALSE)
@@ -1943,7 +1956,7 @@
char temp_plugin_output[MAX_PLUGINOUTPUT_LENGTH]="";
char old_plugin_output[MAX_PLUGINOUTPUT_LENGTH]="";
char *temp_ptr;
- char temp_buffer[MAX_INPUT_BUFFER];
+ char temp_buffer[MAX_INPUT_BUFFER]="";
#ifdef DEBUG0
printf("process_passive_host_check() start\n");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/base/events.c new/nagios-2.8/base/events.c
--- old/nagios-2.7/base/events.c 2007-01-08 23:24:13.000000000 +0100
+++ new/nagios-2.8/base/events.c 2007-03-05 20:55:34.000000000 +0100
@@ -3,7 +3,7 @@
* EVENTS.C - Timed event functions for Nagios
*
* Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 01-08-2007
+ * Last Modified: 03-05-2007
*
* License:
*
@@ -1288,7 +1288,11 @@
#endif
/* process scheduled downtime info */
- handle_scheduled_downtime_by_id((unsigned long)event->event_data);
+ if(event->event_data){
+ handle_scheduled_downtime_by_id(*(unsigned long *)event->event_data);
+ free(event->event_data);
+ event->event_data=NULL;
+ }
break;
case EVENT_SFRESHNESS_CHECK:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/base/nagios.c new/nagios-2.8/base/nagios.c
--- old/nagios-2.7/base/nagios.c 2007-01-19 23:02:00.000000000 +0100
+++ new/nagios-2.8/base/nagios.c 2007-03-08 17:12:05.000000000 +0100
@@ -3,12 +3,12 @@
* NAGIOS.C - Core Program Code For Nagios
*
* Program: Nagios
- * Version: 2.7
+ * Version: 2.8
* License: GPL
* Copyright (c) 1999-2007 Ethan Galstad (http://www.nagios.org)
*
* First Written: 01-28-1999 (start of development)
- * Last Modified: 01-19-2007
+ * Last Modified: 03-08-2007
*
* Description:
*
@@ -142,6 +142,9 @@
int sigshutdown=FALSE;
int sigrestart=FALSE;
+static 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};
+int caught_signal=FALSE;
+int sig_id=0;
int restarting=FALSE;
@@ -223,7 +226,7 @@
char buffer[MAX_INPUT_BUFFER];
int display_license=FALSE;
int display_help=FALSE;
- int c;
+ int c=0,x=0;
#ifdef HAVE_GETOPT_H
int option_index=0;
@@ -711,6 +714,29 @@
/* (doesn't return until a restart or shutdown signal is encountered) */
event_execution_loop();
+ /* 03/01/2007 EG Moved from sighandler() to prevent FUTEX locking problems under NPTL */
+ /* did we catch a signal? */
+ if(caught_signal==TRUE){
+
+ if(sig_id<0)
+ sig_id=-sig_id;
+
+ for(x=0;sigs[x]!=(char *)NULL;x++);
+ sig_id%=x;
+
+ if(sig_id==SIGHUP)
+ snprintf(buffer,sizeof(buffer),"Caught SIGHUP, restarting...\n");
+ else
+ snprintf(buffer,sizeof(buffer),"Caught SIG%s, shutting down...\n",sigs[sig_id]);
+ buffer[sizeof(buffer)-1]='\x0';
+
+#ifdef DEBUG2
+ printf("%s\n",buffer);
+#endif
+
+ write_to_all_logs(buffer,NSLOG_PROCESS_INFO);
+ }
+
#ifdef USE_EVENT_BROKER
/* send program data to broker */
broker_program_state(NEBTYPE_PROCESS_EVENTLOOPEND,NEBFLAG_NONE,NEBATTR_NONE,NULL);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/base/nagiostats.c new/nagios-2.8/base/nagiostats.c
--- old/nagios-2.7/base/nagiostats.c 2007-01-19 23:02:00.000000000 +0100
+++ new/nagios-2.8/base/nagiostats.c 2007-03-08 17:12:05.000000000 +0100
@@ -3,11 +3,11 @@
* NAGIOSTATS.C - Displays Nagios Statistics
*
* Program: Nagiostats
- * Version: 2.7
+ * Version: 2.8
* License: GPL
* Copyright (c) 2003-2007 Ethan Galstad (nagios@nagios.org)
*
- * Last Modified: 01-19-2007
+ * Last Modified: 03-08-2007
*
* License:
*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/base/notifications.c new/nagios-2.8/base/notifications.c
--- old/nagios-2.7/base/notifications.c 2006-04-08 00:24:13.000000000 +0200
+++ new/nagios-2.8/base/notifications.c 2007-01-20 05:25:40.000000000 +0100
@@ -2,8 +2,8 @@
*
* NOTIFICATIONS.C - Service and host notification functions for Nagios
*
- * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 04-07-2006
+ * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)
+ * Last Modified: 01-19-2007
*
* License:
*
@@ -1637,7 +1637,7 @@
/* else use the shortest of all valid escalation intervals */
else if(temp_se->notification_intervalnotification_interval;
+ interval_to_use=temp_se->notification_interval;
#ifdef DEBUG4
printf("\t\tNew interval: %d\n",interval_to_use);
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/base/utils.c new/nagios-2.8/base/utils.c
--- old/nagios-2.7/base/utils.c 2007-01-03 03:50:41.000000000 +0100
+++ new/nagios-2.8/base/utils.c 2007-03-01 20:15:11.000000000 +0100
@@ -2,8 +2,8 @@
*
* UTILS.C - Miscellaneous utility functions for Nagios
*
- * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 12-26-2006
+ * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)
+ * Last Modified: 03-01-2007
*
* License:
*
@@ -76,6 +76,8 @@
extern int sigshutdown;
extern int sigrestart;
+extern int caught_signal;
+extern int sig_id;
extern int daemon_mode;
extern int daemon_dumps_core;
@@ -3375,56 +3377,27 @@
/* handle signals */
void sighandler(int sig){
- static 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};
- int i;
- char temp_buffer[MAX_INPUT_BUFFER];
-
/* if shutdown is already true, we're in a signal trap loop! */
- if(sigshutdown==TRUE)
+ /* changed 09/07/06 to only exit on segfaults */
+ if(sigshutdown==TRUE && sig==SIGSEGV)
exit(ERROR);
+ caught_signal=TRUE;
+
if(sig<0)
sig=-sig;
- for(i=0;sigs[i]!=(char *)NULL;i++);
-
- sig%=i;
+ sig_id=sig;
/* we received a SIGHUP, so restart... */
- if(sig==SIGHUP){
-
+ if(sig==SIGHUP)
sigrestart=TRUE;
- sprintf(temp_buffer,"Caught SIGHUP, restarting...\n");
- write_to_all_logs(temp_buffer,NSLOG_PROCESS_INFO);
-#ifdef DEBUG2
- printf("%s\n",temp_buffer);
-#endif
- }
-
/* else begin shutting down... */
- else if(sig<16){
-
+ else if(sig<16)
sigshutdown=TRUE;
- sprintf(temp_buffer,"Caught SIG%s, shutting down...\n",sigs[sig]);
- write_to_all_logs(temp_buffer,NSLOG_PROCESS_INFO);
-
-#ifdef DEBUG2
- printf("%s\n",temp_buffer);
-#endif
-
-#ifdef REMOVED_06202006
- /* remove the lock file if we're in daemon mode */
- if(daemon_mode==TRUE)
- unlink(lock_file);
-
- /* close and delete the external command file FIFO */
- close_command_file();
-#endif
- }
-
return;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/cgi/cmd.c new/nagios-2.8/cgi/cmd.c
--- old/nagios-2.7/cgi/cmd.c 2006-05-19 16:25:03.000000000 +0200
+++ new/nagios-2.8/cgi/cmd.c 2007-02-19 15:24:29.000000000 +0100
@@ -2,8 +2,8 @@
*
* CMD.C - Nagios Command CGI
*
- * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 05-18-2006
+ * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)
+ * Last Modified: 02-19-2007
*
* License:
*
@@ -1544,7 +1544,7 @@
/* make sure we have check time (if necessary) */
if(cmd==CMD_SCHEDULE_SVC_CHECK && start_time==(time_t)0){
if(!error_string)
- error_string=strdup("Start time must be non-zero");
+ error_string=strdup("Start time must be non-zero or bad format has been submitted.");
}
/* make sure we have start/end times for downtime (if necessary) */
@@ -1649,7 +1649,7 @@
/* make sure we have check time (if necessary) */
if((cmd==CMD_SCHEDULE_HOST_CHECK || cmd==CMD_SCHEDULE_HOST_SVC_CHECKS)&& start_time==(time_t)0){
if(!error_string)
- error_string=strdup("Start time must be non-zero");
+ error_string=strdup("Start time must be non-zero or bad format has been submitted.");
}
/* make sure we have passive check info (if necessary) */
@@ -2684,6 +2684,7 @@
/* converts a time string to a UNIX timestamp, respecting the date_format option */
int string_to_time(char *buffer, time_t *t){
struct tm lt;
+ int ret=0;
/* Initialize some variables just in case they don't get parsed
@@ -2700,12 +2701,16 @@
lt.tm_wday=0;
lt.tm_yday=0;
+
if(date_format==DATE_FORMAT_EURO)
- sscanf(buffer,"%02d-%02d-%04d %02d:%02d:%02d",<.tm_mday,<.tm_mon,<.tm_year,<.tm_hour,<.tm_min,<.tm_sec);
+ ret=sscanf(buffer,"%02d-%02d-%04d %02d:%02d:%02d",<.tm_mday,<.tm_mon,<.tm_year,<.tm_hour,<.tm_min,<.tm_sec);
else if(date_format==DATE_FORMAT_ISO8601 || date_format==DATE_FORMAT_STRICT_ISO8601)
- sscanf(buffer,"%04d-%02d-%02d%*[ T]%02d:%02d:%02d",<.tm_year,<.tm_mon,<.tm_mday,<.tm_hour,<.tm_min,<.tm_sec);
+ ret=sscanf(buffer,"%04d-%02d-%02d%*[ T]%02d:%02d:%02d",<.tm_year,<.tm_mon,<.tm_mday,<.tm_hour,<.tm_min,<.tm_sec);
else
- sscanf(buffer,"%02d-%02d-%04d %02d:%02d:%02d",<.tm_mon,<.tm_mday,<.tm_year,<.tm_hour,<.tm_min,<.tm_sec);
+ ret=sscanf(buffer,"%02d-%02d-%04d %02d:%02d:%02d",<.tm_mon,<.tm_mday,<.tm_year,<.tm_hour,<.tm_min,<.tm_sec);
+
+ if (ret!=6)
+ return ERROR;
lt.tm_mon--;
lt.tm_year-=1900;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/Changelog new/nagios-2.8/Changelog
--- old/nagios-2.7/Changelog 2007-01-19 23:01:59.000000000 +0100
+++ new/nagios-2.8/Changelog 2007-03-08 17:12:05.000000000 +0100
@@ -3,6 +3,18 @@
#####################
+2.8 - 03/08/2007
+------------------
+* Bug fix for calculating notification interval with service escalations
+* Bug fix for using servicegroups in service dependency definitions
+* Bug fix for bad date format submission in command CGI
+* Possible segfault fix during restarts when daemon was performing host checks
+* Fix for missing check timeout in event broker calls
+* Fix for handling signals under NPTL
+* Added error messages for passive service checks that don't correspond to a defined service
+
+
+
2.7 - 01/19/2007
----------------
* p1.pl now sets environment var (NAGIOS_PLUGIN) to indicate patch of plugin that is executing
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/common/downtime.c new/nagios-2.8/common/downtime.c
--- old/nagios-2.7/common/downtime.c 2007-01-08 23:24:13.000000000 +0100
+++ new/nagios-2.8/common/downtime.c 2007-03-06 04:32:06.000000000 +0100
@@ -3,7 +3,7 @@
* DOWNTIME.C - Scheduled downtime functions for Nagios
*
* Copyright (c) 2000-2007 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 01-08-2007
+ * Last Modified: 03-05-2007
*
* License:
*
@@ -205,10 +205,18 @@
delete_service_downtime(downtime_id);
/* unschedule all downtime entries that were triggered by this one */
- for(temp_downtime=scheduled_downtime_list;temp_downtime!=NULL;temp_downtime=temp_downtime->next){
- if(temp_downtime->triggered_by==downtime_id)
- unschedule_downtime(ANY_DOWNTIME,temp_downtime->downtime_id);
- }
+ while(1){
+
+ for(temp_downtime=scheduled_downtime_list;temp_downtime!=NULL;temp_downtime=temp_downtime->next){
+ if(temp_downtime->triggered_by==downtime_id){
+ unschedule_downtime(ANY_DOWNTIME,temp_downtime->downtime_id);
+ break;
+ }
+ }
+
+ if(temp_downtime==NULL)
+ break;
+ }
return OK;
}
@@ -226,6 +234,7 @@
char *type_string="";
int hours;
int minutes;
+ unsigned long *new_downtime_id=NULL;
/* find the downtime entry in memory */
temp_downtime=find_downtime(type,downtime_id);
@@ -272,8 +281,12 @@
/*** SCHEDULE DOWNTIME - FLEXIBLE (NON-FIXED) DOWNTIME IS HANDLED AT A LATER POINT ***/
/* only non-triggered downtime is scheduled... */
- if(temp_downtime->triggered_by==0)
- schedule_new_event(EVENT_SCHEDULED_DOWNTIME,TRUE,temp_downtime->start_time,FALSE,0,NULL,FALSE,(void *)temp_downtime->downtime_id,NULL);
+ if(temp_downtime->triggered_by==0){
+ if((new_downtime_id=(unsigned long *)malloc(sizeof(unsigned long *)))){
+ *new_downtime_id=downtime_id;
+ schedule_new_event(EVENT_SCHEDULED_DOWNTIME,TRUE,temp_downtime->start_time,FALSE,0,NULL,FALSE,(void *)new_downtime_id,NULL);
+ }
+ }
return OK;
}
@@ -301,6 +314,7 @@
host *hst=NULL;
service *svc=NULL;
time_t event_time;
+ unsigned long *new_downtime_id=NULL;
#ifdef USE_EVENT_BROKER
int attr;
#endif
@@ -401,10 +415,19 @@
}
/* handle (stop) downtime that is triggered by this one */
- for(this_downtime=scheduled_downtime_list;this_downtime!=NULL;this_downtime=this_downtime->next){
- if(this_downtime->triggered_by==temp_downtime->downtime_id)
- handle_scheduled_downtime(this_downtime);
- }
+ while(1){
+
+ /* list contents might change by recursive calls, so we use this inefficient method to prevent segfaults */
+ for(this_downtime=scheduled_downtime_list;this_downtime!=NULL;this_downtime=this_downtime->next){
+ if(this_downtime->triggered_by==temp_downtime->downtime_id){
+ handle_scheduled_downtime(this_downtime);
+ break;
+ }
+ }
+
+ if(this_downtime==NULL)
+ break;
+ }
/* delete downtime entry from the log */
if(temp_downtime->type==HOST_DOWNTIME)
@@ -457,7 +480,10 @@
event_time=(time_t)((unsigned long)time(NULL)+temp_downtime->duration);
else
event_time=temp_downtime->end_time;
- schedule_new_event(EVENT_SCHEDULED_DOWNTIME,TRUE,event_time,FALSE,0,NULL,FALSE,(void *)temp_downtime->downtime_id,NULL);
+ if((new_downtime_id=(unsigned long *)malloc(sizeof(unsigned long *)))){
+ *new_downtime_id=temp_downtime->downtime_id;
+ schedule_new_event(EVENT_SCHEDULED_DOWNTIME,TRUE,event_time,FALSE,0,NULL,FALSE,(void *)new_downtime_id,NULL);
+ }
/* handle (start) downtime that is triggered by this one */
for(this_downtime=scheduled_downtime_list;this_downtime!=NULL;this_downtime=this_downtime->next){
@@ -838,6 +864,10 @@
if(triggered_by>0 && find_downtime(ANY_DOWNTIME,triggered_by)==NULL)
return ERROR;
+ /* we don't have enough info */
+ if(host_name==NULL || (downtime_type==SERVICE_DOWNTIME && svc_description==NULL))
+ return ERROR;
+
/* allocate memory for the downtime */
new_downtime=(scheduled_downtime *)malloc(sizeof(scheduled_downtime));
if(new_downtime==NULL)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/configure new/nagios-2.8/configure
--- old/nagios-2.7/configure 2007-01-19 23:01:59.000000000 +0100
+++ new/nagios-2.8/configure 2007-03-08 17:12:05.000000000 +0100
@@ -1311,9 +1311,9 @@
PKG_NAME=nagios
-PKG_VERSION="2.7"
+PKG_VERSION="2.8"
PKG_HOME_URL="http://www.nagios.org/"
-PKG_REL_DATE="01-19-2007"
+PKG_REL_DATE="03-08-2007"
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/configure.in new/nagios-2.8/configure.in
--- old/nagios-2.7/configure.in 2007-01-19 23:01:59.000000000 +0100
+++ new/nagios-2.8/configure.in 2007-03-08 17:12:05.000000000 +0100
@@ -9,9 +9,9 @@
AC_PREFIX_DEFAULT(/usr/local/nagios)
PKG_NAME=nagios
-PKG_VERSION="2.7"
+PKG_VERSION="2.8"
PKG_HOME_URL="http://www.nagios.org/"
-PKG_REL_DATE="01-19-2007"
+PKG_REL_DATE="03-08-2007"
dnl Figure out how to invoke "install" and what install options to use.
AC_PROG_INSTALL
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/html/main.html new/nagios-2.8/html/main.html
--- old/nagios-2.7/html/main.html 2007-01-19 23:02:01.000000000 +0100
+++ new/nagios-2.8/html/main.html 2007-03-08 17:12:05.000000000 +0100
@@ -35,8 +35,8 @@
<P>
<div align=center>
-<div align=center CLASS="version">Version 2.7</div>
-<div align=center CLASS="releaseDate">January 19, 2007</div>
+<div align=center CLASS="version">Version 2.8</div>
+<div align=center CLASS="releaseDate">March 08, 2007</div>
</div>
</P>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/include/common.h new/nagios-2.8/include/common.h
--- old/nagios-2.7/include/common.h 2007-01-19 23:02:01.000000000 +0100
+++ new/nagios-2.8/include/common.h 2007-03-08 17:12:05.000000000 +0100
@@ -21,8 +21,8 @@
************************************************************************/
-#define PROGRAM_VERSION "2.7"
-#define PROGRAM_MODIFICATION_DATE "01-19-2007"
+#define PROGRAM_VERSION "2.8"
+#define PROGRAM_MODIFICATION_DATE "03-08-2007"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/Makefile.in new/nagios-2.8/Makefile.in
--- old/nagios-2.7/Makefile.in 2006-11-28 03:29:04.000000000 +0100
+++ new/nagios-2.8/Makefile.in 2007-02-12 23:16:42.000000000 +0100
@@ -1,7 +1,7 @@
###############################
# Makefile for Nagios
#
-# Last Modified: 11-27-2006
+# Last Modified: 02-12-2007
###############################
@@ -103,10 +103,9 @@
@echo " - Relevant snippets from your config files"
@echo " - Relevant error messages from the Nagios log file"
@echo ""
- @echo "For those of you who are interested in contract support or"
- @echo "consulting services for Nagios, please visit:"
+ @echo "For more information on obtaining support for Nagios, visit:"
@echo ""
- @echo " http://www.nagios.org/contractsupport"
+ @echo " http://www.nagios.org/support/"
@echo ""
@echo "*************************************************************"
@echo ""
@@ -144,7 +143,6 @@
cd $(SRC_MODULE) && $(MAKE) $@
rm -f *.cfg core
rm -f *~ *.*~ */*~ */*.*~ */*/*~ */*/*.*~
- rm -f config.log config.status config.cache
distclean: clean
cd $(SRC_BASE) && $(MAKE) $@
@@ -158,6 +156,7 @@
rm -f sample-config/*.cfg sample-config/*.conf sample-config/template-object/*.cfg
rm -f daemon-init pkginfo
rm -f Makefile subst
+ rm -f config.log config.status config.cache
devclean: distclean
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/nagios.spec new/nagios-2.8/nagios.spec
--- old/nagios-2.7/nagios.spec 2007-01-19 23:01:59.000000000 +0100
+++ new/nagios-2.8/nagios.spec 2007-03-08 17:12:05.000000000 +0100
@@ -1,5 +1,5 @@
%define name nagios
-%define version 2.7
+%define version 2.8
%define release 1.fc4.test
%define nsusr nagios
%define nsgrp nagios
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.7/update-version new/nagios-2.8/update-version
--- old/nagios-2.7/update-version 2007-01-19 23:01:59.000000000 +0100
+++ new/nagios-2.8/update-version 2007-03-08 17:12:05.000000000 +0100
@@ -10,10 +10,10 @@
fi
# Current version number
-CURRENTVERSION=2.7
+CURRENTVERSION=2.8
# Last date
-LASTDATE=01-19-2007
+LASTDATE=03-08-2007
if [ "x$1" = "x" ]
then
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org