diff options
author | Niko Tyni <ntyni@iki.fi> | 2006-09-07 08:31:39 +0200 |
---|---|---|
committer | Niko Tyni <ntyni@iki.fi> | 2006-09-07 08:31:39 +0200 |
commit | edbe6f2aa91d6d8d3ce6092aaf97fe5d08ecbbc1 (patch) | |
tree | da92352fd34d603b43ba5f4b7a727203a68f955f /lib | |
parent | 364743d3606928e114cedc84e9d6c2f7cef7c7a3 (diff) | |
download | smokeping-edbe6f2aa91d6d8d3ce6092aaf97fe5d08ecbbc1.tar.gz smokeping-edbe6f2aa91d6d8d3ce6092aaf97fe5d08ecbbc1.tar.xz |
make the LDAP 'scope' option actually work.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Smokeping/probes/LDAP.pm | 5 |
1 files changed, 3 insertions, 2 deletions
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; |