Re: [Nagios-devel] Non existent macros are not replaced
Posted: Mon Mar 07, 2011 1:41 pm
On 03/07/2011 01:57 PM, Matthieu Kermagoret wrote:
> On Thu, Mar 3, 2011 at 8:08 PM, Jochen Bern wrote:
>> On 03/03/2011 07:33 PM, Andreas Ericsson wrote:
>>> Yes, but how about a command_line such as this:
>>> $USER1$/check_something '$pas$word'
>>> $pas$ is not a valid macro, so by the reasoning of the original poster
>>> we should remove it, but that would mean there can *never* be two
>>> dollar-signs that aren't part of macros inside anything where macros
>>> get interpreted
>>
>> I'm not saying that you should follow his reasoning, but why you keep
>> ignoring the official escaping method?
>>
>> "Also, if you want to pass a dollar sign ($) on the command line, you
>> have to escape it with another dollar sign."
>> -- http://nagios.sourceforge.net/docs/3_0/ ... ml#command
>>
>
> As Jochen pointed out, the patch I propose still allows dollars to be
> given to the shell as there is an escaping method especially for this
> purpose.
>
>> The above quote from the docs says it isn't ("you HAVE to"). But as I
>> said, *enforcing* that out of the blue sky is problematic, to say the least.
>>
>
> While I agree that some configurations might be broken by this patch,
> the users that implemented them didn't follow the documentation in the
> first place and should therefore not be taken into account. With this
> patch legitimate users that would expect non-existent macros to simply
> be removed would be satisfied.
>
The same argument can be used against you for trying to use a macro
where it can't be used.
> So Andreas, would your reconsider your opinion about the application
> of this patch ?
>
No.
--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
> On Thu, Mar 3, 2011 at 8:08 PM, Jochen Bern wrote:
>> On 03/03/2011 07:33 PM, Andreas Ericsson wrote:
>>> Yes, but how about a command_line such as this:
>>> $USER1$/check_something '$pas$word'
>>> $pas$ is not a valid macro, so by the reasoning of the original poster
>>> we should remove it, but that would mean there can *never* be two
>>> dollar-signs that aren't part of macros inside anything where macros
>>> get interpreted
>>
>> I'm not saying that you should follow his reasoning, but why you keep
>> ignoring the official escaping method?
>>
>> "Also, if you want to pass a dollar sign ($) on the command line, you
>> have to escape it with another dollar sign."
>> -- http://nagios.sourceforge.net/docs/3_0/ ... ml#command
>>
>
> As Jochen pointed out, the patch I propose still allows dollars to be
> given to the shell as there is an escaping method especially for this
> purpose.
>
>> The above quote from the docs says it isn't ("you HAVE to"). But as I
>> said, *enforcing* that out of the blue sky is problematic, to say the least.
>>
>
> While I agree that some configurations might be broken by this patch,
> the users that implemented them didn't follow the documentation in the
> first place and should therefore not be taken into account. With this
> patch legitimate users that would expect non-existent macros to simply
> be removed would be satisfied.
>
The same argument can be used against you for trying to use a macro
where it can't be used.
> So Andreas, would your reconsider your opinion about the application
> of this patch ?
>
No.
--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]