Changes of Revision 42
[-] | Changed | icinga.changes |
1
2 ------------------------------------------------------------------- 3 +Mon Jan 14 19:14:30 UTC 2013 - cs@linux-administrator.com 4 + 5 +- update to release 1.8.4 6 + 7 +------------------------------------------------------------------- 8 Sun Dec 2 14:59:02 UTC 2012 - cs@linux-administrator.com 9 10 - update to release 1.8.2 11 |
||
[-] | Changed | icinga.spec ^ |
11 1
2 #!BuildIgnore: post-build-checks 3 %define name icinga 4 -%define version 1.8.2 5 -%define pkgversion 1.8.2 6 +%define version 1.8.4 7 +%define pkgversion 1.8.4 8 %define release 1 9 %define nsusr icinga 10 %define nsgrp icinga 11 |
||
[+] | Changed | icinga-1.8.4.tar.bz2/Changelog ^ |
@@ -12,6 +12,24 @@ - core, classic ui: sample-config/updates/ - idoutils: module/idoutils/config/updates +1.8.4 - 13/01/2013 + +FIXES +* core: add fix for CVE-2012-6096 - history.cgi remote command execution (Eric Stanley, Markus Frosch) #3532 - MF + +* classic ui: Changed field size for hours to 4 when setting flexible downtime #3484 - RB +* classic ui: fixed Warning and Unknown States are mixed up in Alert Summary Report #3488 - RB + +* idoutils: fix empty output/perfdata segfaults for mysql string truncate #3516 - MF +* idoutils: unlink leftover socket on startup, if using unix sockets - MF +* idoutils: fix long output data causes wrong data in database #2342 - MF + +1.8.3 - 12/12/2012 + +FIXES +* idoutils: fix unknown column contactaddress_id (thx fmbiete) #3483 - MF + + 1.8.2 - 28/11/2012 FIXES | ||
[+] | Changed | icinga-1.8.4.tar.bz2/Makefile.in ^ |
@@ -78,7 +78,7 @@ ############################### # Global ############################### -ICINGA_VERSION=1.8.2 +ICINGA_VERSION=1.8.4 CP=@CP@ | ||
[+] | Changed | icinga-1.8.4.tar.bz2/cgi/cgiutils.c ^ |
@@ -1983,6 +1983,10 @@ /* get url options but filter out "limit" and "status" */ if (getenv("QUERY_STRING") != NULL && strcmp(getenv("QUERY_STRING"), "")) { + if(strlen(getenv("QUERY_STRING")) > MAX_INPUT_BUFFER) { + printf("display_nav_table(): Could not allocate memory for stripped_query_string\n"); + exit(1); + } strcpy(stripped_query_string, getenv("QUERY_STRING")); strip_html_brackets(stripped_query_string); @@ -2558,6 +2562,10 @@ /* just do stuff if some options are requested */ if (getenv("QUERY_STRING") != NULL && strcmp(getenv("QUERY_STRING"), "")) { + if(strlen(getenv("QUERY_STRING")) > MAX_INPUT_BUFFER) { + printf("print_export_link(): Could not allocate memory for stripped_query_string\n"); + exit(1); + } strcpy(stripped_query_string, getenv("QUERY_STRING")); strip_html_brackets(stripped_query_string); strcat(link, "?"); @@ -3373,6 +3381,10 @@ /* get url options but filter out "limit" and "status" */ if (getenv("QUERY_STRING") != NULL && strcmp(getenv("QUERY_STRING"), "")) { + if(strlen(getenv("QUERY_STRING")) > MAX_INPUT_BUFFER) { + printf("page_num_selector(): Could not allocate memory for stripped_query_string\n"); + exit(1); + } strcpy(stripped_query_string, getenv("QUERY_STRING")); strip_html_brackets(stripped_query_string); @@ -3486,6 +3498,10 @@ /* get url options but filter out "limit" and "status" */ if (getenv("QUERY_STRING") != NULL && strcmp(getenv("QUERY_STRING"), "")) { + if(strlen(getenv("QUERY_STRING")) > MAX_INPUT_BUFFER) { + printf("display_nav_table(): Could not allocate memory for stripped_query_string\n"); + exit(1); + } strcpy(stripped_query_string, getenv("QUERY_STRING")); strip_html_brackets(stripped_query_string); | ||
[+] | Changed | icinga-1.8.4.tar.bz2/cgi/cmd.c ^ |
@@ -1090,7 +1090,7 @@ printf("</td><td align=\"left\">\n"); printf("\t<table border=0 cellspacing=0 cellpadding=0>\n"); printf("\t\t<tr>\n"); - printf("\t\t\t<td><INPUT TYPE='TEXT' NAME='hours' VALUE='%d' SIZE=2 MAXLENGTH=2></td>\n", t_hour); + printf("\t\t\t<td><INPUT TYPE='TEXT' NAME='hours' VALUE='%d' SIZE=4 MAXLENGTH=4></td>\n", t_hour); printf("\t\t\t<td width=\"50\"> Hours</td>\n"); printf("\t\t\t<td><INPUT TYPE='TEXT' NAME='minutes' VALUE='%d' SIZE=2 MAXLENGTH=2></td>\n", t_min); printf("\t\t\t<td width=\"50\"> Minutes</td>\n"); | ||
[+] | Changed | icinga-1.8.4.tar.bz2/cgi/extinfo.c ^ |
@@ -471,14 +471,16 @@ for (temp_hd = hostdependency_list; temp_hd != NULL; temp_hd = temp_hd->next) { - if (!strcmp(temp_hd->dependent_host_name, temp_host->name) && !strcmp(temp_hd->host_name, last_hd_hostname)) { - if (found == TRUE) - printf(", "); - - printf("<A HREF='%s?type=%d&host=%s'>%s</A>\n", EXTINFO_CGI, DISPLAY_HOST_INFO, url_encode(temp_hd->host_name), html_encode(temp_hd->host_name, FALSE)); - found = TRUE; + if (!strcmp(temp_hd->dependent_host_name, temp_host->name)) { + if (!strcmp(temp_hd->host_name, last_hd_hostname)) { + if (found == TRUE) + printf(", "); + + printf("<A HREF='%s?type=%d&host=%s'>%s</A><BR>\n", EXTINFO_CGI, DISPLAY_HOST_INFO, url_encode(temp_hd->host_name), html_encode(temp_hd->host_name, FALSE)); + found = TRUE; + } + last_hd_hostname = temp_hd->host_name; } - last_hd_hostname = temp_hd->host_name; } if (found == FALSE) @@ -526,17 +528,18 @@ for (temp_sd = servicedependency_list; temp_sd != NULL; temp_sd = temp_sd->next) { - if (!strcmp(temp_sd->dependent_service_description, temp_service->description) && !strcmp(temp_sd->dependent_host_name, temp_host->name) && \ - !(!strcmp(temp_sd->service_description, last_sd_svc_desc) && !strcmp(temp_sd->host_name, last_sd_hostname))) { - if (found == TRUE) - printf(", "); - - printf("<A HREF='%s?type=%d&host=%s", EXTINFO_CGI, DISPLAY_SERVICE_INFO, url_encode(temp_sd->host_name)); - printf("&service=%s'>%s on %s</A>\n", url_encode(temp_sd->service_description), html_encode(temp_sd->service_description, FALSE), html_encode(temp_sd->host_name, FALSE)); - found = TRUE; + if (!strcmp(temp_sd->dependent_service_description, temp_service->description) && !strcmp(temp_sd->dependent_host_name, temp_host->name)) { + if (!(!strcmp(temp_sd->service_description, last_sd_svc_desc) && !strcmp(temp_sd->host_name, last_sd_hostname))) { + if (found == TRUE) + printf(", "); + + printf("<A HREF='%s?type=%d&host=%s", EXTINFO_CGI, DISPLAY_SERVICE_INFO, url_encode(temp_sd->host_name)); + printf("&service=%s'>%s on %s</A>\n", url_encode(temp_sd->service_description), html_encode(temp_sd->service_description, FALSE), html_encode(temp_sd->host_name, FALSE)); + found = TRUE; + } + last_sd_svc_desc = temp_sd->service_description; + last_sd_hostname = temp_sd->host_name; } - last_sd_svc_desc = temp_sd->service_description; - last_sd_hostname = temp_sd->host_name; } if (found == FALSE) | ||
[+] | Changed | icinga-1.8.4.tar.bz2/cgi/getcgi.c ^ |
@@ -157,13 +157,15 @@ /* check for NULL query string environment variable - 04/28/00 (Ludo Bosmans) */ if (getenv("QUERY_STRING") == NULL) { cgiinput = (char *)malloc(1); + if (cgiinput != NULL) { + cgiinput[0] = '\x0'; + } + } else + cgiinput = strdup(getenv("QUERY_STRING")); if (cgiinput == NULL) { printf("getcgivars(): Could not allocate memory for CGI input.\n"); exit(1); } - cgiinput[0] = '\x0'; - } else - cgiinput = strdup(getenv("QUERY_STRING")); } else if (!strcmp(request_method, "POST") || !strcmp(request_method, "PUT")) { @@ -232,7 +234,11 @@ paircount = 0; nvpair = strtok(cgiinput, "&"); while (nvpair) { - pairlist[paircount++] = strdup(nvpair); + pairlist[paircount] = strdup(nvpair); + if(pairlist[paircount++] == NULL) { + printf("getcgivars(): Could not allocate memory for name-value pair element #%d.\n", paircount); + exit(1); + } if (paircount > MAX_CGI_INPUT_PAIRS) break; if (!(paircount % 256)) { @@ -259,12 +265,27 @@ /* get the variable name preceding the equal (=) sign */ if ((eqpos = strchr(pairlist[i], '=')) != NULL) { *eqpos = '\0'; - unescape_cgi_input(cgivars[i*2+1] = strdup(eqpos + 1)); + cgivars[i*2+1] = strdup(eqpos + 1); + if(cgivars[i*2+1] == NULL) { + printf("getcgivars(): Could not allocate memory for cgi param value #%d.\n", i); + exit(1); + } + unescape_cgi_input(cgivars[i*2+1]); } else - unescape_cgi_input(cgivars[i*2+1] = strdup("")); + cgivars[i*2+1] = strdup(""); + if(cgivars[i*2+1] == NULL) { + printf("getcgivars(): Could not allocate memory for empty cgi param value #%d.\n", i); + exit(1); + } + unescape_cgi_input(cgivars[i*2+1]); /* get the variable value (or name/value of there was no real "pair" in the first place) */ - unescape_cgi_input(cgivars[i*2] = strdup(pairlist[i])); + cgivars[i*2] = strdup(pairlist[i]); + if(cgivars[i*2] == NULL) { + printf("getcgivars(): Could not allocate memory for cgi param name #%d.\n", i); + exit(1); + } + unescape_cgi_input(cgivars[i*2]); } /* terminate the name-value list */ | ||
[+] | Changed | icinga-1.8.4.tar.bz2/cgi/history.c ^ |
@@ -899,14 +899,14 @@ else if (display_type == DISPLAY_HOSTS || display_type == DISPLAY_HOSTGROUPS) { if (history_type == HOST_HISTORY || history_type == SERVICE_HISTORY) { - sprintf(match1, " HOST ALERT: %s;", host_name); - sprintf(match2, " SERVICE ALERT: %s;", host_name); + snprintf(match1, sizeof(match1), " HOST ALERT: %s;", host_name); + snprintf(match2, sizeof(match2), " SERVICE ALERT: %s;", host_name); } else if (history_type == HOST_FLAPPING_HISTORY || history_type == SERVICE_FLAPPING_HISTORY) { - sprintf(match1, " HOST FLAPPING ALERT: %s;", host_name); - sprintf(match2, " SERVICE FLAPPING ALERT: %s;", host_name); + snprintf(match1, sizeof(match1), " HOST FLAPPING ALERT: %s;", host_name); + snprintf(match2, sizeof(match2), " SERVICE FLAPPING ALERT: %s;", host_name); } else if (history_type == HOST_DOWNTIME_HISTORY || history_type == SERVICE_DOWNTIME_HISTORY) { - sprintf(match1, " HOST DOWNTIME ALERT: %s;", host_name); - sprintf(match2, " SERVICE DOWNTIME ALERT: %s;", host_name); + snprintf(match1, sizeof(match1), " HOST DOWNTIME ALERT: %s;", host_name); + snprintf(match2, sizeof(match2), " SERVICE DOWNTIME ALERT: %s;", host_name); } if (show_all_hosts == TRUE) @@ -945,11 +945,11 @@ else if (display_type == DISPLAY_SERVICES || display_type == DISPLAY_SERVICEGROUPS) { if (history_type == SERVICE_HISTORY) - sprintf(match1, " SERVICE ALERT: %s;%s;", host_name, service_desc); + snprintf(match1, sizeof(match1), " SERVICE ALERT: %s;%s;", host_name, service_desc); else if (history_type == SERVICE_FLAPPING_HISTORY) - sprintf(match1, " SERVICE FLAPPING ALERT: %s;%s;", host_name, service_desc); + snprintf(match1, sizeof(match1), " SERVICE FLAPPING ALERT: %s;%s;", host_name, service_desc); else if (history_type == SERVICE_DOWNTIME_HISTORY) - sprintf(match1, " SERVICE DOWNTIME ALERT: %s;%s;", host_name, service_desc); + snprintf(match1, sizeof(match1), " SERVICE DOWNTIME ALERT: %s;%s;", host_name, service_desc); if (display_type == DISPLAY_SERVICEGROUPS) display_line = TRUE; | ||
[+] | Changed | icinga-1.8.4.tar.bz2/cgi/status.c ^ |
@@ -6938,6 +6938,10 @@ /* get url options but filter out "limit" and "status" */ if (getenv("QUERY_STRING") != NULL && strcmp(getenv("QUERY_STRING"), "")) { + if(strlen(getenv("QUERY_STRING")) > MAX_INPUT_BUFFER) { + printf("status_page_num_selector(): Could not allocate memory for stripped_query_string\n"); + exit(1); + } strcpy(stripped_query_string, getenv("QUERY_STRING")); strip_html_brackets(stripped_query_string); | ||
[+] | Changed | icinga-1.8.4.tar.bz2/cgi/summary.c ^ |
@@ -1188,9 +1188,9 @@ if (temp_entry->type == LOGENTRY_SERVICE_CRITICAL) state = AE_SERVICE_CRITICAL; else if (temp_entry->type == LOGENTRY_SERVICE_WARNING) - state = AE_SERVICE_UNKNOWN; - else if (temp_entry->type == LOGENTRY_SERVICE_UNKNOWN) state = AE_SERVICE_WARNING; + else if (temp_entry->type == LOGENTRY_SERVICE_UNKNOWN) + state = AE_SERVICE_UNKNOWN; else if (temp_entry->type == LOGENTRY_SERVICE_RECOVERY || temp_entry->type == LOGENTRY_SERVICE_OK) state = AE_SERVICE_OK; else | ||
[+] | Changed | icinga-1.8.4.tar.bz2/configure ^ |
@@ -2456,9 +2456,9 @@ PKG_NAME=icinga-core -PKG_VERSION="1.8.2" +PKG_VERSION="1.8.4" PKG_HOME_URL="http://www.icinga.org/" -PKG_REL_DATE="11-28-2012" +PKG_REL_DATE="01-13-2013" ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | ||
[+] | Changed | icinga-1.8.4.tar.bz2/configure.in ^ |
@@ -9,9 +9,9 @@ AC_PREFIX_DEFAULT(/usr/local/icinga) PKG_NAME=icinga-core -PKG_VERSION="1.8.2" +PKG_VERSION="1.8.4" PKG_HOME_URL="http://www.icinga.org/" -PKG_REL_DATE="11-28-2012" +PKG_REL_DATE="01-13-2013" dnl Figure out how to invoke "install" and what install options to use. AC_PROG_INSTALL | ||
[+] | Changed | icinga-1.8.4.tar.bz2/html/main.html ^ |
@@ -18,9 +18,9 @@ </div> <div id="currentversioninfo"> -<div class="version">Version 1.8.2</div> -<div class="releasedate">November 28, 2012</div> -<div class="whatsnew"><a href="docs/en/whatsnew.html">Read what's new in Icinga 1.8.2</a></div> +<div class="version">Version 1.8.4</div> +<div class="releasedate">January 13, 2013</div> +<div class="whatsnew"><a href="docs/en/whatsnew.html">Read what's new in Icinga 1.8.4</a></div> </div> <div id="developer"> | ||
[+] | Changed | icinga-1.8.4.tar.bz2/icinga.spec ^ |
@@ -20,7 +20,7 @@ Summary: Open Source host, service and network monitoring program Name: icinga -Version: 1.8.2 +Version: 1.8.4 Release: %{revision}%{?dist} License: GPLv2 Group: Applications/System @@ -408,6 +408,12 @@ %changelog +* Sun Jan 13 2013 Michael Friedrich <michael.friedrich@netways.de> - 1.8.4-1 +- 1.8.4 bump + +* Wed Dec 12 2012 Michael Friedrich <michael.friedrich@netways.de> - 1.8.3-1 +- 1.8.3 bump + * Tue Oct 30 2012 Michael Friedrich <michael.friedrich@gmail.com> - 1.8.2-1 - 1.8.2 bump | ||
[+] | Changed | icinga-1.8.4.tar.bz2/include/common.h ^ |
@@ -27,8 +27,8 @@ #define PROGRAM_NAME "Icinga" #define PROGRAM_NAME_UC "ICINGA" #define PROGRAM_NAME_LC "icinga" -#define PROGRAM_VERSION "1.8.2" -#define PROGRAM_MODIFICATION_DATE "11-28-2012" +#define PROGRAM_VERSION "1.8.4" +#define PROGRAM_MODIFICATION_DATE "01-13-2013" /*#define DEBUG_CHECK_IPC 1 */ /*#define DEBUG_CHECK_IPC2 1*/ | ||
[+] | Changed | icinga-1.8.4.tar.bz2/module/idoutils/include/common.h ^ |
@@ -22,8 +22,8 @@ #define LOG2IDO_NAME "LOG2IDO" /* only one space for update-version matching */ -#define IDO_DATE "11-28-2012" -#define IDO_VERSION "1.8.2" +#define IDO_DATE "01-13-2013" +#define IDO_VERSION "1.8.4" #define IDO_SCHEMA_VERSION "1.8.0" | ||
[+] | Changed | icinga-1.8.4.tar.bz2/module/idoutils/include/idomod.h ^ |
@@ -14,7 +14,8 @@ /* this is needed for access to daemon's internal data */ #define NSCORE 1 -#define IDOMOD_MAX_BUFLEN 49152 +#define IDOMOD_MAX_BUFLEN 49152 +#define IDOMOD_MAX_TEXT_LEN 32768 /************** structures *******************/ | ||
[+] | Changed | icinga-1.8.4.tar.bz2/module/idoutils/src/dbqueries.c ^ |
@@ -633,9 +633,11 @@ switch (idi->dbinfo.server_type) { case IDO2DB_DBSERVER_MYSQL: /* truncate long_output #2342 */ - if (strlen(*(char **) data[11]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { - (*(char **) data[11])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; - ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_or_update_systemcommanddata_add() Warning:long_output truncated\n"); + if (*(char **) data[11] != NULL) { + if (strlen(*(char **) data[11]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { + (*(char **) data[11])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; + ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_or_update_systemcommanddata_add() Warning:long_output truncated\n"); + } } dummy = asprintf(&query1, "UPDATE %s SET end_time=%s, end_time_usec=%lu, command_line='%s', timeout=%d, early_timeout=%d, execution_time=%lf, return_code=%d, output='%s', long_output='%s' WHERE instance_id=%lu AND start_time=%s AND start_time_usec=%lu", @@ -904,9 +906,11 @@ switch (idi->dbinfo.server_type) { case IDO2DB_DBSERVER_MYSQL: /* truncate long_output #2342 */ - if (strlen(*(char **) data[17]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { - (*(char **) data[17])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; - ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_or_update_eventhandlerdata_add() Warning:long_output truncated\n"); + if (*(char **) data[17] != NULL) { + if (strlen(*(char **) data[17]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { + (*(char **) data[17])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; + ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_or_update_eventhandlerdata_add() Warning:long_output truncated\n"); + } } dummy = asprintf(&query1, "UPDATE %s SET eventhandler_type=%d, object_id=%lu, state=%d, state_type=%d, end_time=%s, end_time_usec=%lu, command_object_id=%lu, command_args='%s', command_line='%s', timeout=%d, early_timeout=%d, execution_time=%lf, return_code=%d, output='%s', long_output='%s' WHERE instance_id=%lu AND start_time=%s AND start_time_usec=%lu", @@ -1227,9 +1231,11 @@ switch (idi->dbinfo.server_type) { case IDO2DB_DBSERVER_MYSQL: /* truncate long_output #2342 */ - if (strlen(*(char **) data[10]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { - (*(char **) data[10])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; - ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_or_update_notificationdata_add() Warning:long_output truncated\n"); + if (*(char **) data[10] != NULL) { + if (strlen(*(char **) data[10]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { + (*(char **) data[10])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; + ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_or_update_notificationdata_add() Warning:long_output truncated\n"); + } } dummy = asprintf(&query1, "UPDATE %s SET notification_type=%d, notification_reason=%d, end_time=%s, end_time_usec=%lu, state=%d, output='%s', long_output='%s', escalated=%d, contacts_notified=%d WHERE instance_id=%lu AND start_time=%s AND start_time_usec=%lu AND object_id=%lu", @@ -2081,15 +2087,19 @@ #ifdef USE_LIBDBI /* everything else will be libdbi */ switch (idi->dbinfo.server_type) { case IDO2DB_DBSERVER_MYSQL: - /* truncate long_output #2342 */ - if (strlen(*(char **) data[17]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { - (*(char **) data[17])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; - ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_servicecheckdata_add() Warning:long_output truncated\n"); - } - if (strlen(*(char **) data[18]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { - (*(char **) data[18])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; - ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_servicecheckdata_add() Warning:perfdata truncated\n"); - } + /* truncate long_output #2342 */ + if (*(char **) data[17] != NULL) { + if (strlen(*(char **) data[17]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { + (*(char **) data[17])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; + ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_servicecheckdata_add() Warning:long_output truncated\n"); + } + } + if (*(char **) data[18] != NULL) { + if (strlen(*(char **) data[18]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { + (*(char **) data[18])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; + ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_servicecheckdata_add() Warning:perfdata truncated\n"); + } + } dummy = asprintf(&query1, "INSERT INTO %s (instance_id, service_object_id, check_type, " "current_check_attempt, max_check_attempts, state, state_type, " @@ -2332,14 +2342,18 @@ switch (idi->dbinfo.server_type) { case IDO2DB_DBSERVER_MYSQL: /* truncate long_output #2342 */ - if (strlen(*(char **) data[21]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { - (*(char **) data[21])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; - ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_hostcheckdata_add() Warning:long_output truncated\n"); - } - if (strlen(*(char **) data[22]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { - (*(char **) data[22])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; - ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_hostcheckdata_add() Warning:perfdata truncated\n"); - } + if (*(char **) data[21] != NULL) { + if (strlen(*(char **) data[21]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { + (*(char **) data[21])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; + ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_hostcheckdata_add() Warning:long_output truncated\n"); + } + } + if (*(char **) data[22] != NULL) { + if (strlen(*(char **) data[22]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { + (*(char **) data[22])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; + ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_hostcheckdata_add() Warning:perfdata truncated\n"); + } + } dummy = asprintf(&query1, "INSERT INTO %s (command_object_id, command_args, command_line, " "instance_id, host_object_id, check_type, is_raw_check, current_check_attempt, " "max_check_attempts, state, state_type, start_time, start_time_usec, end_time, " @@ -3958,13 +3972,17 @@ switch (idi->dbinfo.server_type) { case IDO2DB_DBSERVER_MYSQL: /* truncate long_output #2342 */ - if (strlen(*(char **) data[4]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { - (*(char **) data[4])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; - ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_or_update_hoststatusdata_add() Warning:long_output truncated\n"); - } - if (strlen(*(char **) data[5]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { - (*(char **) data[5])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; - ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_or_update_hoststatusdata_add() Warning:perfdata truncated\n"); + if (*(char **) data[4] != NULL) { + if (strlen(*(char **) data[4]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { + (*(char **) data[4])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; + ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_or_update_hoststatusdata_add() Warning:long_output truncated\n"); + } + } + if (*(char **) data[5] != NULL) { + if (strlen(*(char **) data[5]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { + (*(char **) data[5])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; + ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_or_update_hoststatusdata_add() Warning:perfdata truncated\n"); + } } dummy = asprintf(&query1, "UPDATE %s SET instance_id=%lu, host_object_id=%lu, status_update_time=%s, output='%s', long_output='%s', perfdata='%s', current_state=%d, has_been_checked=%d, should_be_scheduled=%d, current_check_attempt=%d, max_check_attempts=%d, last_check=%s, next_check=%s, check_type=%d, last_state_change=%s, last_hard_state_change=%s, last_hard_state=%d, last_time_up=%s, last_time_down=%s, last_time_unreachable=%s, state_type=%d, last_notification=%s, next_notification=%s, no_more_notifications=%d, notifications_enabled=%d, problem_has_been_acknowledged=%d, acknowledgement_type=%d, current_notification_number=%d, passive_checks_enabled=%d, active_checks_enabled=%d, event_handler_enabled=%d, flap_detection_enabled=%d, is_flapping=%d, percent_state_change='%lf', latency='%lf', execution_time='%lf', scheduled_downtime_depth=%d, failure_prediction_enabled=%d, process_performance_data=%d, obsess_over_host=%d, modified_host_attributes=%lu, event_handler='%s', check_command='%s', normal_check_interval='%lf', retry_check_interval='%lf', check_timeperiod_object_id=%lu WHERE host_object_id=%lu", ido2db_db_tablenames[IDO2DB_DBTABLE_HOSTSTATUS], @@ -4474,13 +4492,17 @@ switch (idi->dbinfo.server_type) { case IDO2DB_DBSERVER_MYSQL: /* truncate long_output #2342 */ - if (strlen(*(char **) data[4]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { - (*(char **) data[4])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; - ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_or_update_servicestatusdata_add() Warning:long_output truncated\n"); - } - if (strlen(*(char **) data[5]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { - (*(char **) data[5])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; - ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_or_update_servicestatusdata_add() Warning:perfdata truncated\n"); + if (*(char **) data[4] != NULL) { + if (strlen(*(char **) data[4]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { + (*(char **) data[4])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; + ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_or_update_servicestatusdata_add() Warning:long_output truncated\n"); + } + } + if (*(char **) data[5] != NULL) { + if (strlen(*(char **) data[5]) > IDO2DB_MYSQL_MAX_TEXT_LEN ) { + (*(char **) data[5])[IDO2DB_MYSQL_MAX_TEXT_LEN]=0; + ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_or_update_servicestatusdata_add() Warning:perfdata truncated\n"); + } } dummy = asprintf(&query1, "UPDATE %s SET instance_id=%lu, service_object_id=%lu, status_update_time=%s, output='%s', long_output='%s', perfdata='%s', current_state=%d, has_been_checked=%d, should_be_scheduled=%d, current_check_attempt=%d, max_check_attempts=%d, last_check=%s, next_check=%s, check_type=%d, last_state_change=%s, last_hard_state_change=%s, last_hard_state=%d, last_time_ok=%s, last_time_warning=%s, last_time_unknown=%s, last_time_critical=%s, state_type=%d, last_notification=%s, next_notification=%s, no_more_notifications=%d, notifications_enabled=%d, problem_has_been_acknowledged=%d, acknowledgement_type=%d, current_notification_number=%d, passive_checks_enabled=%d, active_checks_enabled=%d, event_handler_enabled=%d, flap_detection_enabled=%d, is_flapping=%d, percent_state_change='%lf', latency='%lf', execution_time='%lf', scheduled_downtime_depth=%d, failure_prediction_enabled=%d, process_performance_data=%d, obsess_over_service=%d, modified_service_attributes=%lu, event_handler='%s', check_command='%s', normal_check_interval='%lf', retry_check_interval='%lf', check_timeperiod_object_id=%lu WHERE service_object_id=%lu", ido2db_db_tablenames[IDO2DB_DBTABLE_SERVICESTATUS], @@ -10945,7 +10967,7 @@ char * query = NULL; char * query1 = NULL; char * query2 = NULL; - unsigned long contactaddress_id; + unsigned long contact_address_id; int mysql_update = FALSE; #endif ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_query_insert_or_update_contactdefinition_addresses_add() start\n"); @@ -10976,7 +10998,7 @@ idi->dbinfo.dbi_result = NULL; - dummy = asprintf(&query, "SELECT contactaddress_id FROM %s WHERE contact_id=%lu AND address_number=%d", + dummy = asprintf(&query, "SELECT contact_address_id FROM %s WHERE contact_id=%lu AND address_number=%d", ido2db_db_tablenames[IDO2DB_DBTABLE_CONTACTADDRESSES], *(unsigned long *) data[1], /* unique constraint start */ *(int *) data[2] /* unique constraint end */ @@ -10986,7 +11008,7 @@ if ((result = ido2db_db_query(idi, query)) == IDO_OK) { if (idi->dbinfo.dbi_result != NULL) { if (dbi_result_next_row(idi->dbinfo.dbi_result)) { - contactaddress_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "contactaddress_id"); + contact_address_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "contact_address_id"); mysql_update = TRUE; } else { mysql_update = FALSE; | ||
[+] | Changed | icinga-1.8.4.tar.bz2/module/idoutils/src/ido2db.c ^ |
@@ -297,6 +297,10 @@ /* open debug log */ ido2db_open_debug_log(); + /* unlink leftover socket */ + if (ido2db_socket_type == IDO_SINK_UNIXSOCKET) + unlink(ido2db_socket_name); + /* if we're running under inetd... */ if (ido2db_use_inetd == IDO_TRUE) { | ||
[+] | Changed | icinga-1.8.4.tar.bz2/module/idoutils/src/idomod.c ^ |
@@ -1800,6 +1800,18 @@ es[6] = ido_escape_buffer(scdata->long_output); es[7] = ido_escape_buffer(scdata->perf_data); + if(es[6] != NULL) { + if(strlen(es[6]) > IDOMOD_MAX_TEXT_LEN) { + es[6][IDOMOD_MAX_TEXT_LEN] = '\0'; + } + } + + if(es[7] != NULL) { + if(strlen(es[7]) > IDOMOD_MAX_TEXT_LEN) { + es[7][IDOMOD_MAX_TEXT_LEN] = '\0'; + } + } + snprintf(temp_buffer, IDOMOD_MAX_BUFLEN - 1 , "\n%d:\n%d=%d\n%d=%d\n%d=%d\n%d=%ld.%ld\n%d=%s\n%d=%s\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%s\n%d=%s\n%d=%s\n%d=%ld.%ld\n%d=%ld.%ld\n%d=%d\n%d=%.5lf\n%d=%.5lf\n%d=%d\n%d=%s\n%d=%s\n%d=%s\n%d\n\n" , IDO_API_SERVICECHECKDATA @@ -1878,6 +1890,18 @@ es[5] = ido_escape_buffer(hcdata->long_output); es[6] = ido_escape_buffer(hcdata->perf_data); + if(es[5] != NULL) { + if(strlen(es[5]) > IDOMOD_MAX_TEXT_LEN) { + es[5][IDOMOD_MAX_TEXT_LEN] = '\0'; + } + } + + if(es[6] != NULL) { + if(strlen(es[6]) > IDOMOD_MAX_TEXT_LEN) { + es[6][IDOMOD_MAX_TEXT_LEN] = '\0'; + } + } + snprintf(temp_buffer, IDOMOD_MAX_BUFLEN - 1 , "\n%d:\n%d=%d\n%d=%d\n%d=%d\n%d=%ld.%ld\n%d=%s\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%s\n%d=%s\n%d=%s\n%d=%ld.%ld\n%d=%ld.%ld\n%d=%d\n%d=%.5lf\n%d=%.5lf\n%d=%d\n%d=%s\n%d=%s\n%d=%s\n%d\n\n" , IDO_API_HOSTCHECKDATA @@ -2182,6 +2206,18 @@ es[5] = ido_escape_buffer(temp_host->host_check_command); es[6] = ido_escape_buffer(temp_host->check_period); + if(es[2] != NULL) { + if(strlen(es[2]) > IDOMOD_MAX_TEXT_LEN) { + es[2][IDOMOD_MAX_TEXT_LEN] = '\0'; + } + } + + if(es[3] != NULL) { + if(strlen(es[3]) > IDOMOD_MAX_TEXT_LEN) { + es[3][IDOMOD_MAX_TEXT_LEN] = '\0'; + } + } + retry_interval = temp_host->retry_interval; snprintf(temp_buffer, IDOMOD_MAX_BUFLEN - 1 @@ -2341,6 +2377,18 @@ es[6] = ido_escape_buffer(temp_service->service_check_command); es[7] = ido_escape_buffer(temp_service->check_period); + if(es[3] != NULL) { + if(strlen(es[3]) > IDOMOD_MAX_TEXT_LEN) { + es[3][IDOMOD_MAX_TEXT_LEN] = '\0'; + } + } + + if(es[4] != NULL) { + if(strlen(es[4]) > IDOMOD_MAX_TEXT_LEN) { + es[4][IDOMOD_MAX_TEXT_LEN] = '\0'; + } + } + snprintf(temp_buffer, IDOMOD_MAX_BUFLEN - 1 , "\n%d:\n%d=%d\n%d=%d\n%d=%d\n%d=%ld.%ld\n%d=%s\n%d=%s\n%d=%s\n%d=%s\n%d=%s\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%lu\n%d=%lu\n%d=%d\n%d=%lu\n%d=%lu\n%d=%d\n%d=%lu\n%d=%lu\n%d=%lu\n%d=%lu\n%d=%d\n%d=%lu\n%d=%lu\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%.5lf\n%d=%.5lf\n%d=%.5lf\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%lu\n%d=%s\n%d=%s\n%d=%lf\n%d=%lf\n%d=%s\n" , IDO_API_SERVICESTATUSDATA @@ -3042,6 +3090,12 @@ es[2] = ido_escape_buffer(schangedata->output); es[3] = ido_escape_buffer(schangedata->long_output); + if(es[3] != NULL) { + if(strlen(es[3]) > IDOMOD_MAX_TEXT_LEN) { + es[3][IDOMOD_MAX_TEXT_LEN] = '\0'; + } + } + snprintf(temp_buffer, IDOMOD_MAX_BUFLEN - 1 , "\n%d:\n%d=%d\n%d=%d\n%d=%d\n%d=%ld.%ld\n%d=%d\n%d=%s\n%d=%s\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%d\n%d=%s\n%d=%s\n%d\n\n" , IDO_API_STATECHANGEDATA | ||
[+] | Changed | icinga-1.8.4.tar.bz2/update-version ^ |
@@ -10,10 +10,10 @@ fi # Current version number -CURRENTVERSION=1.8.2 +CURRENTVERSION=1.8.4 # Last date -LASTDATE=11-28-2012 +LASTDATE=01-13-2013 if [ "x$1" = "x" ] then |