I think that's fine. It all depends on what you want to pass to the command itself (in this case the /usr/locall.nagios/libexec/check_disk-plugin). If f.i. -w "$ARG1$" can use space-seperated values (which it can't, but just for arguments sake), then you have to specify (in nrpe.cfg) the (single- or) double-quotes.
Personally I tend not to use quoting in nrpe.cfg since in most cases it is not necessary, but there might be reasons to explicitly enclose such arguments in quotes..... Met vriendelijke groet/with kind regards, Ludse Verhoeven AIX System Engineer T: +31 10 400 2440 F: +31 10 400 2891 E: ludse.verhoe...@vopak.com Visit / Postal Address: http://www.vopak.com Enrico Zimol <lomiz.m...@gmail.com> 19/05/2010 16:46 Please respond to Nagios Users List <nagios-users@lists.sourceforge.net> To Nagios Users List <nagios-users@lists.sourceforge.net> cc Subject Re: [Nagios-users] NRPE with command arguments On 19 May 2010 11:13, Ludse Verhoeven <ludse.verhoe...@vopak.com> wrote: Not sure if this works like it is supposed to (haven't tested it myself), but qua syntax this seems more correct. That worked fine :) Other question, where exactly I've to insert quotes on nrpe.cfg commands to prevent code injection? I think like this: [nrpe.cfg] [...] command[check_disk]=/usr/local/nagios/libexec/check_disk -w "$ARG1$" -c " $ARG2$" [...] Is it right? Thank's! -- Enrico "lomiz" Zimol ------------------------------------------------------------------------------ _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
_______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null