Hello community, here is the log from the commit of package nagios for openSUSE:Factory checked in at 2013-09-02 15:00:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nagios (Old) and /work/SRC/openSUSE:Factory/.nagios.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nagios" Changes: -------- --- /work/SRC/openSUSE:Factory/nagios/nagios.changes 2013-08-05 20:48:15.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.nagios.new/nagios.changes 2013-09-02 15:00:50.000000000 +0200 @@ -1,0 +2,17 @@ +Fri Aug 30 23:14:55 UTC 2013 - schneem...@b1-systems.de + +- update to 3.5.1: + + Added handler for SIGXFSZ signal (Eric Stanley) + + Fixed bug #444: Nagios 3.5.0 problem with macro $ADMINEMAIL$ : + @ is converted to %40 after 2 nagios reload (Duplicate of bug #407) + + Fixed bug #407: Reloading nagios config causes spaces in notifications + to become plus signs (Alexey Dvoryanchikov) + + Fixed bug #445: Adding triggered downtime for child hosts causes a + SIGSEGV on restart/reload (Eric Stanley) + + Fixed bug #375: Freshness expiration never reached and bug #427: + freshness threshold doesn't work if it is set long + (Scott Wilkerson, Eric Stanley) + + Fixed bug #432: Downtime scheduled as "Nagios Process" and not + the Users name (Sam Lansing, Eric Stanley) + +------------------------------------------------------------------- Old: ---- nagios-3.5.0.tar.bz2 New: ---- nagios-3.5.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nagios.spec ++++++ --- /var/tmp/diff_new_pack.EVytA3/_old 2013-09-02 15:00:51.000000000 +0200 +++ /var/tmp/diff_new_pack.EVytA3/_new 2013-09-02 15:00:51.000000000 +0200 @@ -20,7 +20,7 @@ Summary: The Nagios Network Monitor License: GPL-2.0+ Group: System/Monitoring -Version: 3.5.0 +Version: 3.5.1 Release: 0 Url: http://www.nagios.org/ Source0: %{name}-%{version}.tar.bz2 ++++++ nagios-3.5.0.tar.bz2 -> nagios-3.5.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nagios/Changelog new/nagios/Changelog --- old/nagios/Changelog 2013-03-15 12:14:02.000000000 +0100 +++ new/nagios/Changelog 2013-08-30 19:46:14.000000000 +0200 @@ -2,6 +2,15 @@ Nagios 3.x Change Log ##################### +3.5.1 - 08/30/2013 +------------------ +* Added handler for SIGXFSZ signal (Eric Stanley) +* Fixed bug #444: Nagios 3.5.0 problem with macro $ADMINEMAIL$ : @ is converted to %40 after 2 nagios reload (Duplicate of bug #407) +* Fixed bug #407: Reloading nagios config causes spaces in notifications to become plus signs (Alexey Dvoryanchikov) +* Fixed bug #445: Adding triggered downtime for child hosts causes a SIGSEGV on restart/reload (Eric Stanley) +* Fixed bug #375: Freshness expiration never reached and bug #427: freshness threshold doesn't work if it is set long (Scott Wilkerson, Eric Stanley) +* Fixed bug #432: Downtime scheduled as "Nagios Process" and not the Users name (Sam Lansing, Eric Stanley) + 3.5.0 - 03/15/2013 ------------------ * Fixed bug #403: The "configuration" page of the webui doesn't use entity encoding when displaying the "command expansion" item (Eric Stanley, Phil Randal) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nagios/base/checks.c new/nagios/base/checks.c --- old/nagios/base/checks.c 2013-03-09 22:46:35.000000000 +0100 +++ new/nagios/base/checks.c 2013-08-30 19:46:14.000000000 +0200 @@ -2086,7 +2086,7 @@ */ if(temp_service->check_type == SERVICE_CHECK_PASSIVE) { if(temp_service->last_check < event_start && - event_start - last_program_stop < freshness_threshold * 0.618) { + event_start - last_program_stop > freshness_threshold * 0.618) { expiration_time = event_start + freshness_threshold; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nagios/base/nagios.c new/nagios/base/nagios.c --- old/nagios/base/nagios.c 2013-03-15 12:14:02.000000000 +0100 +++ new/nagios/base/nagios.c 2013-08-30 19:46:14.000000000 +0200 @@ -3,7 +3,7 @@ * NAGIOS.C - Core Program Code For Nagios * * Program: Nagios Core - * Version: 3.5.0 + * Version: 3.5.1 * License: GPL * Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors * Copyright (c) 1999-2009 Ethan Galstad @@ -438,6 +438,12 @@ exit(ERROR); } + /* + * Set the signal handler for the SIGXFSZ signal here because + * we may encounter this signal before the other signal handlers + * are set. + */ + signal(SIGXFSZ, handle_sigxfsz); /* config file is last argument specified */ config_file = (char *)strdup(argv[optind]); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nagios/base/nagiostats.c new/nagios/base/nagiostats.c --- old/nagios/base/nagiostats.c 2013-03-15 12:14:02.000000000 +0100 +++ new/nagios/base/nagiostats.c 2013-08-30 19:46:14.000000000 +0200 @@ -3,7 +3,7 @@ * NAGIOSTATS.C - Displays Nagios Statistics * * Program: Nagiostats - * Version: 3.5.0 + * Version: 3.5.1 * License: GPL * Copyright (c) 2003-2008 Ethan Galstad (egals...@nagios.org) * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nagios/base/utils.c new/nagios/base/utils.c --- old/nagios/base/utils.c 2013-03-09 22:46:35.000000000 +0100 +++ new/nagios/base/utils.c 2013-08-30 19:46:14.000000000 +0200 @@ -53,6 +53,13 @@ extern char *auth_file; extern char *p1_file; +extern char *xodtemplate_cache_file; +extern char *xodtemplate_precache_file; +extern char *xsddefault_status_log; +extern char *xrddefault_retention_file; +extern char *xpddefault_host_perfdata_file; +extern char *xpddefault_service_perfdata_file; + extern char *nagios_user; extern char *nagios_group; @@ -282,6 +289,7 @@ #endif +static long long check_file_size(char *, unsigned long, struct rlimit); /******************************************************************/ /******************** SYSTEM COMMAND FUNCTIONS ********************/ @@ -1798,6 +1806,7 @@ signal(SIGHUP, SIG_DFL); signal(SIGSEGV, SIG_DFL); signal(SIGPIPE, SIG_DFL); + signal(SIGXFSZ, SIG_DFL); return; } @@ -1838,6 +1847,127 @@ return; } +/* Handle the SIGXFSZ signal. A SIGXFSZ signal is received when a file exceeds + the maximum allowable size either as dictated by the fzise paramater in + /etc/security/limits.conf (ulimit -f) or by the maximum size allowed by + the filesystem */ +void handle_sigxfsz(int sig) { + + static time_t lastlog_time = (time_t)0; /* Save the last log time so we + don't log too often. */ + unsigned long log_interval = 300; /* How frequently to log messages + about receiving the signal */ + struct rlimit rlim; + time_t now; + char *files[] = { + log_file, + debug_file, + xpddefault_host_perfdata_file, + xpddefault_service_perfdata_file, + xodtemplate_cache_file, + xodtemplate_precache_file, + xsddefault_status_log, + xrddefault_retention_file, + }; + int x; + char **filep; + long long size; + long long max_size = 0LL; + char *max_name = NULL; + + if(SIGXFSZ == sig) { /* Make sure we're handling the correct signal */ + /* Check the current time and if less time has passed since the last + time the signal was received, ignore it */ + time(&now); + if((unsigned long)(now - lastlog_time) < log_interval) return; + + /* Get the current file size limit */ + if(getrlimit(RLIMIT_FSIZE, &rlim) != 0) { + /* Attempt to log the error, realizing that the logging may fail + if it is the log file that is over the size limit. */ + logit(NSLOG_RUNTIME_ERROR, TRUE, + "Unable to determine current resoure limits: %s\n", + strerror(errno)); + } + + /* Try to figure out which file caused the signal and react + appropriately */ + for(x = 0, filep = files; x < (sizeof(files) / sizeof(files[0])); + x++, filep++) { + if((*filep != NULL) && strcmp(*filep, "/dev/null")) { + if((size = check_file_size(*filep, 1024, rlim)) == -1) { + lastlog_time = now; + return; + } + else if(size > max_size) { + max_size = size; + max_name = log_file; + } + } + } + /* TODO: Perhaps add check of the check results files in + check_results_path. This is likely not needed because these + files aren't very big */ + if((max_size > 0) && (max_name != NULL)) { + logit(NSLOG_RUNTIME_ERROR, TRUE, "SIGXFSZ received because a " + "file's size may have exceeded the file size limits of " + "the filesystem. The largest file checked, '%s', has a " + "size of %lld bytes", max_name, max_size); + + } + else { + logit(NSLOG_RUNTIME_ERROR, TRUE, "SIGXFSZ received but unable to " + "determine which file may have caused it."); + } + } + return; + } + +/* Checks a file to determine whether it exceeds resource limit imposed + limits. Returns the file size if file is OK, 0 if it's status could not + be determined, or -1 if not OK. fudge is the fudge factor (in bytes) for + checking the file size */ +static long long check_file_size(char *path, unsigned long fudge, + struct rlimit rlim) { + + struct stat status; + + /* Make sure we were passed a legitimate file path */ + if(NULL == path) { + return 0; + } + + /* Get the status of the file */ + if(stat(path, &status) == 0) { + /* Make sure it is a file */ + if(S_ISREG(status.st_mode)) { + /* If the file size plus the fudge factor exceeds the + current resource limit imposed size limit, log an error */ + if(status.st_size + fudge > rlim.rlim_cur) { + logit(NSLOG_RUNTIME_ERROR, TRUE, "Size of file '%s' (%llu) " + "exceeds (or nearly exceeds) size imposed by resource " + "limits (%llu). Consider increasing limits with " + "ulimit(1).\n", path, + (unsigned long long)status.st_size, + (unsigned long long)rlim.rlim_cur); + return -1; + } + else { + return status.st_size; + } + } + else { + return 0; + } + } + else { + /* If we could not determine the file status, log an error message */ + logit(NSLOG_RUNTIME_ERROR, TRUE, + "Unable to determine status of file %s: %s\n", + log_file, strerror(errno)); + return 0; + } + } /* handle timeouts when executing service checks */ /* 07/16/08 EG also called when parent process gets a TERM signal */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nagios/cgi/getcgi.c new/nagios/cgi/getcgi.c --- old/nagios/cgi/getcgi.c 2013-03-09 22:46:35.000000000 +0100 +++ new/nagios/cgi/getcgi.c 2013-08-30 19:46:14.000000000 +0200 @@ -320,7 +320,8 @@ snprintf(locale_string, sizeof(locale_string), "%s_%s.%s", accept_langs->languages[ x]->language, accept_langs->languages[ x]->locality, "utf8"); - locale = setlocale(LC_ALL, locale_string); + locale = setlocale(LC_CTYPE, locale_string); + if(NULL != locale) break; } free_accept_languages(accept_langs); @@ -329,7 +330,7 @@ /* Try the fail safe locales */ for(x = 0; ((x < (sizeof(locale_failsafe) / sizeof(char *))) && (NULL == locale)); x++) { - locale = setlocale(LC_ALL, locale_failsafe[ x]); + locale = setlocale(LC_CTYPE, locale_failsafe[ x]); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nagios/common/downtime.c new/nagios/common/downtime.c --- old/nagios/common/downtime.c 2013-03-09 22:46:35.000000000 +0100 +++ new/nagios/common/downtime.c 2013-08-30 19:46:14.000000000 +0200 @@ -328,9 +328,9 @@ /* add a non-persistent comment to the host or service regarding the scheduled outage */ if(temp_downtime->type == SERVICE_DOWNTIME) - add_new_comment(SERVICE_COMMENT, DOWNTIME_COMMENT, svc->host_name, svc->description, time(NULL), "(Nagios Process)", temp_buffer, 0, COMMENTSOURCE_INTERNAL, FALSE, (time_t)0, &(temp_downtime->comment_id)); + add_new_comment(SERVICE_COMMENT, DOWNTIME_COMMENT, svc->host_name, svc->description, time(NULL), ( NULL == temp_downtime->author ? "(Nagios Process)" : temp_downtime->author), temp_buffer, 0, COMMENTSOURCE_INTERNAL, FALSE, (time_t)0, &(temp_downtime->comment_id)); else - add_new_comment(HOST_COMMENT, DOWNTIME_COMMENT, hst->name, NULL, time(NULL), "(Nagios Process)", temp_buffer, 0, COMMENTSOURCE_INTERNAL, FALSE, (time_t)0, &(temp_downtime->comment_id)); + add_new_comment(HOST_COMMENT, DOWNTIME_COMMENT, hst->name, NULL, time(NULL), ( NULL == temp_downtime->author ? "(Nagios Process)" : temp_downtime->author), temp_buffer, 0, COMMENTSOURCE_INTERNAL, FALSE, (time_t)0, &(temp_downtime->comment_id)); my_free(temp_buffer); @@ -360,6 +360,14 @@ } } + /* If the downtime is triggered and was in effect, mark it as not in + effect so it gets scheduled correctly */ + if((temp_downtime->triggered_by != 0) && + (TRUE == temp_downtime->is_in_effect)) { + was_in_effect = temp_downtime->is_in_effect; + temp_downtime->is_in_effect = FALSE; + } + if((FALSE == temp_downtime->fixed) && (FALSE == was_in_effect)) { /* increment pending flex downtime counter */ if(temp_downtime->type == HOST_DOWNTIME) @@ -1111,6 +1119,39 @@ static int downtime_compar(const void *p1, const void *p2) { scheduled_downtime *d1 = *(scheduled_downtime **)p1; scheduled_downtime *d2 = *(scheduled_downtime **)p2; + + /* + If the start times of two downtimes are equal and one is triggered but + but the other is not, the triggered downtime should be later in the + list than the untriggered one. This is so they are written to the + retention.dat and status.dat in the correct order. + + Previously the triggered downtime always appeared before its + triggering downtime in those files. When the downtimes were read + from those files, either on a core restart or by the CGIs, the + triggered downtime would be discarded because the triggering + downtime did not yet exist. + + The most common case for this is when a downtime is created and + the option is selected to create triggered downtimes on all child + objects. This change in the sort order does NOT resolve the + case where a manually created, triggered downtime is created with + a start time earlier than the triggering downtime. + + This would need to be resolved by comparing the triggered_by value + with the downtime ID regardless of the start time. However, this + should be a relatively rare case and only caused by intentional + scheduling by a human. This change was not implemented because it + would cause the downtime list to be out of time order and the + implications of this were not well understood. + */ + + if(d1->start_time == d2->start_time) { + if(( d1->triggered_by == 0 && d2->triggered_by != 0) || + ( d1->triggered_by != 0 && d2->triggered_by == 0)) { + return d1->triggered_by == 0 ? -1 : 1; + } + } return (d1->start_time < d2->start_time) ? -1 : (d1->start_time - d2->start_time); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nagios/common/macros.c new/nagios/common/macros.c --- old/nagios/common/macros.c 2013-03-09 22:46:35.000000000 +0100 +++ new/nagios/common/macros.c 2013-08-30 19:46:14.000000000 +0200 @@ -2585,6 +2585,7 @@ for(x = 0; x < MACRO_X_COUNT; x++) { macro_keys[x].code = x; macro_keys[x].name = macro_x_names[x]; + macro_keys[x].clean_options = 0; /* host/service output/perfdata and author/comment macros should get cleaned */ if((x >= 16 && x <= 19) || (x >= 49 && x <= 52) || (x >= 99 && x <= 100) || (x >= 124 && x <= 127)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nagios/configure new/nagios/configure --- old/nagios/configure 2013-03-15 12:14:02.000000000 +0100 +++ new/nagios/configure 2013-08-30 19:46:14.000000000 +0200 @@ -1314,9 +1314,9 @@ PKG_NAME=nagios -PKG_VERSION="3.5.0" +PKG_VERSION="3.5.1" PKG_HOME_URL="http://www.nagios.org/" -PKG_REL_DATE="03-15-2013" +PKG_REL_DATE="08-30-2013" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nagios/configure.in new/nagios/configure.in --- old/nagios/configure.in 2013-03-15 12:14:02.000000000 +0100 +++ new/nagios/configure.in 2013-08-30 19:46:14.000000000 +0200 @@ -9,9 +9,9 @@ AC_PREFIX_DEFAULT(/usr/local/nagios) PKG_NAME=nagios -PKG_VERSION="3.5.0" +PKG_VERSION="3.5.1" PKG_HOME_URL="http://www.nagios.org/" -PKG_REL_DATE="03-15-2013" +PKG_REL_DATE="08-30-2013" 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/contrib/p1.pl new/nagios/contrib/p1.pl --- old/nagios/contrib/p1.pl 2005-01-20 03:12:13.000000000 +0100 +++ new/nagios/contrib/p1.pl 2013-08-30 19:46:14.000000000 +0200 @@ -1,6 +1,6 @@ package Embed::Persistent; -# $Id: p1.pl 532 2005-01-20 02:12:13Z egalstad $ +# $Id$ # $Log$ # Revision 1.5 2005-01-18 13:52:15+11 anwsmh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nagios/html/main.php new/nagios/html/main.php --- old/nagios/html/main.php 2013-03-15 12:14:02.000000000 +0100 +++ new/nagios/html/main.php 2013-08-30 19:46:14.000000000 +0200 @@ -1,7 +1,7 @@ <?php include_once(dirname(__FILE__).'/includes/utils.inc.php'); -$this_version="3.5.0"; +$this_version="3.5.1"; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> @@ -38,9 +38,9 @@ <div id="currentversioninfo"> <div class="product">Nagios<sup><span style="font-size: small;">®</span></sup> Core<sup><span style="font-size: small;">™</span></sup></div> -<div class="version">Version 3.5.0</div> -<div class="releasedate">March 15, 2013</div> -<div class="checkforupdates"><a href="http://www.nagios.org/checkforupdates/?version=3.5.0&product=nagioscore" target="_blank">Check for updates</a></div> +<div class="version">Version 3.5.1</div> +<div class="releasedate">August 30, 2013</div> +<div class="checkforupdates"><a href="http://www.nagios.org/checkforupdates/?version=3.5.1&product=nagioscore" target="_blank">Check for updates</a></div> <!--<div class="whatsnew"><a href="http://go.nagios.com/nagioscore/whatsnew">Read what's new in Nagios Core 3</a></div>--> </div> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nagios/include/common.h new/nagios/include/common.h --- old/nagios/include/common.h 2013-03-15 12:14:02.000000000 +0100 +++ new/nagios/include/common.h 2013-08-30 19:46:14.000000000 +0200 @@ -22,8 +22,8 @@ #include "shared.h" -#define PROGRAM_VERSION "3.5.0" -#define PROGRAM_MODIFICATION_DATE "03-15-2013" +#define PROGRAM_VERSION "3.5.1" +#define PROGRAM_MODIFICATION_DATE "08-30-2013" /*#define DEBUG_CHECK_IPC 1 */ /*#define DEBUG_CHECK_IPC2 1*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nagios/include/nagios.h new/nagios/include/nagios.h --- old/nagios/include/nagios.h 2013-01-03 22:10:27.000000000 +0100 +++ new/nagios/include/nagios.h 2013-08-30 19:46:14.000000000 +0200 @@ -442,6 +442,7 @@ void init_timing_loop(void); /* setup the initial scheduling queue */ void setup_sighandler(void); /* trap signals */ void reset_sighandler(void); /* reset signals to default action */ +extern void handle_sigxfsz(int); /* handle SIGXFSZ */ int daemon_init(void); /* switches to daemon mode */ int drop_privileges(char *, char *); /* drops privileges before startup */ void display_scheduling_info(void); /* displays service check scheduling information */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nagios/nagios.spec new/nagios/nagios.spec --- old/nagios/nagios.spec 2013-03-15 12:14:02.000000000 +0100 +++ new/nagios/nagios.spec 2013-08-30 19:46:14.000000000 +0200 @@ -1,5 +1,5 @@ %define name nagios -%define version 3.5.0 +%define version 3.5.1 %define release 1 %define nsusr nagios %define nsgrp nagios diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nagios/update-version new/nagios/update-version --- old/nagios/update-version 2013-03-15 12:14:02.000000000 +0100 +++ new/nagios/update-version 2013-08-30 19:46:14.000000000 +0200 @@ -10,10 +10,10 @@ fi # Current version number -CURRENTVERSION=3.5.0 +CURRENTVERSION=3.5.1 # Last date -LASTDATE=03-15-2013 +LASTDATE=08-30-2013 if [ "x$1" = "x" ] then -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org