From 3024e33c4be929d23041973c28f2dee577a8bc33 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Wed, 13 Feb 2013 10:37:45 +0000 Subject: Updated. --- lib/custodian/protocoltest/ldap.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/custodian/protocoltest/ldap.rb b/lib/custodian/protocoltest/ldap.rb index 49b9b41..3e849f3 100644 --- a/lib/custodian/protocoltest/ldap.rb +++ b/lib/custodian/protocoltest/ldap.rb @@ -120,21 +120,21 @@ module Custodian # Search # ldap.search(base,scope,filter,attrs) { |entry| - puts entry.vals('cn') + puts "We found an LDAP result #{entry.vals('cn')}" } ldap.unbind return true else - @error "failed to bind to LDAP server '#{@host}' with username '#{@ldap_user}' and password '#{@ldap_pass}'" + @error = "failed to bind to LDAP server '#{@host}' with username '#{@ldap_user}' and password '#{@ldap_pass}'" return false. end - rescue LDAP::ResultError => ex - @error = "LDAP exception: #{ex} when talkign to LDAP server '#{@host}' with username '#{@ldap_user}' and password '#{@ldap_pass}'" - return false end + rescue LDAP::ResultError => ex + @error = "LDAP exception: #{ex} when talkign to LDAP server '#{@host}' with username '#{@ldap_user}' and password '#{@ldap_pass}'" + return false end - + end # -- cgit v1.2.1