PATCH: Allow escaping ! in check args (utils.c)

Ethan Galstad nagios at nagios.org
Thu May 18 01:11:51 CEST 2006


Bob Ingraham wrote:
> Gents,
> 
> Please find attached a patch (in unified diff context,) for the following:
> 
> My work had me create a patch for the get_raw_command_line() function in
> utils.c to allow us to "escape" the "!" argument separator within check
> command arguments.
> 
> I generalized it such that you can actually escape any character by
> prefacing it with a backslash ('\').  So, now you can have command args
> that include exclamations points as part of the argmument string.
> 
> For example:
> 
> check_command check_web!www.nagios.org!80!\!Test\!String\!!10!20
> 
> This will pass the third argument as: "!Test!String!" (sans quotes)
> 
> Bob
> 

Thanks for the patch!  I'll apply similiar functionality to the Nagios 
3.0 CVS code (the code differs a bit from 2.x).  I don't see a need to 
allow for escaping of the first ! delimiter in the command line, as it 
seems unlikely that anyone would need/want to define a command with an 
exclamation point. :-)  Patch will be in CVS soon.  Thanks again!

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


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the Developers mailing list