Page 1 of 1

[Nagios-devel] status.cgi segfault without hostgroup parameter on

Posted: Wed Sep 29, 2010 11:48 am
by Guest
This is a multi-part message in MIME format.
--------------030603080708090708060005
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

regarding the tracker issue http://tracker.nagios.org/view.php?id=120

I recently fixed that issue on the Icinga CGIs, i've re-checked on
Nagios CGIs and the SIGSEGV still happens on Solaris 10.

Reproducable on my Solaris box. So the issue is not resolved, yet still
exists.

Please check https://dev.icinga.org/issues/594 for further explanations.
To conclude with, it's again printf("%s", NULL) on Solaris.

Since it's rather trivial to fix, I decided to create a patch for Nagios
too. Attached GIT diff against latest HEAD resolves those issues,
changing behavior to 'all' when no parameters are provided.

Kind regards,
Michael


PS: Any chance moving Nagios to GIT in the near future?

--
DI (FH) Michael Friedrich

Vienna University Computer Center
Universitaetsstrasse 7 A-1010 Vienna, Austria

email: [email protected]
phone: +43 1 4277 14359
fax: +43 1 4277 14279
web: http://www.univie.ac.at/zid

Icinga Core& IDOUtils Developer
http://www.icinga.org


--------------030603080708090708060005
Content-Type: text/x-diff;
name="nagios_3.2.2_fix_status_cgi_segfault_without_hostgroup_parameter_on_solaris_10.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="nagios_3.2.2_fix_status_cgi_segfault_without_hostgroup_param";
filename*1="eter_on_solaris_10.patch"

diff --git a/cgi/status.c b/cgi/status.c
index cac8cd0..ec86a21 100644
--- a/cgi/status.c
+++ b/cgi/status.c
@@ -851,7 +851,7 @@ void show_service_status_totals(void){
printf("");
printf("");
printf("");
printf("");
printf("");
printf("");
printf("<A CLASS='serviceTotals' HREF='%s?",STATUS_CGI);
if(display_type==DISPLAY_HOSTS)
- printf("host=%s",url_encode(host_name));
+ printf("

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]