Merge branch 'ldap-cleanup', remote branch 'halostatue/ldap-cleanup' into ldap-cleanup
This commit is contained in:
commit
896eaa533c
4 changed files with 346 additions and 322 deletions
|
@ -629,7 +629,7 @@ class Net::LDAP
|
|||
if @open_connection
|
||||
@result = @open_connection.search(args) { |entry|
|
||||
result_set << entry if result_set
|
||||
yield(entry) if block_given?
|
||||
yield entry if block_given?
|
||||
}
|
||||
else
|
||||
@result = 0
|
||||
|
@ -639,7 +639,7 @@ class Net::LDAP
|
|||
if (@result = conn.bind(args[:auth] || @auth)) == 0
|
||||
@result = conn.search(args) { |entry|
|
||||
result_set << entry if result_set
|
||||
yield(entry) if block_given?
|
||||
yield entry if block_given?
|
||||
}
|
||||
end
|
||||
ensure
|
||||
|
@ -1041,7 +1041,7 @@ class Net::LDAP
|
|||
:attributes => [ :namingContexts, :supportedLdapVersion,
|
||||
:altServer, :supportedControl, :supportedExtension,
|
||||
:supportedFeatures, :supportedSASLMechanisms])
|
||||
(rs and rs.first) or Entry.new
|
||||
(rs and rs.first) or Net::LDAP::Entry.new
|
||||
end
|
||||
|
||||
# Return the root Subschema record from the LDAP server as a
|
||||
|
@ -1072,16 +1072,16 @@ class Net::LDAP
|
|||
rs = search(:ignore_server_caps => true, :base => "",
|
||||
:scope => SearchScope_BaseObject,
|
||||
:attributes => [:subschemaSubentry])
|
||||
return Entry.new unless (rs and rs.first)
|
||||
return Net::LDAP::Entry.new unless (rs and rs.first)
|
||||
|
||||
subschema_name = rs.first.subschemasubentry
|
||||
return Entry.new unless (subschema_name and subschema_name.first)
|
||||
return Net::LDAP::Entry.new unless (subschema_name and subschema_name.first)
|
||||
|
||||
rs = search(:ignore_server_caps => true, :base => subschema_name.first,
|
||||
:scope => SearchScope_BaseObject,
|
||||
:filter => "objectclass=subschema",
|
||||
:attributes => [:objectclasses, :attributetypes])
|
||||
(rs and rs.first) or Entry.new
|
||||
(rs and rs.first) or Net::LDAP::Entry.new
|
||||
end
|
||||
|
||||
#--
|
||||
|
@ -1405,7 +1405,7 @@ class Net::LDAP::Connection #:nodoc:
|
|||
case pdu.app_tag
|
||||
when 4 # search-data
|
||||
n_results += 1
|
||||
yield(pdu.search_entry) if block_given?
|
||||
yield pdu.search_entry if block_given?
|
||||
when 19 # search-referral
|
||||
if return_referrals
|
||||
if block_given?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue