Macro Expansion Bug
Brought to you by:
egalstad
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