Menu

#14 Macro Expansion Bug

v1.0 (example)
open
nobody
None
5
2010-11-02
2010-11-02
enyalios
No

If you have a command like:
command[check_foo]=ls -ld / | awk '{print $1}'
in your nrpe.cfg file, the process_macro function in nrpe.c expands it to "ls -ld / | awk '{print $1}'$" because it tries to see if the part between the $ and the end of line is a macro. This is causes the command to fail to run.

On line 1874, you should check to make sure that we weren't testing something that ended at the end of the line before adding a $ to the end of output_buffer.

Thanks.

-paul

Discussion


Log in to post a comment.

MongoDB Logo MongoDB