From edbe6f2aa91d6d8d3ce6092aaf97fe5d08ecbbc1 Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Thu, 7 Sep 2006 06:31:39 +0000 Subject: make the LDAP 'scope' option actually work. --- lib/Smokeping/probes/LDAP.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Smokeping/probes/LDAP.pm b/lib/Smokeping/probes/LDAP.pm index 61d2957..a67e4a8 100644 --- a/lib/Smokeping/probes/LDAP.pm +++ b/lib/Smokeping/probes/LDAP.pm @@ -211,7 +211,7 @@ sub pingone { } local $IO::Socket::SSL::SSL_Context_obj; # ugly but necessary $start = gettimeofday(); - my $ldap = new Net::LDAP($host, port => $port, version => $version, timeout => $timeout, scope => $scope) + my $ldap = new Net::LDAP($host, port => $port, version => $version, timeout => $timeout) or do { $self->do_log("connection error on $host: $!"); next; @@ -238,7 +238,8 @@ sub pingone { $ldap->unbind; next; }; - $mesg = $ldap->search(base => $base, filter => $filter, attrs => $attrsref); + $mesg = $ldap->search(base => $base, filter => $filter, + attrs => $attrsref, scope => $scope); $mesg->code and do { $self->do_log("filter error on $host: " . $mesg->error); $ldap->unbind; -- cgit v1.2.3-24-g4f1b