def search(options={}, &block)
super(options) do |base, scope, filter, attrs, limit, callback|
begin
info = {
:base => base, :scope => scope_name(scope),
:filter => filter, :attributes => attrs, :limit => limit,
}
execute(:search_with_limit,
info, base, scope, filter, attrs, limit) do |entry|
attributes = {}
entry.attrs.each do |attr|
attributes[attr] = entry.vals(attr)
end
callback.call([entry.dn, attributes], block)
end
rescue RuntimeError
if $!.message == "no result returned by search"
@logger.debug do
args = [filter, attrs.inspect]
_("No matches: filter: %s: attributes: %s") % args
end
else
raise
end
end
end
end