[Nagiosplug-devel] SEC: UNCLASS: PATCH: backslash escape sequences in check_tcp
Hand, Nathan
Nathan.Hand at defence.gov.au
Wed Jan 8 16:14:04 CET 2003
I use this checkcommand to check a website behind a proxy (no other choice)
define command {
command_name check_http_via_proxy
command_line $USER1$/check_tcp -H $ARG1$ -p $ARG2$ -s
'GET $ARG3$ HTTP/1.0\r\n' -e 'HTTP/1.0 200'
}
With a service looking like this
define service {
...
check_command
check_http_via_proxy!myproxy!8080!http://myisp.com/mysite/
}
The latest version of nagios-plugins doesn't grok the escape sequences. It
sends out the backslashes and all! So
the socket times out while the webserver patiently waits for the blank line.
Here's a simple patch that adds escape sequence processing to check_tcp. I
questioned whether to add this to the
nagios-core config parser, but I decided to go with the principle of least
change.
<<escape-chars-in-config.diff>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: escape-chars-in-config.diff
Type: application/octet-stream
Size: 1991 bytes
Desc: not available
URL: <http://nagios-plugins.org/archive/devel/attachments/20030108/e6df77d2/attachment.obj>
More information about the Devel
mailing list