Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nrpe agent not passing command arguments when enabled #252

Open
MrPippin66 opened this issue May 25, 2021 · 0 comments
Open

nrpe agent not passing command arguments when enabled #252

MrPippin66 opened this issue May 25, 2021 · 0 comments

Comments

@MrPippin66
Copy link

MrPippin66 commented May 25, 2021

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, "!");
  
  
    #<span class="pl-k">else</span><!--EndFragment-->

But...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 &lt; MAX_COMMAND_ARGUMENTS; x++) {
  
  
    			ptr = strtok(NULL, "!");
  
  
    			if (ptr == NULL)
  
  
    				<span class="pl-k">break</span>;<!--EndFragment-->

That's ultimately going to have 'ptr' = NULL, and not any actual argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant