[Nagiosplug-devel] check_hpjd gets snmpget arguments wrong w/fix

Subhendu Ghosh sghosh at sghosh.org
Tue Apr 8 13:23:03 CEST 2003


Thanks - it was already reported - but I haven't gotten around to actually 
patching it.  Sorry.

patch 698384

-sg

On Tue, 8 Apr 2003, John Sellens wrote:

> check_hpjd invokes snmpget with (basically)
>     snmpget hostname -c community
> which doesn't always work, and isn't correct - the -c option (if provided)
> should be before the hostname.  (Some versions accept a community following
> the hostname but without -c.)
> 
> Patch for obvious fix follows.  Thanks!
> 
> John
> jsellens at generalconcepts.com
> 
> 
> *** plugins/check_hpjd.c.old	Tue Apr  8 13:19:01 2003
> --- plugins/check_hpjd.c	Tue Apr  8 13:28:56 2003
> ***************
> *** 139,146 ****
>   		 HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, HPJD_GD_STATUS_DISPLAY);
>   
>   	/* get the command to run */
> ! 	sprintf (command_line, "%s -m : -v 1 %s -c %s %s", PATH_TO_SNMPGET, address,
> ! 					 community, query_string);
>   
>   	/* run the command */
>   	child_process = spopen (command_line);
> --- 139,146 ----
>   		 HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, HPJD_GD_STATUS_DISPLAY);
>   
>   	/* get the command to run */
> ! 	sprintf (command_line, "%s -m : -v 1 -c %s %s %s", PATH_TO_SNMPGET,
> ! 					 community, address, query_string);
>   
>   	/* run the command */
>   	child_process = spopen (command_line);
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb: 
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> Nagiosplug-devel mailing list
> Nagiosplug-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
> 

-- 






More information about the Devel mailing list