clean_macro_chars() no longer called in utils.c in 2.0b1 ?

Ethan Galstad nagios at nagios.org
Wed Feb 9 00:50:05 CET 2005


Stanley -

You are correct.  The macro code was changed shortly before the beta 
1 release, and this one fell through the cracks.  I am posting a 
patch to CVS shortly.

On 4 Feb 2005 at 8:47, Stanley Hopcroft wrote:

> Dear Folks,
> 
> Nagios 2.0b1 appears not to clean illegal characters from certain
> macros as documented.
> 
> Whereas 1.2 has a logical case formed by an 'if then else if ..' chain
> to clean the macro content depending on the macro name, the 2.0b1 code
> relies on a flag named clean_macro that is only cleared (as far as I
> can see).
> 
> tsitc> grep clean_macro utils.c
>         int clean_macro=FALSE;
>                 clean_macro=FALSE;
>                                    if(clean_macro==TRUE)
> 
> strncat(output_buffer,(selected_macro==NULL)?"":clean_macro_chars(sele
> cted_macro,options),buffer_length-strlen(output_buffer)-1); char
> *clean_macro_chars(char *macro,int options){
> 
> /* added cruft */
>         printf("\tEntering utils.c/clean_macro_chars.\n");
>                 printf("\tLeaving utils.c/clean_macro_chars.\n"
> 
> (The last two (2) printfs are added by me to examine why 
> clean_macro_chars() wasn't cleaning. It wasn't cleaning because it
> wasn't called).
> 
> This may have been fixed in the CVS and I apologise if it has.
> 
> Would a patch that implements a case selection of the documented
> cleansed macros be acceptable ?
> 
> Yours sincerely.
> 
> -- 
> Stanley Hopcroft
> 
> IP Australia
> Ph: (02) 6283 3189  Fax: (02) 6281 1353
> PO Box 200 Woden  ACT 2606
> http://www.ipaustralia.gov.au
> 



Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click




More information about the Developers mailing list