Open MrPippin66 opened 3 years ago
Platform: AIX 7100-05-06-2016 NRPE agent version: nagios-nrpe-4.0.3-1.ppc
When agent is configured to accept command arguments, none are actually being seen to the called command.
Option is configured for agent. During runtime, following seen in logs.
Warning: Daemon is configured to accept command arguments from clients!
However, looking at source code, I'm unsure how arguments could be seen to commands as shows in the following code segment current nrpe.c file.
This is being set to the command arguments:
But...during the actual parsing of arguments, you're looking at this 'ptr' value:
That's ultimately going to have 'ptr' = NULL, and not any actual argument.
Platform: AIX 7100-05-06-2016 NRPE agent version: nagios-nrpe-4.0.3-1.ppc
When agent is configured to accept command arguments, none are actually being seen to the called command.
Option is configured for agent. During runtime, following seen in logs.
Warning: Daemon is configured to accept command arguments from clients!
However, looking at source code, I'm unsure how arguments could be seen to commands as shows in the following code segment current nrpe.c file.
This is being set to the command arguments:
#ifdef ENABLE_COMMAND_ARGUMENTS ptr = strtok(buff, "!"); #elseBut...during the actual parsing of arguments, you're looking at this 'ptr' value:
#ifdef ENABLE_COMMAND_ARGUMENTS /* get command arguments */ if (allow_arguments == TRUE) { for (x = 0; x < MAX_COMMAND_ARGUMENTS; x++) { ptr = strtok(NULL, "!"); if (ptr == NULL) break;That's ultimately going to have 'ptr' = NULL, and not any actual argument.