[-]
[+]
|
Changed |
icinga.changes
|
|
[-]
[+]
|
Changed |
icinga.spec
^
|
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/Changelog
^
|
@@ -11,37 +11,6 @@
* for configuration file changes, check the following for added/removed config options
- core, classic ui: sample-config/updates/
- idoutils: module/idoutils/config/updates
-* package locations may differ!
-
-1.8.6 - 11/02/2014
-
-FIXES
-* 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.8.5 - 13/12/2013
-
-FIXES
-* core: fix keep_unknown_macros still exposes wrong warnings to logs #3725 - MF
-* core: fix checkresult reaper cleanup fails due to relative file path #3937 - MaF
-
-* classic ui: fixed JSON output is insufficiently escaped #3541 - RB
-* classic ui: fixed segfault when reading malformed log entries #3528 - RB
-* classic ui: fixed Command expansion problem with percentage signs #3929 - RB
-* classic ui: fix possible buffer overflows #5250 - RB
-* classic ui: fix Off-by-one memory access in process_cgivars() #5251 - RB
-
-* idoutils: idomod leaks memory on core reload #3749 - GB
-* idoutils: add workaround fix for num_rows_affected broken in libdbi/mariadb, returned ids are 0 #3728 - MF
-* idoutils: fix segfaults on reload with multiple neb modules of the same binary #4033 - MF
-
-* icinga.spec: add idoutils as transitional package (thx Stefan Marx, Michael Grüner) #3640 - MF
-* icinga.spec: fix double %{logdir}/gui/ definitions in icinga and icinga-gui (thx René Koch) #3802 - MF
-
-* install: fix ido2db initscript uses same chkconfig line as icinga (Dirk Götz) #3490 - MF
-
1.8.4 - 13/01/2013
@@ -55,7 +24,6 @@
* 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
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/INSTALLING
^
|
@@ -26,7 +26,7 @@
https://wiki.icinga.org
If you happen to have questions on the install, you can get onto the
-various community support channels: https://www.icinga.org/support/
+various community channels: https://www.icinga.org/support/
Good luck! :-)
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/Makefile.in
^
|
@@ -78,7 +78,7 @@
###############################
# Global
###############################
-ICINGA_VERSION=1.8.6
+ICINGA_VERSION=1.8.4
CP=@CP@
@@ -181,7 +181,7 @@
@echo " - Read the HTML documentation in html/docs/"
@echo ""
@echo "before you post a question to one of the mailing lists at"
- @echo "http://www.icinga.org/support/ or at Icinga Portal:"
+ @echo "http://www.icinga.org/community/ or at Icinga Portal:"
@echo "http://www.icinga-portal.org"
@echo ""
@echo "Also make sure to include pertinent information that could"
@@ -194,7 +194,7 @@
@echo ""
@echo "For more information on obtaining support for Icinga, visit:"
@echo ""
- @echo " http://www.icinga.org/support/"
+ @echo " http://www.icinga.org/community/"
@echo ""
@echo "*************************************************************"
@echo ""
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/README.RHEL
^
|
@@ -60,7 +60,7 @@
5. Optional: install additional Icinga guis like Icinga Web or Icinga Reporting as well
as addons such as PNP4Nagios, Check_MK or NagVis. For a suggested list please
- either consult the docs or the wiki, or ask community members at monitoring-portal.org
+ either consult the docs or the wiki, or ask community members at icinga-portal.org
Troubleshooting
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/README.RHEL.idoutils
^
|
@@ -145,15 +145,10 @@
Remember - the upgrade steps need to be applied incremential, version by version.
-Make sure to stop ido2db before applying the db upgrade!
-
-# service ido2db stop
-
+e.g.
# cd /usr/share/doc/icinga-idoutils/db/mysql/upgrade/
-# mysql -u root -p icinga < mysql-upgrade-1.9.0.sql
+# mysql -u root -p icinga < mysql-upgrade-1.7.0.sql
-# service ido2db start
-# service icinga restart
===========
= Advanced
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/TESTING
^
|
@@ -64,7 +64,7 @@
$ git format-patch -1
Attach the gotten patch to the new issue you may create at dev.icinga.org in the appropriate section.
-Or via mail onto our mailinglists - http://www.icinga.org/support/
+Or via mail onto our mailinglists - http://www.icinga.org/community/
Thanks :)
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/base/checks.c
^
|
@@ -3617,17 +3617,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.8.4.tar.bz2/base/icinga.c
^
|
@@ -678,11 +678,7 @@
nagios_pid = (int)getpid();
/* read in the configuration files (main and resource config files) */
- if (read_main_config_file(config_file) == ERROR) {
- logit(NSLOG_PROCESS_INFO | NSLOG_RUNTIME_ERROR | NSLOG_CONFIG_ERROR, TRUE, "Failed to read main config file. Aborting.");
- cleanup();
- exit(EXIT_FAILURE);
- }
+ result = read_main_config_file(config_file);
/* we need to read the modules in the first place as object configuration before neb modules are initialized/loaded */
result = read_object_config_data(config_file, READ_MODULES, FALSE, FALSE);
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/base/nebmods.c
^
|
@@ -126,13 +126,14 @@
nebmodule *next_module = NULL;
int x = OK;
- for (temp_module = neb_module_list; temp_module; temp_module = next_module) {
+ for (temp_module = neb_module_list; temp_module;) {
next_module = temp_module->next;
my_free(temp_module->filename);
my_free(temp_module->args);
for (x = 0; x < NEBMODULE_MODINFO_NUMITEMS; x++)
my_free(temp_module->info[x]);
my_free(temp_module);
+ temp_module = next_module;
}
neb_module_list = NULL;
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/base/utils.c
^
|
@@ -2772,7 +2772,7 @@
* otherwise we will leave old files there
*/
if (stat_buf.st_mtime + max_check_result_file_age < time(NULL)) {
- delete_check_result_file(file);
+ delete_check_result_file(dirfile->d_name);
continue;
}
|
[-]
[+]
|
Changed |
icinga-1.8.4.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.8.4.tar.bz2/cgi/cgiutils.c
^
|
@@ -1981,21 +1981,15 @@
break;
}
- /* get url options but filter out "ts_end", "ts_start" and "start" */
+ /* 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("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, "?"))
@@ -2569,24 +2563,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
@@ -3072,20 +3059,16 @@
for (i = 0, j = 0; i < len; i++) {
- /* escape quotes and backslashes */
- if ((char)input[i] == (char)'"' || (char)input[i] == (char)'\\') {
+ /* escape quotes */
+ if ((char)input[i] == (char)'"') {
encoded_string[j++] = '\\';
encoded_string[j++] = input[i];
- /* escape newlines */
+ /* escape newlines */
} else if ((char)input[i] == (char)'\n') {
encoded_string[j++] = '\\';
encoded_string[j++] = 'n';
- /* ignore control caracters */
- } else if (input[i] < 32 || input[i] == 127) {
- continue;
-
} else
encoded_string[j++] = input[i];
}
@@ -3399,18 +3382,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, "?"))
@@ -3522,18 +3499,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.8.4.tar.bz2/cgi/cmd.c
^
|
@@ -415,8 +415,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.8.4.tar.bz2/cgi/config.c
^
|
@@ -578,8 +578,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")) {
@@ -4256,7 +4258,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 '$' */
@@ -4267,7 +4268,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, "$");
@@ -4283,9 +4283,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>");
@@ -4302,7 +4301,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.8.4.tar.bz2/cgi/extinfo.c
^
|
@@ -825,8 +825,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.8.4.tar.bz2/cgi/getcgi.c
^
|
@@ -109,27 +109,15 @@
len = strlen(input);
for (x = 0, y = 0; x < len; x++, y++) {
- if (input[x] == '\x0') {
+ if (input[x] == '\x0')
break;
-
- // RB 2013-04-07
- // only allow hex conversion if '%' is follow by a valid character
- } else if (input[x] == '%' && (
- // 0 - 9
- (input[x+1] >= 48 && input[x+1] <= 57) ||
- // A - F
- (input[x+1] >= 65 && input[x+1] <= 70) ||
- // a - f
- (input[x+1] >= 97 && input[x+1] <= 102))
- ) {
-
+ else if (input[x] == '%') {
input[y] = hex_to_char(&input[x+1]);
x += 2;
-
// RB 2011-09-08
// convert plus as well that it can bu used in service and host names
} else if (input[x] == '+') {
- input[y] = ' ';
+ input[y] = ' ';
} else
input[y] = input[x];
}
|
[-]
[+]
|
Changed |
icinga-1.8.4.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.8.4.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.8.4.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.8.4.tar.bz2/cgi/readlogs.c
^
|
@@ -382,11 +382,7 @@
/* get timestamp */
temp_buffer = strtok(input, "]");
-
- if (temp_buffer == NULL)
- continue;
-
- timestamp = strtoul(temp_buffer + 1, NULL, 10);
+ timestamp = (temp_buffer == NULL) ? 0L : strtoul(temp_buffer + 1, NULL, 10);
/* skip line if out of range */
if ((ts_end >= 0 && timestamp > ts_end) || (ts_start >= 0 && timestamp < ts_start))
@@ -395,9 +391,6 @@
/* get log entry text */
temp_buffer = strtok(NULL, "\n");
- if (temp_buffer == NULL)
- continue;
-
/* if we search for something, check if it entry matches search_string */
if (search_string != NULL) {
if (regexec(&preg, temp_buffer, 0, NULL, 0) == REG_NOMATCH)
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/cgi/status.c
^
|
@@ -1547,8 +1547,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")) {
@@ -6937,18 +6939,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.8.4.tar.bz2/cgi/statusmap.c
^
|
@@ -313,8 +313,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.8.4.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.8.4.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.8.4.tar.bz2/common/macros.c
^
|
@@ -200,20 +200,13 @@
/* grab the macro value */
result = grab_macro_value_r(mac, temp_buffer, &selected_macro, &clean_options, &free_macro);
- log_debug_info(DEBUGL_MACROS, 2, " Processed '%s', Clean Options: %d, Free: %d\n, Value: '%s'", temp_buffer, clean_options, free_macro, selected_macro ? selected_macro : "");
+ log_debug_info(DEBUGL_MACROS, 2, " Processed '%s', Clean Options: %d, Free: %d\n", temp_buffer, clean_options, free_macro);
/* an error occurred - we couldn't parse the macro, so continue on */
if (result == ERROR) {
/* empty string still could mean that we hit the escaped $, so log an error in all other cases */
- /* the error tells the user that the macro is valid, but value fetching contained error*/
- if(strcmp(temp_buffer, "")) {
- log_debug_info(DEBUGL_MACROS, 2, " Warning: Error grabbing macro '%s' value '%s'! Maybe used in the wrong scope? Check the docs.\n", temp_buffer, selected_macro ? selected_macro : "" );
-#ifdef NSCORE
- if (keep_unknown_macros == FALSE) {
- logit(NSLOG_RUNTIME_WARNING, TRUE, "Warning: Error grabbing macro '%s' value '%s'! Maybe used in the wrong scope? Check the docs.\n", temp_buffer, selected_macro ? selected_macro : "" );
- }
-#endif
- }
+ if(strcmp(temp_buffer, ""))
+ logit(NSLOG_RUNTIME_WARNING, TRUE, "Warning: An error occurred processing macro '%s'!\n", temp_buffer);
if (free_macro == TRUE)
my_free(selected_macro);
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/common/objects.c
^
|
@@ -64,7 +64,6 @@
module *module_list = NULL, *module_list_tail = NULL;
skiplist *object_skiplists[NUM_OBJECT_SKIPLISTS];
-static int object_skiplists_valid = 0;
#ifdef NSCORE
@@ -107,8 +106,10 @@
/******************************************************************/
int init_object_skiplists(void) {
- if (object_skiplists_valid)
- free_object_skiplists();
+ int x = 0;
+
+ for (x = 0; x < NUM_OBJECT_SKIPLISTS; x++)
+ object_skiplists[x] = NULL;
object_skiplists[HOST_SKIPLIST] = skiplist_new(15, 0.5, FALSE, FALSE, skiplist_compare_host);
object_skiplists[SERVICE_SKIPLIST] = skiplist_new(15, 0.5, FALSE, FALSE, skiplist_compare_service);
@@ -127,8 +128,6 @@
object_skiplists[MODULE_SKIPLIST] = skiplist_new(10, 0.5, FALSE, FALSE, skiplist_compare_module);
- object_skiplists_valid = 1;
-
return OK;
}
@@ -140,8 +139,6 @@
for (x = 0; x < NUM_OBJECT_SKIPLISTS; x++)
skiplist_free(&object_skiplists[x]);
- object_skiplists_valid = 0;
-
return OK;
}
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/configure
^
|
@@ -2456,9 +2456,9 @@
PKG_NAME=icinga-core
-PKG_VERSION="1.8.6"
+PKG_VERSION="1.8.4"
PKG_HOME_URL="http://www.icinga.org/"
-PKG_REL_DATE="02-11-2014"
+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.6"
+PKG_VERSION="1.8.4"
PKG_HOME_URL="http://www.icinga.org/"
-PKG_REL_DATE="02-11-2014"
+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.6</div>
-<div class="releasedate">Februar 11, 2014</div>
-<div class="whatsnew"><a href="docs/en/whatsnew.html">Read what's new in Icinga 1.8.6</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
^
|
@@ -6,7 +6,7 @@
#
# ExclusiveDist: el5 el6
-%define revision 5
+%define revision 1
%define logmsg logger -t %{name}/rpm
@@ -20,13 +20,13 @@
Summary: Open Source host, service and network monitoring program
Name: icinga
-Version: 1.8.6
+Version: 1.8.4
Release: %{revision}%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.icinga.org/
-Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
+Source0: http://dl.sf.net/icinga/icinga-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: gcc
@@ -64,26 +64,13 @@
%package devel
Summary: Provides include files that Icinga-related applications may compile against
-Group: Development/Libraries
+Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
This package provides include files that Icinga-related applications
may compile against.
-%package idoutils
-Summary: transitional package, use idoutils-libdbi-* instead
-Group: Applications/System
-Requires: %{name} = %{version}-%{release}
-Requires: %{name}-idoutils-libdbi-mysql
-
-%description idoutils
-Transitional package. Idoutils has been splitted into
-idoutils-libdbi-mysql and idoutils-libdbi-pgsql. Use one
-of these. This package pulls in idoutils-libdbi-mysql.
-This package can be safely uninstalled, it provides no
-files and nothing depends on it.
-
%package idoutils-libdbi-mysql
Summary: database broker module for %{name}
Group: Applications/System
@@ -118,14 +105,6 @@
%prep
%setup -qn %{name}-%{version}
-cat << EOF > README.idoutils.transitional
-Transitional package. Idoutils has been splitted into
-idoutils-libdbi-mysql and idoutils-libdbi-pgsql. Use one
-of these. This package pulls in idoutils-libdbi-mysql.
-This package can be safely uninstalled, it provides no
-files and nothing depends on it.
-EOF
-
%build
%configure \
--prefix=%{_datadir}/%{name} \
@@ -243,14 +222,14 @@
# cgi.cfg luckily knows where icinga.cfg is and does not need an update
# retention.dat, objects.cache, objects.precache, status.dat, cmdfile, pidfile, checkresults
%{__perl} -pi -e '
- s|/var/icinga/retention.dat|%{spooldir}/retention.dat|;
- s|/var/icinga/objects.precache|%{spooldir}/objects.precache|;
- s|/var/icinga/objects.cache|%{spooldir}/objects.cache|;
- s|/var/icinga/status.dat|%{spooldir}/status.dat|;
- s|/var/icinga/rw/icinga.cmd|%{spooldir}/cmd/icinga.cmd|;
- s|/var/icinga/icinga.pid|/var/run/icinga.pid|;
+ s|/var/icinga/retention.dat|%{spooldir}/retention.dat|;
+ s|/var/icinga/objects.precache|%{spooldir}/objects.precache|;
+ s|/var/icinga/objects.cache|%{spooldir}/objects.cache|;
+ s|/var/icinga/status.dat|%{spooldir}/status.dat|;
+ s|/var/icinga/rw/icinga.cmd|%{spooldir}/cmd/icinga.cmd|;
+ s|/var/icinga/icinga.pid|/var/run/icinga.pid|;
s|/var/icinga/checkresults|%{spooldir}/checkresults|;
- ' /etc/icinga/icinga.cfg
+ ' /etc/icinga/icinga.cfg
# start icinga
/sbin/service icinga start &>/dev/null || :
@@ -352,8 +331,8 @@
%attr(755,-,-) %{_libdir}/icinga/p1.pl
%{_libdir}/%{name}/eventhandlers
%defattr(-,icinga,icinga,-)
-%dir %{logdir}
-%dir %{logdir}/archives
+%{logdir}
+%{logdir}/archives
%dir %{_localstatedir}/spool/%{name}
%dir %{_localstatedir}/spool/%{name}/checkresults
%attr(2755,icinga,icingacmd) %{_localstatedir}/spool/%{name}/cmd
@@ -403,10 +382,6 @@
%defattr(-,root,root)
%{_includedir}/%{name}/
-%files idoutils
-%defattr(-,root,root)
-%doc README.idoutils.transitional
-
%files idoutils-libdbi-mysql
%defattr(-,root,root,-)
%doc README LICENSE Changelog UPGRADING module/idoutils/db README.RHEL README.RHEL.idoutils
@@ -433,24 +408,6 @@
%changelog
-* Tue Feb 11 2013 Ricardo Bartels <ricardo@bitchbrothers.com> - 1.8.6-1
-- 1.8.6 bump
-
-* Fri Dec 13 2013 Ricardo Bartels <ricardo@bitchbrothers.com> - 1.8.5-1
-- 1.8.5 bump
-
-* Tue Mar 05 2013 Rene Koch <r.koch@ovido.at> - 1.8.4-5
-- fixed double logdir/gui/ definitions in icinga and icinga-gui
-
-* Fri Feb 15 2013 Michael Friedrich <michael.friedrich@netways.de> - 1.8.4-4
-- fix rpmlint errors/warnings
-
-* Wed Feb 06 2013 Michael Friedrich <michael.friedrich@netways.de> - 1.8.4-3
-- add idoutils as transitional package (thx Stefan Marx, Michael Grüner)
-
-* Fri Feb 01 2013 Michael Friedrich <michael.friedrich@netways.de> - 1.8.4-2
-- fix sf.net url
-
* Sun Jan 13 2013 Michael Friedrich <michael.friedrich@netways.de> - 1.8.4-1
- 1.8.4 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.6"
-#define PROGRAM_MODIFICATION_DATE "02-11-2014"
+#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 "02-11-2014"
-#define IDO_VERSION "1.8.6"
+#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/src/dbqueries.c
^
|
@@ -5259,12 +5259,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)) {
- /* this condition should never happen, as libdbi UPDATE and affected rows
- * should take care of it. it seems that newer mysql versions got problems
- * with libdbi (https://dev.icinga.org/issues/3728) so we return the selected id
- * as fallback here
- */
- *id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "configfile_id");
+ configfile_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "configfile_id");
mysql_update = TRUE;
} else {
mysql_update = FALSE;
@@ -5749,12 +5744,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)) {
- /* this condition should never happen, as libdbi UPDATE and affected rows
- * should take care of it. it seems that newer mysql versions got problems
- * with libdbi (https://dev.icinga.org/issues/3728) so we return the selected id
- * as fallback here
- */
- *id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "host_id");
+ host_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "host_id");
mysql_update = TRUE;
} else {
mysql_update = FALSE;
@@ -6721,12 +6711,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)) {
- /* this condition should never happen, as libdbi UPDATE and affected rows
- * should take care of it. it seems that newer mysql versions got problems
- * with libdbi (https://dev.icinga.org/issues/3728) so we return the selected id
- * as fallback here
- */
- *id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "hostgroup_id");
+ hostgroup_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "hostgroup_id");
mysql_update = TRUE;
} else {
mysql_update = FALSE;
@@ -7176,12 +7161,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)) {
- /* this condition should never happen, as libdbi UPDATE and affected rows
- * should take care of it. it seems that newer mysql versions got problems
- * with libdbi (https://dev.icinga.org/issues/3728) so we return the selected id
- * as fallback here
- */
- *id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "service_id");
+ service_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "service_id");
mysql_update = TRUE;
} else {
mysql_update = FALSE;
@@ -7937,12 +7917,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)) {
- /* this condition should never happen, as libdbi UPDATE and affected rows
- * should take care of it. it seems that newer mysql versions got problems
- * with libdbi (https://dev.icinga.org/issues/3728) so we return the selected id
- * as fallback here
- */
- *id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "servicegroup_id");
+ servicegroup_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "servicegroup_id");
mysql_update = TRUE;
} else {
mysql_update = FALSE;
@@ -8801,12 +8776,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)) {
- /* this condition should never happen, as libdbi UPDATE and affected rows
- * should take care of it. it seems that newer mysql versions got problems
- * with libdbi (https://dev.icinga.org/issues/3728) so we return the selected id
- * as fallback here
- */
- *id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "hostescalation_id");
+ hostescalation_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "hostescalation_id");
mysql_update = TRUE;
} else {
mysql_update = FALSE;
@@ -9426,12 +9396,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)) {
- /* this condition should never happen, as libdbi UPDATE and affected rows
- * should take care of it. it seems that newer mysql versions got problems
- * with libdbi (https://dev.icinga.org/issues/3728) so we return the selected id
- * as fallback here
- */
- *id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "serviceescalation_id");
+ serviceescalation_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "serviceescalation_id");
mysql_update = TRUE;
} else {
mysql_update = FALSE;
@@ -10229,12 +10194,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)) {
- /* this condition should never happen, as libdbi UPDATE and affected rows
- * should take care of it. it seems that newer mysql versions got problems
- * with libdbi (https://dev.icinga.org/issues/3728) so we return the selected id
- * as fallback here
- */
- *id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "timeperiod_id");
+ timeperiod_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "timeperiod_id");
mysql_update = TRUE;
} else {
mysql_update = FALSE;
@@ -10675,12 +10635,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)) {
- /* this condition should never happen, as libdbi UPDATE and affected rows
- * should take care of it. it seems that newer mysql versions got problems
- * with libdbi (https://dev.icinga.org/issues/3728) so we return the selected id
- * as fallback here
- */
- *id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "contact_id");
+ contact_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "contact_id");
mysql_update = TRUE;
} else {
mysql_update = FALSE;
@@ -11967,12 +11922,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)) {
- /* this condition should never happen, as libdbi UPDATE and affected rows
- * should take care of it. it seems that newer mysql versions got problems
- * with libdbi (https://dev.icinga.org/issues/3728) so we return the selected id
- * as fallback here
- */
- *id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "contactgroup_id");
+ contactgroup_id = dbi_result_get_ulonglong(idi->dbinfo.dbi_result, "contactgroup_id");
mysql_update = TRUE;
} else {
mysql_update = FALSE;
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/module/idoutils/src/idomod.c
^
|
@@ -65,8 +65,6 @@
int idomod_open_debug_log(void);
int idomod_close_debug_log(void);
-static char *broker_data_temp_buffer;
-
extern int errno;
/**** Icinga VARIABLES ****/
@@ -244,8 +242,6 @@
/* save unprocessed data to buffer file */
idomod_save_unprocessed_data(idomod_buffer_file);
- free(idomod_buffer_file);
- idomod_buffer_file = NULL;
/* clear sink buffer */
idomod_sink_buffer_deinit(&sinkbuf);
@@ -259,20 +255,6 @@
/* close debug log */
idomod_close_debug_log();
- /* free variables */
- free(idomod_instance_name);
- idomod_instance_name = NULL;
-
- free(idomod_sink_name);
- idomod_sink_name = NULL;
-
- free(idomod_sink_rotation_command);
- idomod_sink_rotation_command = NULL;
-
- /* free temp buffer */
- free(broker_data_temp_buffer);
- broker_data_temp_buffer = NULL;
-
return IDO_OK;
}
@@ -1256,7 +1238,7 @@
/* handles brokered event data */
int idomod_broker_data(int event_type, void *data) {
//char temp_buffer[IDOMOD_MAX_BUFLEN];
- char *temp_buffer;
+ static char *temp_buffer;
ido_dbuf dbuf;
int write_to_sink = IDO_TRUE;
host *temp_host = NULL;
@@ -1298,14 +1280,12 @@
int last_state = -1;
int last_hard_state = -1;
- if (broker_data_temp_buffer == NULL) {
- broker_data_temp_buffer = (char *)malloc(IDOMOD_MAX_BUFLEN);
- if (broker_data_temp_buffer == NULL)
+ if (temp_buffer == NULL) {
+ temp_buffer = (char *)malloc(IDOMOD_MAX_BUFLEN);
+ if (temp_buffer == NULL)
return 0;
}
- temp_buffer = broker_data_temp_buffer;
-
idomod_log_debug_info(IDOMOD_DEBUGL_PROCESSINFO, 2, "idomod_broker_data() start\n");
@@ -3341,6 +3321,10 @@
/* initialize dynamic buffer (2KB chunk size) */
ido_dbuf_init(&dbuf, 2048);
+ /* initialize buffers */
+ for (x = 0; x < OBJECTCONFIG_ES_ITEMS; x++)
+ es[x] = NULL;
+
/****** dump command config ******/
for (temp_command = command_list; temp_command != NULL; temp_command = temp_command->next) {
@@ -3363,9 +3347,12 @@
/* write data to sink */
temp_buffer[sizeof(temp_buffer)-1] = '\x0';
idomod_write_to_sink(temp_buffer, IDO_TRUE, IDO_TRUE);
+ }
- free(es[0]);
- free(es[1]);
+ /* free buffers */
+ for (x = 0; x < OBJECTCONFIG_ES_ITEMS; x++) {
+ free(es[x]);
+ es[x] = NULL;
}
/****** dump timeperiod config ******/
@@ -3388,9 +3375,6 @@
temp_buffer[sizeof(temp_buffer)-1] = '\x0';
ido_dbuf_strcat(&dbuf, temp_buffer);
- free(es[0]);
- free(es[1]);
-
/* dump timeranges for each day */
for (x = 0; x < 7; x++) {
for (temp_timerange = temp_timeperiod->days[x]; temp_timerange != NULL; temp_timerange = temp_timerange->next) {
@@ -3420,6 +3404,12 @@
}
+ /* free buffers */
+ for (x = 0; x < OBJECTCONFIG_ES_ITEMS; x++) {
+ free(es[x]);
+ es[x] = NULL;
+ }
+
/****** dump contact config ******/
for (temp_contact = contact_list; temp_contact != NULL; temp_contact = temp_contact->next) {
@@ -3487,11 +3477,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
- free(es[1]);
- free(es[2]);
- free(es[3]);
- free(es[4]);
- free(es[5]);
+ es[0] = NULL;
/* dump addresses for each contact */
for (x = 0; x < MAX_CONTACT_ADDRESSES; x++) {
@@ -3508,6 +3494,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
+ es[0] = NULL;
}
/* dump host notification commands for each contact */
@@ -3524,6 +3511,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
+ es[0] = NULL;
}
/* dump service notification commands for each contact */
@@ -3540,6 +3528,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
+ es[0] = NULL;
}
/* dump customvars */
@@ -3558,8 +3547,10 @@
temp_buffer[sizeof(temp_buffer)-1] = '\x0';
ido_dbuf_strcat(&dbuf, temp_buffer);
- free(es[0]);
- free(es[1]);
+ for (x = 0; x < 2; x++) {
+ free(es[x]);
+ es[x] = NULL;
+ }
}
snprintf(temp_buffer, sizeof(temp_buffer) - 1
@@ -3575,6 +3566,12 @@
}
+ /* free buffers */
+ for (x = 0; x < OBJECTCONFIG_ES_ITEMS; x++) {
+ free(es[x]);
+ es[x] = NULL;
+ }
+
/****** dump contactgroup config ******/
for (temp_contactgroup = contactgroup_list; temp_contactgroup != NULL; temp_contactgroup = temp_contactgroup->next) {
@@ -3596,7 +3593,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
- free(es[1]);
+ es[0] = NULL;
/* dump members for each contactgroup */
for (temp_contactsmember = temp_contactgroup->members; temp_contactsmember != NULL; temp_contactsmember = temp_contactsmember->next) {
@@ -3612,6 +3609,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
+ es[0] = NULL;
}
snprintf(temp_buffer, sizeof(temp_buffer) - 1
@@ -3627,6 +3625,12 @@
}
+ /* free buffers */
+ for (x = 0; x < OBJECTCONFIG_ES_ITEMS; x++) {
+ free(es[x]);
+ es[x] = NULL;
+ }
+
/****** dump host config ******/
for (temp_host = host_list; temp_host != NULL; temp_host = temp_host->next) {
@@ -3781,8 +3785,8 @@
temp_buffer[sizeof(temp_buffer)-1] = '\x0';
ido_dbuf_strcat(&dbuf, temp_buffer);
- for (x = 0; x < 16; x++)
- free(es[x]);
+ free(es[0]);
+ es[0] = NULL;
/* dump parent hosts */
for (temp_hostsmember = temp_host->parent_hosts; temp_hostsmember != NULL; temp_hostsmember = temp_hostsmember->next) {
@@ -3798,6 +3802,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
+ es[0] = NULL;
}
/* dump contactgroups */
@@ -3814,6 +3819,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
+ es[0] = NULL;
}
/* dump individual contacts */
@@ -3830,6 +3836,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
+ es[0] = NULL;
}
@@ -3849,8 +3856,10 @@
temp_buffer[sizeof(temp_buffer)-1] = '\x0';
ido_dbuf_strcat(&dbuf, temp_buffer);
- free(es[0]);
- free(es[1]);
+ for (x = 0; x < 2; x++) {
+ free(es[x]);
+ es[x] = NULL;
+ }
}
snprintf(temp_buffer, sizeof(temp_buffer) - 1
@@ -3866,6 +3875,12 @@
}
+ /* free buffers */
+ for (x = 0; x < OBJECTCONFIG_ES_ITEMS; x++) {
+ free(es[x]);
+ es[x] = NULL;
+ }
+
/****** dump hostgroup config ******/
for (temp_hostgroup = hostgroup_list; temp_hostgroup != NULL; temp_hostgroup = temp_hostgroup->next) {
@@ -3887,7 +3902,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
- free(es[1]);
+ es[0] = NULL;
/* dump members for each hostgroup */
for (temp_hostsmember = temp_hostgroup->members; temp_hostsmember != NULL; temp_hostsmember = temp_hostsmember->next) {
@@ -3903,6 +3918,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
+ es[0] = NULL;
}
snprintf(temp_buffer, sizeof(temp_buffer) - 1
@@ -3918,6 +3934,12 @@
}
+ /* free buffers */
+ for (x = 0; x < OBJECTCONFIG_ES_ITEMS; x++) {
+ free(es[x]);
+ es[x] = NULL;
+ }
+
/****** dump service config ******/
for (temp_service = service_list; temp_service != NULL; temp_service = temp_service->next) {
@@ -4046,8 +4068,8 @@
temp_buffer[sizeof(temp_buffer)-1] = '\x0';
ido_dbuf_strcat(&dbuf, temp_buffer);
- for (x = 0; x < 13; x++)
- free(es[x]);
+ free(es[0]);
+ es[0] = NULL;
/* dump contactgroups */
for (temp_contactgroupsmember = temp_service->contact_groups; temp_contactgroupsmember != NULL; temp_contactgroupsmember = temp_contactgroupsmember->next) {
@@ -4063,6 +4085,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
+ es[0] = NULL;
}
/* dump individual contacts */
@@ -4079,6 +4102,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
+ es[0] = NULL;
}
/* dump customvars */
@@ -4097,8 +4121,10 @@
temp_buffer[sizeof(temp_buffer)-1] = '\x0';
ido_dbuf_strcat(&dbuf, temp_buffer);
- free(es[0]);
- free(es[1]);
+ for (x = 0; x < 2; x++) {
+ free(es[x]);
+ es[x] = NULL;
+ }
}
snprintf(temp_buffer, sizeof(temp_buffer) - 1
@@ -4114,6 +4140,12 @@
}
+ /* free buffers */
+ for (x = 0; x < OBJECTCONFIG_ES_ITEMS; x++) {
+ free(es[x]);
+ es[x] = NULL;
+ }
+
/****** dump servicegroup config ******/
for (temp_servicegroup = servicegroup_list; temp_servicegroup != NULL; temp_servicegroup = temp_servicegroup->next) {
@@ -4136,6 +4168,8 @@
free(es[0]);
free(es[1]);
+ es[0] = NULL;
+ es[1] = NULL;
/* dump members for each servicegroup */
for (temp_servicesmember = temp_servicegroup->members; temp_servicesmember != NULL; temp_servicesmember = temp_servicesmember->next) {
@@ -4154,6 +4188,8 @@
free(es[0]);
free(es[1]);
+ es[0] = NULL;
+ es[1] = NULL;
}
snprintf(temp_buffer, sizeof(temp_buffer) - 1
@@ -4169,6 +4205,12 @@
}
+ /* free buffers */
+ for (x = 0; x < OBJECTCONFIG_ES_ITEMS; x++) {
+ free(es[x]);
+ es[x] = NULL;
+ }
+
/****** dump host escalation config ******/
for (temp_hostescalation = hostescalation_list; temp_hostescalation != NULL; temp_hostescalation = temp_hostescalation->next) {
@@ -4202,7 +4244,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
- free(es[1]);
+ es[0] = NULL;
/* dump contactgroups */
for (temp_contactgroupsmember = temp_hostescalation->contact_groups; temp_contactgroupsmember != NULL; temp_contactgroupsmember = temp_contactgroupsmember->next) {
@@ -4218,6 +4260,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
+ es[0] = NULL;
}
/* dump individual contacts */
@@ -4234,6 +4277,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
+ es[0] = NULL;
}
snprintf(temp_buffer, sizeof(temp_buffer) - 1
@@ -4249,6 +4293,12 @@
}
+ /* free buffers */
+ for (x = 0; x < OBJECTCONFIG_ES_ITEMS; x++) {
+ free(es[x]);
+ es[x] = NULL;
+ }
+
/****** dump service escalation config ******/
for (temp_serviceescalation = serviceescalation_list; temp_serviceescalation != NULL; temp_serviceescalation = temp_serviceescalation->next) {
@@ -4287,8 +4337,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
- free(es[1]);
- free(es[2]);
+ es[0] = NULL;
/* dump contactgroups */
for (temp_contactgroupsmember = temp_serviceescalation->contact_groups; temp_contactgroupsmember != NULL; temp_contactgroupsmember = temp_contactgroupsmember->next) {
@@ -4304,6 +4353,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
+ es[0] = NULL;
}
/* dump individual contacts */
@@ -4320,6 +4370,7 @@
ido_dbuf_strcat(&dbuf, temp_buffer);
free(es[0]);
+ es[0] = NULL;
}
snprintf(temp_buffer, sizeof(temp_buffer) - 1
@@ -4335,6 +4386,12 @@
}
+ /* free buffers */
+ for (x = 0; x < OBJECTCONFIG_ES_ITEMS; x++) {
+ free(es[x]);
+ es[x] = NULL;
+ }
+
/****** dump host dependency config ******/
for (temp_hostdependency = hostdependency_list; temp_hostdependency != NULL; temp_hostdependency = temp_hostdependency->next) {
@@ -4369,10 +4426,6 @@
temp_buffer[sizeof(temp_buffer)-1] = '\x0';
ido_dbuf_strcat(&dbuf, temp_buffer);
- free(es[0]);
- free(es[1]);
- free(es[2]);
-
snprintf(temp_buffer, sizeof(temp_buffer) - 1
, "%d\n\n"
, IDO_API_ENDDATA
@@ -4386,6 +4439,12 @@
}
+ /* free buffers */
+ for (x = 0; x < OBJECTCONFIG_ES_ITEMS; x++) {
+ free(es[x]);
+ es[x] = NULL;
+ }
+
/****** dump service dependency config ******/
for (temp_servicedependency = servicedependency_list; temp_servicedependency != NULL; temp_servicedependency = temp_servicedependency->next) {
@@ -4428,12 +4487,6 @@
temp_buffer[sizeof(temp_buffer)-1] = '\x0';
ido_dbuf_strcat(&dbuf, temp_buffer);
- free(es[0]);
- free(es[1]);
- free(es[2]);
- free(es[3]);
- free(es[4]);
-
snprintf(temp_buffer, sizeof(temp_buffer) - 1
, "%d\n\n"
, IDO_API_ENDDATA
@@ -4447,6 +4500,12 @@
}
+ /* free buffers */
+ for (x = 0; x < OBJECTCONFIG_ES_ITEMS; x++) {
+ free(es[x]);
+ es[x] = NULL;
+ }
+
idomod_log_debug_info(IDOMOD_DEBUGL_PROCESSINFO, 2, "idomod_write_object_config() end\n");
return IDO_OK;
@@ -4727,9 +4786,6 @@
if (idomod_debug_file_fp != NULL)
fclose(idomod_debug_file_fp);
- free(idomod_debug_file);
- idomod_debug_file = NULL;
-
idomod_debug_file_fp = NULL;
return IDO_OK;
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/rc.ido2db.in
^
|
@@ -14,7 +14,7 @@
# Description: Icinga Data Out Daemon
### END INIT INFO
-# chkconfig: 345 98 01
+# chkconfig: 345 99 01
#
# File : ido2db
#
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/update-version
^
|
@@ -10,10 +10,10 @@
fi
# Current version number
-CURRENTVERSION=1.8.6
+CURRENTVERSION=1.8.4
# Last date
-LASTDATE=02-11-2014
+LASTDATE=01-13-2013
if [ "x$1" = "x" ]
then
|
[-]
[+]
|
Changed |
icinga-1.8.4.tar.bz2/xdata/xodtemplate.c
^
|
@@ -1128,12 +1128,13 @@
xod_begin_def(hostescalation);
new_hostescalation->first_notification = -2;
new_hostescalation->last_notification = -2;
- /* state based escalation ranges */
+#ifdef USE_ST_BASED_ESCAL_RANGE
new_hostescalation->first_down_notification = -2;
new_hostescalation->last_down_notification = -2;
new_hostescalation->first_unreachable_notification = -2;
new_hostescalation->last_unreachable_notification = -2;
new_hostescalation->notification_interval = -2.0;
+#endif
break;
case XODTEMPLATE_HOSTEXTINFO:
|