Nagios 4: Commands are unescaped twice

Adam James adam.james at transitiv.co.uk
Thu Jan 10 17:22:08 CET 2013


Hi Andreas,

On 08/01/13 10:12, Andreas Ericsson wrote:
> lib/runcmd.c is the library code which shouldn't change its behaviour. The
> code in utils.c should be removed instead.

The attached patch removes the general escape handling code from
utils.c, with the exception of "\!" as otherwise it wouldn't be possible
to include a "!" inside an argument.

If you think this should be done differently then let me know and I'll
amend the patch.

> On the other hand, the runcmd.c code should have a flag argument one can
> use to tell it to ignore certain characters, with "ignore everything" to
> be taken as "split on every whitespace-sequence and disregard quoting and
> escaping entirely".

What's the use case for this?

Cheers,

Adam
-- 
Open Source Consultant, Transitiv Technologies Ltd.

Business Critical Support and Services for Open Source Software.

T: 0203 384 7207
E: adam.james at transitiv.co.uk
W: http://www.transitiv.co.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-base-utils.c-Remove-code-handling-escape-characters.patch
Type: text/x-patch
Size: 1913 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20130110/1ce78c02/attachment.bin>
-------------- next part --------------
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
-------------- 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