Page 1 of 1

[Nagios-devel] clean_macro_chars() no longer called in utils.c in 2.0b1 ?

Posted: Thu Feb 03, 2005 1:48 pm
by Guest
This is a multi-part message in MIME format...

------------=_1107467279-77292-57
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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(selected_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

------------=_1107467279-77292-57
Content-Type: text/plain; name="disclaimer.txt"
Content-Disposition: inline; filename="disclaimer.txt"
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
X-Mailer: MIME-tools 5.415 (Entity 5.415)


--
This message contains privileged and confidential information only
for use by the intended recipient. If you are not the intended
recipient of this message, you must not disseminate, copy or use
it in any manner. If you have received this message in error,
please advise the sender by reply e-mail. Please ensure all
e-mail attachments are scanned for viruses prior to opening or
using.

------------=_1107467279-77292-57--





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