Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bring back the Net::LDAP namespace

  • Loading branch information...
commit 63db8c836a78c931c7922b6ee841dd67b24c1d5b 1 parent 528ef30
Michael Baker authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/net/ldap.rb
View
10 lib/net/ldap.rb
@@ -553,7 +553,7 @@ def open
# anything with the bind results. We then pass self to the caller's
# block, where he will execute his LDAP operations. Of course they will
# all generate auth failures if the bind was unsuccessful.
- raise LdapError, "Open already in progress" if @open_connection
+ raise Net::LDAP::LdapError, "Open already in progress" if @open_connection
begin
@open_connection = Net::LDAP::Connection.new(:host => @host,
@@ -1034,7 +1034,7 @@ def delete(args)
# dn = "mail=deleteme@example.com, ou=people, dc=example, dc=com"
# ldap.delete_tree :dn => dn
def delete_tree(args)
- delete(args.merge(:control_codes => [[LDAPControls::DELETE_TREE, true]]))
+ delete(args.merge(:control_codes => [[Net::LDAP::LDAPControls::DELETE_TREE, true]]))
end
# This method is experimental and subject to change. Return the rootDSE
# record from the LDAP server as a Net::LDAP::Entry, or an empty Entry if
@@ -1106,7 +1106,7 @@ def search_subschema_entry
#++
def paged_searches_supported?
@server_caps ||= search_root_dse
- @server_caps[:supportedcontrol].include?(LDAPControls::PAGED_RESULTS)
+ @server_caps[:supportedcontrol].include?(Net::LDAP::LDAPControls::PAGED_RESULTS)
end
end # class LDAP
@@ -1403,7 +1403,7 @@ def search(args = {})
controls = []
controls <<
[
- LDAPControls::PAGED_RESULTS.to_ber,
+ Net::LDAP::LDAPControls::PAGED_RESULTS.to_ber,
# Criticality MUST be false to interoperate with normal LDAPs.
false.to_ber,
rfc2696_cookie.map{ |v| v.to_ber}.to_ber_sequence.to_s.to_ber
@@ -1451,7 +1451,7 @@ def search(args = {})
more_pages = false
if result_code == 0 and controls
controls.each do |c|
- if c.oid == LDAPControls::PAGED_RESULTS
+ if c.oid == Net::LDAP::LDAPControls::PAGED_RESULTS
# just in case some bogus server sends us more than 1 of these.
more_pages = false
if c.value and c.value.length > 0
Please sign in to comment.
Something went wrong with that request. Please try again.