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
609
609
# Net::LDAP::SearchScope_WholeSubtree. Default is WholeSubtree.)
610
610
# * :size (an integer indicating the maximum number of search entries to
611
611
# 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)
612
613
# * :deref (one of: Net::LDAP::DerefAliases_Never, Net::LDAP::DerefAliases_Search,
613
614
# Net::LDAP::DerefAliases_Find, Net::LDAP::DerefAliases_Always. Default is Never.)
614
615
#
@@ -1485,6 +1486,7 @@ def search(args = {})
1485
1486
search_attributes = ( ( args && args [ :attributes ] ) || [ ] ) . map { |attr | attr . to_s . to_ber }
1486
1487
return_referrals = args && args [ :return_referrals ] == true
1487
1488
sizelimit = ( args && args [ :size ] . to_i ) || 0
1489
+ timelimit = ( args && args [ :time ] . to_i ) || 0
1488
1490
raise Net ::LDAP ::LdapError , "invalid search-size" unless sizelimit >= 0
1489
1491
paged_searches_supported = ( args && args [ :paged_searches_supported ] )
1490
1492
@@ -1548,7 +1550,7 @@ def search(args = {})
1548
1550
scope . to_ber_enumerated ,
1549
1551
deref . to_ber_enumerated ,
1550
1552
query_limit . to_ber , # size limit
1551
- 0 . to_ber ,
1553
+ timelimit . to_ber ,
1552
1554
attributes_only . to_ber ,
1553
1555
search_filter . to_ber ,
1554
1556
search_attributes . to_ber_sequence
You can’t perform that action at this time.
0 commit comments