File tree Expand file tree Collapse file tree 1 file changed +18
-14
lines changed Expand file tree Collapse file tree 1 file changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -742,22 +742,26 @@ def search(args = {})
742
742
# the documentation for #auth, the password parameter can be a Ruby Proc
743
743
# instead of a String.
744
744
def bind ( auth = @auth )
745
- if @open_connection
746
- @result = @open_connection . bind ( auth )
747
- else
748
- begin
749
- conn = Connection . new \
750
- :host => @host ,
751
- :port => @port ,
752
- :encryption => @encryption ,
753
- :instrumentation_service => @instrumentation_service
754
- @result = conn . bind ( auth )
755
- ensure
756
- conn . close if conn
745
+ instrument "bind.net_ldap" do |payload |
746
+ if @open_connection
747
+ payload [ :connection ] = @open_connection
748
+ payload [ :bind ] = @result = @open_connection . bind ( auth )
749
+ else
750
+ begin
751
+ conn = Connection . new \
752
+ :host => @host ,
753
+ :port => @port ,
754
+ :encryption => @encryption ,
755
+ :instrumentation_service => @instrumentation_service
756
+ payload [ :connection ] = conn
757
+ payload [ :bind ] = @result = conn . bind ( auth )
758
+ ensure
759
+ conn . close if conn
760
+ end
757
761
end
758
- end
759
762
760
- @result . success?
763
+ @result . success?
764
+ end
761
765
end
762
766
763
767
# #bind_as is for testing authentication credentials.
You can’t perform that action at this time.
0 commit comments