Re: [Nagios-devel] escaping semicolon

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] escaping semicolon

Post by Guest »

On 23 Mar 2006 at 1:51, Andreas Ericsson wrote:

> Gerd Mueller wrote:
> > Hi all,
> >
> >
> >
> > I thought of writing a patch to quote semicolons with a backslash
> > or even better to convert hex to ascii (like \xEB for a semicolon).
> > It was very simple but did not work with NRPE :-(. NRPE has its own
> > nasty characters. So escaping inside nagios config will not be
> > enough :-(. So I am thinking of "global" solution of escaping
> > nasty characters inside nagios.
> >
> >
> >
> > Anybody any suggestion about a better pattern to escape nasty
> > characters?
> >
>
> Don't escape them at all, but parse out the string using shell-style
> parsing and run the command with execve(2). This will also save us the
> problem of the macro_x locking race that can sometimes occur, making
> Nagios 2 sometimes crash on FreeBSD.

Either I missed an earlier post, or I've been drinking funny juice
lately. I wasn't aware there was a race condition in the macro
processing. Can you provide more details?

>
> This will do funny things for people who use shell-variables in
> command-lines though, so it's a double-edged sword, but imo sharper on
> the good side.
>


Ethan Galstad,
Nagios Developer
---
Email: [email protected]
Website: http://www.nagios.org






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked