File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -609,6 +609,7 @@ def open
609609 # Net::LDAP::SearchScope_WholeSubtree. Default is WholeSubtree.)
610610 # * :size (an integer indicating the maximum number of search entries to
611611 # return. Default is zero, which signifies no limit.)
612+ # * :time (an integer restricting the maximum time in seconds allowed for a search RFC 4511 4.5.1.5)
612613 # * :deref (one of: Net::LDAP::DerefAliases_Never, Net::LDAP::DerefAliases_Search,
613614 # Net::LDAP::DerefAliases_Find, Net::LDAP::DerefAliases_Always. Default is Never.)
614615 #
@@ -1485,6 +1486,7 @@ def search(args = {})
14851486 search_attributes = ( ( args && args [ :attributes ] ) || [ ] ) . map { |attr | attr . to_s . to_ber }
14861487 return_referrals = args && args [ :return_referrals ] == true
14871488 sizelimit = ( args && args [ :size ] . to_i ) || 0
1489+ timelimit = ( args && args [ :time ] . to_i ) || 0
14881490 raise Net ::LDAP ::LdapError , "invalid search-size" unless sizelimit >= 0
14891491 paged_searches_supported = ( args && args [ :paged_searches_supported ] )
14901492
@@ -1548,7 +1550,7 @@ def search(args = {})
15481550 scope . to_ber_enumerated ,
15491551 deref . to_ber_enumerated ,
15501552 query_limit . to_ber , # size limit
1551- 0 . to_ber ,
1553+ timelimit . to_ber ,
15521554 attributes_only . to_ber ,
15531555 search_filter . to_ber ,
15541556 search_attributes . to_ber_sequence
You can’t perform that action at this time.
0 commit comments