NRPE Patch to allow NASTY_METACHARS to be defined in nrpe.cfg

Tim Philips timp at rndgroup.co.nz
Mon Mar 7 08:18:01 CET 2011


Hi All,

I'm working on a project where we are passing command arguments through to NRPE and want to be able to execute (things like) check_disk on storage volumes that contain spaces (i.e. /Volumes/Macintosh HD). When passing to the volume we need to escape spaces and the current build of NRPE doesn't allow this because of the internally hard coded NASTY_METACHARS variable we are not able over ride on a per-instance NRPE installation.  I realise that allowing some types of characters through to NRPE causes "potential" security concerns but NRPE over SSL, firewalled off and running as a non-priviledged user "should" be sufficient, how ever I think its wisest to let the users decide what the feel is acceptable.

The attached patch for NRPE version 2.12 allows you to specify the variable illegal_metachars in your nrpe.cfg (or included configuration file), if you don't specify illegal_metachars it will default to that of the previously used NASTY_METACHARS variable. 

I have attempted to use the same conventions when applying the changes to the source code and generating the patch.

Hopefully this is of value and gets included in future NRPE builds.

Any questions please let me know.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: nrpe-illegal-chars.patch
Type: application/octet-stream
Size: 1707 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20110307/aa1170bc/attachment.obj>
-------------- next part --------------


--
Thanks,

Tim Philips
RND GROUP LIMITED

-------------- next part --------------
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list