[Nagiosplug-devel] [Nagiosplug-help] SSH Plugins

Ton Voon tonvoon at gmail.com
Fri Jun 18 09:47:33 CEST 2010

On 18 Jun 2010, at 04:29, Thomas Guyot-Sionnest wrote:

> Hash: SHA1
> On 10-06-04 10:25 AM, Franz, Jay wrote:
>> Has anyone had any success getting the nagios plugins, check_ssh and
>> check_by_ssh to work through a socks firewall?  I can configure my  
>> ssh
>> client, via environment variables or command line options, with no
>> problems.  But, I have had no success with the plugins as there seems
>> to be no way to pass either environment variables or command line
>> options to the plugins.  Any help would be appreciated.
> I'm adding the devel list....
> This is an excellent point... lib/utils_cmd.c:140 creates a new empty
> environment array with LC_ALL=C.
> Instead we could use the current environment in:
> extern char **environ;
> Now I'm wondering if we should rewrite **environ with the LC_ALL
> changed/added or if we can ignore it. Ton, since you added  
> utils_cmd, do
> you have any idea?

I set to C, to ensure that the output is not localised from the other  
end. But that wouldn't work in different locales if you wanted to  
capture 3rd party error messages in other languages. So it probably  
should be a plugin writer's decision whether to set LC_ALL=C.

As to the whole environment, I can't recall why it is wiped. I can see  
that PATH could have been altered which maybe a security risk, but  
that seems like a bad excuse, especially if your system requires  
different PATHs to be set to get to some binaries (*cough*, Solaris).


More information about the Devel mailing list