summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest/ldap.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/custodian/protocoltest/ldap.rb')
-rw-r--r--lib/custodian/protocoltest/ldap.rb12
1 files changed, 6 insertions, 6 deletions
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
#