[-]
[+]
|
Changed |
icinga.changes
|
|
[-]
[+]
|
Changed |
icinga.spec
^
|
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/Changelog
^
|
@@ -13,29 +13,6 @@
- idoutils: ${source}/module/idoutils/config/updates
* package locations may differ!
-1.9.5 - 11/02/2014
-
-* core: fix host state translation for passive host check results #5575 - MF
-
-* classic ui: aggressively check for possible buffer overflows in cmd.cgi (thx GitHub) #5434 - MF
-
-
-1.9.4 - 13/12/2013
-
-FIXES
-* classic ui: fix status output in JSON format not including short and long plugin output properly #5217 - RB
-* classic ui: fix possible buffer overflows #5250 - RB
-* classic ui: fix Off-by-one memory access in process_cgivars() #5251 - RB
-
-
-1.9.3 - 07/07/2013
-
-FIXES
-* core: fix init script status exit codes on not running daemon and present pid file #4243 - MF
-
-* idoutils: fix workaround on libdbi fetch_next_row() bug applied for postgresql too, causing faulty queries #4367 - MF
-
-
1.9.2 - 30/06/2013
FIXES
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/Makefile.in
^
|
@@ -81,7 +81,7 @@
###############################
# Global
###############################
-ICINGA_VERSION=1.9.5
+ICINGA_VERSION=1.9.2
CP=@CP@
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/base/checks.c
^
|
@@ -3627,17 +3627,21 @@
}
/* translate return code to basic UP/DOWN state - the DOWN/UNREACHABLE state determination is made later */
- /* if we're not doing aggressive host checking, let WARNING states indicate the host is up (fake the result to be STATE_OK) */
- if (use_aggressive_host_checking == FALSE && result == STATE_WARNING)
- result = STATE_OK;
-
- /* OK states means the host is UP */
- if (result == STATE_OK)
- result = HOST_UP;
-
- /* any problem state indicates the host is not UP */
- else
- result = HOST_DOWN;
+ /* NOTE: only do this for active checks - passive check results already have the final state */
+ if (queued_check_result->check_type == HOST_CHECK_ACTIVE) {
+
+ /* if we're not doing aggressive host checking, let WARNING states indicate the host is up (fake the result to be STATE_OK) */
+ if (use_aggressive_host_checking == FALSE && result == STATE_WARNING)
+ result = STATE_OK;
+
+ /* OK states means the host is UP */
+ if (result == STATE_OK)
+ result = HOST_UP;
+
+ /* any problem state indicates the host is not UP */
+ else
+ result = HOST_DOWN;
+ }
/******************* PROCESS THE CHECK RESULTS ******************/
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/cgi/avail.c
^
|
@@ -1110,8 +1110,10 @@
for (x = 0; variables[x] != NULL; x++) {
/* do some basic length checking on the variable identifier to prevent buffer overflows */
- if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1)
+ if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+ x++;
continue;
+ }
/* we found the hostgroup argument */
else if (!strcmp(variables[x], "hostgroup")) {
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/cgi/cgiutils.c
^
|
@@ -2166,18 +2166,12 @@
/* get url options but filter out "ts_end", "ts_start" and "start" */
if (getenv("QUERY_STRING") != NULL && strcmp(getenv("QUERY_STRING"), "")) {
if(strlen(getenv("QUERY_STRING")) > MAX_INPUT_BUFFER) {
- write_to_cgi_log("display_nav_table(): Query string exceeds max length. Returning without displaying nav table.\n");
- return;
+ 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);
- /* check if concatenated strings exceed MAX_INPUT_BUFFER */
- if (strlen(url) + strlen(stripped_query_string) + 1 > MAX_INPUT_BUFFER) {
- write_to_cgi_log("display_nav_table(): Full query string exceeds max length. Returning without displaying nav table.\n");
- return;
- }
-
for (temp_buffer = my_strtok(stripped_query_string, "&"); temp_buffer != NULL; temp_buffer = my_strtok(NULL, "&")) {
if (strncmp(temp_buffer, "ts_start=", 9) != 0 && strncmp(temp_buffer, "ts_end=", 6) != 0 && strncmp(temp_buffer, "start=", 6) != 0) {
if (strstr(url, "?"))
@@ -2794,24 +2788,17 @@
/* 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) {
- write_to_cgi_log("print_export_link(): Query string exceeds max length. Returning without displaying export link.\n");
- return;
+ 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);
-
- /* check if concatenated strings exceed MAX_INPUT_BUFFER */
- if (strlen(link) + strlen(stripped_query_string) + 2 > MAX_INPUT_BUFFER) {
- write_to_cgi_log("print_export_link(): Full query string exceeds max length. Returning without displaying export link.\n");
- return;
- }
-
strcat(link, "?");
strcat(link, stripped_query_string);
}
/* add string to url */
- if (add_to_url != NULL && strlen(add_to_url) != 0 && strlen(link) + strlen(stripped_query_string) + strlen(add_to_url) + 2 <= MAX_INPUT_BUFFER) {
+ if (add_to_url != NULL && (strlen(add_to_url) != 0)) {
if (strlen(stripped_query_string) != 0)
strcat(link, "&");
else
@@ -3624,18 +3611,12 @@
/* 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) {
- write_to_cgi_log("page_num_selector(): Query string exceeds max length. Returning without displaying num selector.\n");
- return;
+ 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);
- /* check if concatenated strings exceed MAX_INPUT_BUFFER */
- if (strlen(link) + strlen(stripped_query_string) + 1 > MAX_INPUT_BUFFER) {
- write_to_cgi_log("page_num_selector(): Full query string exceeds max length. Returning without displaying num selector.\n");
- return;
- }
-
for (temp_buffer = my_strtok(stripped_query_string, "&"); temp_buffer != NULL; temp_buffer = my_strtok(NULL, "&")) {
if (strncmp(temp_buffer, "limit=", 6) != 0 && strncmp(temp_buffer, "start=", 6) != 0) {
if (strstr(link, "?"))
@@ -3747,18 +3728,12 @@
/* 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) {
- write_to_cgi_log("page_limit_selector(): Query string exceeds max length. Returning without displaying page limit selector.\n");
- return;
+ 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);
- /* check if concatenated strings exceed MAX_INPUT_BUFFER */
- if (strlen(link) + strlen(stripped_query_string) + 1 > MAX_INPUT_BUFFER) {
- write_to_cgi_log("page_limit_selector(): Full query string exceeds max length. Returning without displaying page limit selector.\n");
- return;
- }
-
for (temp_buffer = my_strtok(stripped_query_string, "&"); temp_buffer != NULL; temp_buffer = my_strtok(NULL, "&")) {
if (strncmp(temp_buffer, "limit=", 6) != 0 && strncmp(temp_buffer, "start=", 6) != 0) {
if (strstr(link, "?"))
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/cgi/cmd.c
^
|
@@ -416,8 +416,10 @@
for (x = 0; variables[x] != NULL; x++) {
/* do some basic length checking on the variable identifier to prevent buffer overflows */
- if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1)
+ if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+ x++;
continue;
+ }
/* we found the command type */
else if (!strcmp(variables[x], "cmd_typ")) {
@@ -2636,14 +2638,14 @@
len = snprintf(cmd, sizeof(cmd) - 1, "[%lu] %s;", time(NULL), command);
- if (len < 0 || len >= sizeof(cmd))
+ if (len < 0)
return ERROR;
if (fmt) {
va_start(ap, fmt);
len2 = vsnprintf(&cmd[len], sizeof(cmd) - len - 1, fmt, ap);
va_end(ap);
- if (len2 < 0 || len2 >= sizeof(cmd) - len)
+ if (len2 < 0)
return ERROR;
}
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/cgi/config.c
^
|
@@ -582,8 +582,10 @@
for (x = 0; variables[x] != NULL; x++) {
/* do some basic length checking on the variable identifier to prevent buffer overflows */
- if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1)
+ if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+ x++;
continue;
+ }
/* we found the search_string argument */
else if (!strcmp(variables[x], "search_string")) {
@@ -4262,7 +4264,6 @@
for (c = commandline; c && (cc = strstr(c, "$"));) {
(*(cc++)) = '\0';
printf("%s", html_encode(c, FALSE));
- if (strlen(commandline_pre_processed) + strlen(c) + 1 > MAX_COMMAND_BUFFER) return;
strcat(commandline_pre_processed, c);
if ((*cc) == '$') {
/* Escaped '$' */
@@ -4273,7 +4274,6 @@
c = strstr(cc, "$");
if (c)(*(c++)) = '\0';
printf("<FONT COLOR='#777777'>$%s%s</FONT>", html_encode(cc, FALSE), (c ? "$" : ""));
- if (strlen(commandline_pre_processed) + strlen(cc) + 3 > MAX_COMMAND_BUFFER) return;
strcat(commandline_pre_processed, "$");
strcat(commandline_pre_processed, cc);
if (c) strcat(commandline_pre_processed, "$");
@@ -4289,9 +4289,8 @@
if (command_args[i]) {
if (*(command_args[i]) != '\0') {
printf("<FONT COLOR='%s'><B>%s%s%s</B></FONT>",
- hash_color(i), ((lead_space[i] > 0) || (trail_space[i] > 0) ? "<u>‍" : ""),
- escape_string(command_args[i]), ((lead_space[i] > 0) || (trail_space[i] > 0) ? "‍</u>" : ""));
- if (strlen(commandline_pre_processed) + strlen(command_args[i]) + 1 > MAX_COMMAND_BUFFER) return;
+ hash_color(i), ((lead_space[i] > 0) || (trail_space[i] > 0) ? "<U>‍" : ""),
+ escape_string(command_args[i]), ((lead_space[i] > 0) || (trail_space[i] > 0) ? "‍</U>" : ""));
strcat(commandline_pre_processed, command_args[i]);
} else printf("<FONT COLOR='#0000FF'>(empty)</FONT>");
} else printf("<FONT COLOR='#0000FF'>(undefined)</FONT>");
@@ -4308,7 +4307,6 @@
}
if (c) {
printf("%s", html_encode(c, FALSE));
- if (strlen(commandline_pre_processed) + strlen(c) + 1 > MAX_COMMAND_BUFFER) return;
strcat(commandline_pre_processed, c);
}
commandline_pre_processed[MAX_COMMAND_BUFFER - 1] = '\0';
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/cgi/extinfo.c
^
|
@@ -824,8 +824,10 @@
for (x = 0; variables[x] != NULL; x++) {
/* do some basic length checking on the variable identifier to prevent buffer overflows */
- if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1)
+ if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+ x++;
continue;
+ }
/* we found the display type */
else if (!strcmp(variables[x], "type")) {
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/cgi/histogram.c
^
|
@@ -901,8 +901,10 @@
for (x = 0; variables[x] != NULL; x++) {
/* do some basic length checking on the variable identifier to prevent buffer overflows */
- if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1)
+ if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+ x++;
continue;
+ }
/* we found the host argument */
else if (!strcmp(variables[x], "host")) {
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/cgi/notifications.c
^
|
@@ -362,8 +362,10 @@
for (x = 0; variables[x] != NULL; x++) {
/* do some basic length checking on the variable identifier to prevent buffer overflows */
- if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1)
+ if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+ x++;
continue;
+ }
/* we found the host argument */
else if (!strcmp(variables[x], "host")) {
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/cgi/outages.c
^
|
@@ -206,8 +206,10 @@
for (x = 0; variables[x] != NULL; x++) {
/* do some basic length checking on the variable identifier to prevent buffer overflows */
- if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1)
+ if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+ x++;
continue;
+ }
/* we found the service severity divisor option */
if (!strcmp(variables[x], "service_divisor")) {
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/cgi/status.c
^
|
@@ -1546,8 +1546,10 @@
for (x = 0; variables[x] != NULL; x++) {
/* do some basic length checking on the variable identifier to prevent buffer overflows */
- if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1)
+ if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+ x++;
continue;
+ }
/* we found the search_string argument */
else if (!strcmp(variables[x], "search_string")) {
@@ -2639,7 +2641,7 @@
printf("<TD onClick=\"toggle_checkbox('service_%d','tableformservice');\" CLASS='status%s' nowrap>%s</TD>\n", total_service_entries, status_bg_class, temp_status->last_check);
printf("<TD onClick=\"toggle_checkbox('service_%d','tableformservice');\" CLASS='status%s' nowrap>%s</TD>\n", total_service_entries, status_bg_class, temp_status->state_duration);
printf("<TD onClick=\"toggle_checkbox('service_%d','tableformservice');\" CLASS='status%s'>%s</TD>\n", total_service_entries, status_bg_class, temp_status->attempts);
- printf("<td onClick=\"toggle_checkbox('service_%d','tableformservice');\" class='status%s' valign='middle'>%s</td>\n", total_service_entries, status_bg_class, (temp_status->plugin_output == NULL) ? " " : html_encode(temp_status->plugin_output, TRUE));
+ printf("<TD onClick=\"toggle_checkbox('service_%d','tableformservice');\" CLASS='status%s' valign='center'>%s</TD>\n", total_service_entries, status_bg_class, temp_status->plugin_output);
/* Checkbox for service(s) */
if (is_authorized_for_read_only(¤t_authdata) == FALSE) {
@@ -2699,7 +2701,7 @@
printf("%s%s%s%s", csv_data_enclosure, temp_status->last_check, csv_data_enclosure, csv_delimiter);
printf("%s%s%s%s", csv_data_enclosure, temp_status->state_duration, csv_data_enclosure, csv_delimiter);
printf("%s%s%s%s", csv_data_enclosure, temp_status->attempts, csv_data_enclosure, csv_delimiter);
- printf("%s%s%s%s", csv_data_enclosure, (temp_status->plugin_output == NULL) ? "" : escape_newlines(temp_status->plugin_output), csv_data_enclosure, csv_delimiter);
+ printf("%s%s%s%s", csv_data_enclosure, (temp_status->plugin_output == NULL) ? "" : temp_status->plugin_output, csv_data_enclosure, csv_delimiter);
printf("%s%s%s%s", csv_data_enclosure, (temp_status->is_flapping == TRUE) ? "true" : "false", csv_data_enclosure, csv_delimiter);
printf("%s%s%s%s", csv_data_enclosure, (temp_status->scheduled_downtime_depth > 0) ? "true" : "false", csv_data_enclosure, csv_delimiter);
printf("%s%s%s%s", csv_data_enclosure, (temp_status->checks_enabled == TRUE) ? "true" : "false", csv_data_enclosure, csv_delimiter);
@@ -3096,7 +3098,7 @@
printf("<TD onClick=\"toggle_checkbox('host_%d','tableformhost');\" CLASS='status%s' nowrap>%s</TD>\n", total_host_entries, status_bg_class, temp_statusdata->last_check);
printf("<TD onClick=\"toggle_checkbox('host_%d','tableformhost');\" CLASS='status%s' nowrap>%s</TD>\n", total_host_entries, status_bg_class, temp_statusdata->state_duration);
printf("<TD onClick=\"toggle_checkbox('host_%d','tableformhost');\" CLASS='status%s'>%s</TD>\n", total_host_entries, status_bg_class, temp_statusdata->attempts);
- printf("<td onClick=\"toggle_checkbox('host_%d','tableformhost');\" class='status%s' valign='middle'>%s</td>\n", total_host_entries, status_bg_class, (temp_statusdata->plugin_output == NULL) ? " " : html_encode(temp_statusdata->plugin_output, TRUE));
+ printf("<TD onClick=\"toggle_checkbox('host_%d','tableformhost');\" CLASS='status%s' valign='center'>%s</TD>\n", total_host_entries, status_bg_class, temp_statusdata->plugin_output);
/* Checkbox for host(s) */
if (is_authorized_for_read_only(¤t_authdata) == FALSE) {
@@ -3152,7 +3154,7 @@
printf("%s%s%s%s", csv_data_enclosure, temp_statusdata->last_check, csv_data_enclosure, csv_delimiter);
printf("%s%s%s%s", csv_data_enclosure, temp_statusdata->state_duration, csv_data_enclosure, csv_delimiter);
printf("%s%s%s%s", csv_data_enclosure, temp_statusdata->attempts, csv_data_enclosure, csv_delimiter);
- printf("%s%s%s%s", csv_data_enclosure, (temp_statusdata->plugin_output == NULL) ? "" : escape_newlines(temp_statusdata->plugin_output), csv_data_enclosure, csv_delimiter);
+ printf("%s%s%s%s", csv_data_enclosure, (temp_statusdata->plugin_output == NULL) ? "" : temp_statusdata->plugin_output, csv_data_enclosure, csv_delimiter);
printf("%s%s%s%s", csv_data_enclosure, (temp_statusdata->is_flapping == TRUE) ? "true" : "false", csv_data_enclosure, csv_delimiter);
printf("%s%s%s%s", csv_data_enclosure, (temp_statusdata->scheduled_downtime_depth > 0) ? "true" : "false", csv_data_enclosure, csv_delimiter);
printf("%s%s%s%s", csv_data_enclosure, (temp_statusdata->checks_enabled == TRUE) ? "true" : "false", csv_data_enclosure, csv_delimiter);
@@ -5995,12 +5997,23 @@
/* plugin ouput */
if (status_show_long_plugin_output != FALSE && plugin_output_long != NULL) {
- if (plugin_output_short == NULL)
- asprintf(&plugin_output, "%s", plugin_output_long);
- else
- asprintf(&plugin_output, "%s\n%s", plugin_output_short, plugin_output_long);
+ if (content_type == CSV_CONTENT || content_type == JSON_CONTENT) {
+ if (plugin_output_short != NULL)
+ dummy = asprintf(&plugin_output, "%s", escape_newlines(plugin_output_long));
+ else
+ dummy = asprintf(&plugin_output, "%s %s", plugin_output_short, escape_newlines(plugin_output_long));
+ } else
+ dummy = asprintf(&plugin_output, "%s<BR>%s", (plugin_output_short == NULL) ? "" : html_encode(plugin_output_short, TRUE), html_encode(plugin_output_long, TRUE));
} else if (plugin_output_short != NULL) {
- asprintf(&plugin_output, "%s", plugin_output_short);
+ if (content_type == CSV_CONTENT || content_type == JSON_CONTENT)
+ dummy = asprintf(&plugin_output, "%s", plugin_output_short);
+ else
+ dummy = asprintf(&plugin_output, "%s ", html_encode(plugin_output_short, TRUE));
+ } else {
+ if (content_type == CSV_CONTENT || content_type == JSON_CONTENT)
+ plugin_output = NULL;
+ else
+ dummy = asprintf(&plugin_output, " ");
}
/* allocating new memory */
@@ -6928,18 +6941,12 @@
/* 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) {
- write_to_cgi_log("status_page_num_selector(): Query string exceeds max length. Returning without displaying page num selector.\n");
- return;
+ 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);
- /* check if concatenated strings exceed MAX_INPUT_BUFFER */
- if (strlen(link) + strlen(stripped_query_string) + 1 > MAX_INPUT_BUFFER) {
- write_to_cgi_log("status_page_num_selector(): Full query string exceeds max length. Returning without displaying page num selector.\n");
- return;
- }
-
for (temp_buffer = my_strtok(stripped_query_string, "&"); temp_buffer != NULL; temp_buffer = my_strtok(NULL, "&")) {
if (strncmp(temp_buffer, "limit=", 6) != 0 && strncmp(temp_buffer, "start=", 6) != 0) {
if (strstr(link, "?"))
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/cgi/statusmap.c
^
|
@@ -309,8 +309,10 @@
for (x = 0; variables[x] != NULL; x++) {
/* do some basic length checking on the variable identifier to prevent buffer overflows */
- if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1)
+ if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+ x++;
continue;
+ }
/* we found the host argument */
else if (!strcmp(variables[x], "host")) {
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/cgi/summary.c
^
|
@@ -626,8 +626,10 @@
for (x = 0; variables[x] != NULL; x++) {
/* do some basic length checking on the variable identifier to prevent buffer overflows */
- if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1)
+ if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+ x++;
continue;
+ }
/* we found first time argument */
else if (!strcmp(variables[x], "t1")) {
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/cgi/trends.c
^
|
@@ -1117,8 +1117,10 @@
for (x = 0; variables[x] != NULL; x++) {
/* do some basic length checking on the variable identifier to prevent buffer overflows */
- if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1)
+ if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+ x++;
continue;
+ }
/* we found the host argument */
else if (!strcmp(variables[x], "host")) {
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/configure
^
|
@@ -2491,9 +2491,9 @@
PKG_NAME=icinga-core
-PKG_VERSION="1.9.5"
+PKG_VERSION="1.9.2"
PKG_HOME_URL="http://www.icinga.org/"
-PKG_REL_DATE="02-11-2014"
+PKG_REL_DATE="06-30-2013"
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/configure.in
^
|
@@ -9,9 +9,9 @@
AC_PREFIX_DEFAULT(/usr/local/icinga)
PKG_NAME=icinga-core
-PKG_VERSION="1.9.5"
+PKG_VERSION="1.9.2"
PKG_HOME_URL="http://www.icinga.org/"
-PKG_REL_DATE="02-11-2014"
+PKG_REL_DATE="06-30-2013"
dnl Figure out how to invoke "install" and what install options to use.
AC_PROG_INSTALL
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/daemon-init.in
^
|
@@ -55,14 +55,6 @@
## helper functions ##
-check_pid_file_exists ()
-{
- if test ! -f $IcingaRunFile; then
- return 1;
- fi
-
- return 0
-}
status_icinga ()
{
@@ -77,26 +69,17 @@
}
-checkstatus_icinga()
+printstatus_icinga()
{
- if check_pid_file_exists > /dev/null; then
- pid_icinga
- if status_icinga $1 $2; then
- echo "icinga (pid $IcingaPID) is running..."
- exit 0
- else
- echo "icinga is not running. removing $IcingaRunFile"
- # pid file exists, but daemon is dead
- rm -f $IcingaRunFile
- exit 1
- fi
- else
- # daemon not running
- echo "icinga is not running"
- exit 3
- fi
+
+ if status_icinga $1 $2; then
+ echo "icinga (pid $IcingaPID) is running..."
+ else
+ echo "icinga is not running"
+ fi
}
+
killproc_icinga ()
{
if kill -0 $IcingaPID >/dev/null 2>&1; then
@@ -120,6 +103,7 @@
IcingaPID=`head -n 1 $IcingaRunFile`
}
+
chk_config ()
{
printf "Running configuration check..."
@@ -206,7 +190,8 @@
;;
status)
- checkstatus_icinga icinga
+ pid_icinga
+ printstatus_icinga icinga
;;
checkconfig)
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/html/main.html
^
|
@@ -18,9 +18,9 @@
</div>
<div id="currentversioninfo">
-<div class="version">Version 1.9.5</div>
-<div class="releasedate">Februar 11, 2014</div>
-<div class="whatsnew"><a href="docs/en/whatsnew.html">Read what's new in Icinga 1.9.5</a></div>
+<div class="version">Version 1.9.2</div>
+<div class="releasedate">June 30, 2013</div>
+<div class="whatsnew"><a href="docs/en/whatsnew.html">Read what's new in Icinga 1.9.2</a></div>
</div>
<div id="developer">
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/icinga.spec
^
|
@@ -20,7 +20,7 @@
Summary: Open Source host, service and network monitoring program
Name: icinga
-Version: 1.9.5
+Version: 1.9.2
Release: %{revision}%{?dist}
License: GPLv2
Group: Applications/System
@@ -153,6 +153,7 @@
--enable-embedded-perl \
--enable-idoutils \
--with-httpd-conf=%{apacheconfdir} \
+ --with-init-dir=%{_initrddir} \
--with-log-dir=%{logdir} \
--enable-cgi-log \
--with-cgi-log-dir=%{logdir}/gui \
@@ -437,15 +438,6 @@
%changelog
-* Tue Feb 11 2013 Michael Friedrich <michael.friedrich@netways.de> - 1.9.5-1
-- bump 1.9.5
-
-* Fri Dec 13 2013 Ricardo Bartels <ricardo@bitchbrothers.com> - 1.9.4-1
-- bump 1.9.4
-
-* Sun Jul 07 2013 Michael Friedrich <michael.friedrich@netways.de> - 1.9.3-1
-- bump 1.9.3
-
* Sun Jun 30 2013 Michael Friedrich <michael.friedrich@netways.de> - 1.9.2-1
- bump 1.9.2
|
[-]
[+]
|
Changed |
icinga-1.9.2.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.9.5"
-#define PROGRAM_MODIFICATION_DATE "02-11-2014"
+#define PROGRAM_VERSION "1.9.2"
+#define PROGRAM_MODIFICATION_DATE "06-30-2013"
/*#define DEBUG_CHECK_IPC 1 */
/*#define DEBUG_CHECK_IPC2 1*/
|
[-]
[+]
|
Changed |
icinga-1.9.2.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 "02-11-2014"
-#define IDO_VERSION "1.9.5"
+#define IDO_DATE "06-30-2013"
+#define IDO_VERSION "1.9.2"
#define IDO_SCHEMA_VERSION "1.9.0"
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/module/idoutils/src/dbhandlers.c
^
|
@@ -478,7 +478,6 @@
#ifdef USE_LIBDBI
unsigned long offset, stride;
char *buf = NULL;
- char *name2 = NULL;
#endif
#ifdef USE_ORACLE
@@ -488,17 +487,21 @@
/* find all the object definitions we already have */
#ifdef USE_LIBDBI /* everything else will be libdbi */
- switch (idi->dbinfo.server_type) {
- case IDO2DB_DBSERVER_PGSQL:
- /* postgresql works well with dbi_result_next_now() */
- if (asprintf(&buf, "SELECT object_id, objecttype_id, name1, name2 FROM %s WHERE instance_id=%lu", ido2db_db_tablenames[IDO2DB_DBTABLE_OBJECTS], idi->dbinfo.instance_id) == -1)
+ offset = 0;
+ stride = 2500;
+
+ for (;;) {
+ if (asprintf(&buf, "SELECT object_id, objecttype_id, name1, name2 FROM %s WHERE instance_id=%lu LIMIT %lu, %lu", ido2db_db_tablenames[IDO2DB_DBTABLE_OBJECTS], idi->dbinfo.instance_id, offset, stride) == -1)
buf = NULL;
if ((result = ido2db_db_query(idi, buf)) == IDO_OK) {
+ if (dbi_result_get_numrows(idi->dbinfo.dbi_result) == 0)
+ break;
while (idi->dbinfo.dbi_result) {
if (dbi_result_next_row(idi->dbinfo.dbi_result)) {
-
+ char *name2;
+
object_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "object_id");
objecttype_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "objecttype_id");
@@ -526,53 +529,7 @@
free(buf);
- break;
- default:
- /* provide a workaround for mysql bug with dbi_result_nextrow() */
- offset = 0;
- stride = 2500;
-
- for (;;) {
- if (asprintf(&buf, "SELECT object_id, objecttype_id, name1, name2 FROM %s WHERE instance_id=%lu LIMIT %lu, %lu", ido2db_db_tablenames[IDO2DB_DBTABLE_OBJECTS], idi->dbinfo.instance_id, offset, stride) == -1)
- buf = NULL;
-
- if ((result = ido2db_db_query(idi, buf)) == IDO_OK) {
- if (dbi_result_get_numrows(idi->dbinfo.dbi_result) == 0)
- break;
-
- while (idi->dbinfo.dbi_result) {
- if (dbi_result_next_row(idi->dbinfo.dbi_result)) {
-
- object_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "object_id");
- objecttype_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "objecttype_id");
-
- /* get string and free it later on */
- if (asprintf(&tmp1, "%s", dbi_result_get_string_copy(idi->dbinfo.dbi_result, "name1")) == -1)
- tmp1 = NULL;
- name2 = dbi_result_get_string_copy(idi->dbinfo.dbi_result, "name2");
- if (!name2 || asprintf(&tmp2, "%s", name2) == -1)
- tmp2 = NULL;
-
- ido2db_add_cached_object_id(idi, objecttype_id, tmp1, tmp2, object_id);
-
- free(tmp1);
- free(tmp2);
-
- } else {
- dbi_result_free(idi->dbinfo.dbi_result);
- idi->dbinfo.dbi_result = NULL;
- }
- }
- } else {
- dbi_result_free(idi->dbinfo.dbi_result);
- idi->dbinfo.dbi_result = NULL;
- }
-
- free(buf);
-
- offset += stride;
- }
- break;
+ offset += stride;
}
#endif
|
[-]
[+]
|
Changed |
icinga-1.9.2.tar.bz2/update-version
^
|
@@ -10,10 +10,10 @@
fi
# Current version number
-CURRENTVERSION=1.9.5
+CURRENTVERSION=1.9.2
# Last date
-LASTDATE=02-11-2014
+LASTDATE=06-30-2013
if [ "x$1" = "x" ]
then
|