From f6d4093e0dc827fbc853ed21ad3cb0ab1f898704 Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Fri, 18 Feb 2005 13:04:12 +0000 Subject: * graph fixes for small numbers of pings -- Chris Wilson * fix the LDAP probe killing the CGI with perl <5.6 -- Peter Farmer * make the LDAP probe work withouth IO::Socket::SSL -- niko * make Curl description shorter -- Chris Wilson * use CGI::Carp for CGI error handling - remove the now unnecessary kludge from AnotherDNS * don't call exit() in the daemon __DIE__ handler * raise Curl and EchoPingHttp{,s} default timeouts * add a section on timeouts to smokeping_upgrade * add IO::Socket::SSL to smokeping_install --- lib/Smokeping/probes/LDAP.pm | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'lib/Smokeping/probes/LDAP.pm') diff --git a/lib/Smokeping/probes/LDAP.pm b/lib/Smokeping/probes/LDAP.pm index 07dd7f6..2888a14 100644 --- a/lib/Smokeping/probes/LDAP.pm +++ b/lib/Smokeping/probes/LDAP.pm @@ -19,7 +19,15 @@ use Smokeping::probes::passwordchecker; use Net::LDAP; use Time::HiRes qw(gettimeofday sleep); use base qw(Smokeping::probes::passwordchecker); -use IO::Socket::SSL; + +# don't bail out if IO::Socket::SSL +# can't be loaded, just warn +# about it when doing starttls + +my $havessl = 0; + +eval "use IO::Socket::SSL;"; +$havessl = 1 unless $@; my $DEFAULTINTERVAL = 1; @@ -42,7 +50,9 @@ be specified by the variables `port' and `version'. The probe can issue the starttls command to convert the connection into encrypted mode, if so instructed by the `start_tls' variable. -It can also optionally do an authenticated LDAP bind, if the `binddn' +This requires the 'IO::Socket::SSL' perl module to be installed. + +The probe can also optionally do an authenticated LDAP bind, if the `binddn' variable is present. The password to be used can be specified by the target-specific variable `password' or in an external file. The location of this file is given in the probe-specific variable @@ -95,6 +105,12 @@ sub targetvars { }, start_tls => { _doc => "If true, encrypt the connection with the starttls command. Disabled by default.", + _sub => sub { + my $val = shift; + return "ERROR: start_tls defined but IO::Socket::SSL couldn't be loaded" + if $val and not $havessl; + return undef; + }, _example => "1", }, timeout => { -- cgit v1.2.3-24-g4f1b